@@ -25,17 +25,41 @@ the vendors of the loaded project, if the vendors are required in incompatible
2525versions.
2626
2727
28- ## Usage
28+ ## Installation
2929
30- Use PHP-Scoper like this :
30+ You can install PHP-Scoper with Composer :
3131
32+ ``` bash
33+ composer global require humbug/php-scoper:dev-master
3234```
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
3443```
3544
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 ) .
3963
4064
4165## Contributing
@@ -52,3 +76,4 @@ Project originally created by: [Bernhard Schussek] ([@webmozart]) which has then
5276[ Bernhard Schussek ] : https://webmozart.io/
5377[ @webmozart ] : https://twitter.com/webmozart
5478[ humbug ] : https://github.com/humbug
79+ [ bamarni/composer-bin-plugin ] : https://github.com/bamarni/composer-bin-plugin
0 commit comments