Skip to content

Commit cd15bc3

Browse files
committed
Update README
1 parent 87781b4 commit cd15bc3

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@
1010
With the tooly [composer-script](https://getcomposer.org/doc/articles/scripts.md) aka hook you can manage needed phar files, such as phpunit, in your composer.json.
1111
Every phar file will be saved in the [composer binary directory](https://getcomposer.org/doc/articles/vendor-binaries.md).
1212

13+
## Why
14+
15+
Because of dependency-encapsulation! An example. You have a symfony application with a lot of commands and
16+
want to use the [php7cc](https://github.com/sstalle/php7cc) as an composer dev requirement.
17+
18+
Add this to your composer.json file and you are perhaps in a dependency hell.
19+
Because your symfony app needs the symfony console component in version x and php7cc in version y.
20+
21+
That is the situation you should use phar's for developing.
22+
1323
## Example
1424

1525
For an quick example look at the [composer.json](composer.json#L48-L57) here.
@@ -73,6 +83,11 @@ the existing phar if the remote and local phar has not the same checksum.
7383
The *"only-dev"* parameter is optional. Its default true and means that this phar is only needed in developing mode.
7484
So the command ```composer [install|update] --no-dev``` ignores this phar tool.
7585

86+
## A note to PhpStorm or other IDE users
87+
88+
To furthermore have auto-suggestion you should set the "include_path" option in the project.
89+
![PhpStorm setting](resources/phpstorm-setting.png|width=600)
90+
7691
## Contributing
7792

7893
Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for information on how to contribute.

resources/phpstorm-setting.png

117 KB
Loading

0 commit comments

Comments
 (0)