@@ -8,16 +8,16 @@ Checks if the `vendor/` directory is consistent with project's `composer.lock` (
88## About
99For small teams can be difficult to cooperate and keep ` /vendor ` directory synchronized with requirements
1010in ` composer.json ` . Your colleagues can be a junior or can be not accustomed to right use the Composer and often forgot
11- to call ` composer install ` before running the App.
11+ to call ` composer install ` before running the App after update code from remote .
1212
1313You can force refresh Composer via git-hooks, but it requires careful preparation on each developer station.
14- In other way you can push all ` /vendor ` into your repo, but it's very very dirty way. Don't do it!
14+ In other way you can push whole ` /vendor ` into your repo, but it's very very dirty way. Don't do it!
1515
1616Or… just add this package to you project. It checks if you ` /vendor ` is consistent with project and can
1717notify you and your colleagues to forgotten refresh it.
1818
1919## Usage
20- Add this package to project as dev-dependency:
20+ Add this package to project ** as dev-dependency** :
2121``` shell
2222composer require --dev jakubboucek/composer-consistency
2323```
@@ -27,7 +27,7 @@ In your app just call `validate()` method:
2727ComposerConsistency::rootDir(__DIR__)->validate();
2828```
2929
30- When ` /vendor ` is not consistent with ` composer.json ` , checker throws an Exception.
30+ When ` /vendor ` directory is not consistent with ` composer.json ` , checker throws an Exception.
3131
3232![ Exception from Checker] ( https://cdn.jakub-boucek.cz/screenshot/190703-jptvw.png )
3333
@@ -45,7 +45,7 @@ ComposerConsistency::rootDir(__DIR__)
4545usually root directory od project.
4646- ** Vendor dir** - directory which contains Composer's ` autoload.php ` file.
4747
48- By default checker is assumes Verdor dir at ` vendor/ ` from root dir, you can change by method ` vendorDir() ` .
48+ By default, checker is assumes Verdor dir at ` vendor/ ` from root dir, you can change by method ` vendorDir() ` .
4949
5050``` php
5151ComposerConsistency::rootDir(__DIR__)
@@ -58,16 +58,15 @@ When checker detects incosistence, it throws `ComposerInconsitencyException`.
5858
5959You can change exception throwing to emit user error by method ` errorMode($severity) ` where ` $severity ` is Severity of
6060emitted error, default is ` E_USER_ERROR ` , you can change it to any of ` E_USER ` family severity
61- ([ read more] ( https://www.php.net/manual/en/function.trigger-error.php#refsect1-function.trigger-error-parameters ) ).
61+ ([ read more] ( https://www.php.net/manual/en/function.trigger-error.php#refsect1-function.trigger-error-parameters ) ):
6262
6363``` php
6464ComposerConsistency::rootDir(__DIR__)
6565 ->errorMode(E_USER_WARNING)
6666 ->validate();
6767```
6868
69- Also you can disable checking by ` errorMode(false) ` – that's cause to completelly disable checking.
70-
69+ Also, you can disable checking by ` errorMode(false) ` – that's cause to completelly disable checking:
7170``` php
7271ComposerConsistency::rootDir(__DIR__)
7372 ->errorMode(false)
@@ -94,9 +93,9 @@ is unable to load this package too,
9493in Composer's file system.
9594
9695### Cache
97- Checking vendor consistency on every request consume unnecessarily huge CPU power. Ceche is store last success check
98- only check is composer files stay without change . It does not check consincy of packages until these files keep same
99- content . Default value: ` off ` .
96+ Checking ` / vendor` consistency on every request consume unnecessarily huge CPU power. Cache is storing last success
97+ validation result . It does not more check consistency until these files keep same content. It requires a path to
98+ temporary directory for saving necessary files . Default value: ` off ` .
10099
101100``` php
102101ComposerConsistency::rootDir(__DIR__)
@@ -107,7 +106,7 @@ ComposerConsistency::rootDir(__DIR__)
107106### Froze mode
108107Checking vendor consistency on every request consume unnecessarily huge CPU power. Froze mode is usable when you
109108guarantee the deploy process to production is always purge the temp directory. It requires a path to temporary directory
110- for saving necessary files. Default value: ` off ` .
109+ for saving necessary files. Recommended in production environment. Default value: ` off ` .
111110
112111``` php
113112ComposerConsistency::rootDir(__DIR__)
@@ -116,5 +115,4 @@ ComposerConsistency::rootDir(__DIR__)
116115```
117116
118117In Froze mode is vendor consistenty checked only once, then is state saved to temp directory and
119- no more checks are performed until is temp directory purged. It requires a path to temporary directory
120- for saving necessary files. Default value: ` off ` .
118+ no more checks are performed until is temp directory purged. Difference
0 commit comments