@@ -25,17 +25,41 @@ the vendors of the loaded project, if the vendors are required in incompatible
25
25
versions.
26
26
27
27
28
- ## Usage
28
+ ## Installation
29
29
30
- Use PHP-Scoper like this :
30
+ You can install PHP-Scoper with Composer :
31
31
32
+ ``` bash
33
+ composer global require humbug/php-scoper:dev-master
32
34
```
33
- $ php-scoper add-prefix MyPhar\\ .
35
+
36
+ If you cannot install it because of a dependency conflict or you prefer to
37
+ install it for your project, we recommend you to take a look at
38
+ [ bamarni/composer-bin-plugin] [ bamarni/composer-bin-plugin ] . Example:
39
+
40
+ ``` bash
41
+ composer require --dev bamarni/composer-bin-plugin
42
+ composer bin php-scoper require --dev humbug/php-scoper:dev-master
34
43
```
35
44
36
- The first argument is the prefix to add to all namespace declarations and class
37
- usages. The second argument is one or more files/directories which should be
38
- processed.
45
+ A PHAR should be availaible soon as well.
46
+
47
+
48
+ ## Usage
49
+
50
+ ``` bash
51
+ php-scoper add-prefix
52
+ ```
53
+
54
+ This will prefix all the files found in the current working directory.
55
+ The prefixed files will be accessible in a ` build ` folder. You can
56
+ then use the prefixed code to build your PHAR.
57
+
58
+ ** Warning** : After prefexing the files, if you are relying on Composer
59
+ for the autoloading, dumping the autoloader again is required.
60
+
61
+ For a more concrete example, you can take a look at PHP-Scoper's build
62
+ step in [ Makefile] ( Makefile ) .
39
63
40
64
41
65
## Contributing
@@ -52,3 +76,4 @@ Project originally created by: [Bernhard Schussek] ([@webmozart]) which has then
52
76
[ Bernhard Schussek ] : https://webmozart.io/
53
77
[ @webmozart ] : https://twitter.com/webmozart
54
78
[ humbug ] : https://github.com/humbug
79
+ [ bamarni/composer-bin-plugin ] : https://github.com/bamarni/composer-bin-plugin
0 commit comments