@@ -8,7 +8,7 @@ For small teams can be difficult to cooperate and keep `/vendor` directory synch
88in ` composer.json ` . Your colleagues can be a junior or can be not accustomed to right use the Composer.
99
1010You can force refresh Composer via git-hooks, but it requires careful preparation on each developer station.
11- You can push all ` /vendor ` into your repo, but it's very very dirty way. Don't do it!
11+ In other way you can push all ` /vendor ` into your repo, but it's very very dirty way. Don't do it!
1212
1313Or… just add this package to you project. It checks if you ` /vendor ` is consistent with project and can
1414notify you and your colleagues to forgotten refresh.
@@ -21,9 +21,6 @@ composer require --dev jakubboucek/composer-consistency
2121
2222In your app just call ` validate() ` method:
2323``` php
24- <?php
25- use JakubBoucek\ComposerConsistency\ComposerConsistency;
26-
2724ComposerConsistency::rootDir(__DIR__)->validate();
2825```
2926
@@ -36,7 +33,7 @@ When `/vendor` is not consistent with `composer.json`, checker throws an Excepti
3633``` php
3734use JakubBoucek\ComposerConsistency\ComposerConsistency;
3835
39- \JakubBoucek\ComposerConsistency\ ComposerConsistency::rootDir(__DIR__)
36+ ComposerConsistency::rootDir(__DIR__)
4037 ->validate();
4138```
4239
@@ -48,7 +45,7 @@ usually root directory od project.
4845By default checker is assumes Verdor dir at ` vendor/ ` from root dir, you can change by method ` vendorDir() ` .
4946
5047``` php
51- \JakubBoucek\ComposerConsistency\ ComposerConsistency::rootDir(__DIR__)
48+ ComposerConsistency::rootDir(__DIR__)
5249 ->vendorDir(__DIR__ . '/../vendor')
5350 ->validate();
5451```
@@ -61,15 +58,15 @@ emitted error, default is `E_USER_ERROR`, you can change it to any of `E_USER` f
6158([ read more] ( https://www.php.net/manual/en/function.trigger-error.php#refsect1-function.trigger-error-parameters ) ).
6259
6360``` php
64- \JakubBoucek\ComposerConsistency\ ComposerConsistency::rootDir(__DIR__)
61+ ComposerConsistency::rootDir(__DIR__)
6562 ->errorMode(E_USER_WARNING)
6663 ->validate();
6764```
6865
6966Also you can disable checking by ` errorMode(false) ` – that's cause to completelly disable checking.
7067
7168``` php
72- \JakubBoucek\ComposerConsistency\ ComposerConsistency::rootDir(__DIR__)
69+ ComposerConsistency::rootDir(__DIR__)
7370 ->errorMode(false)
7471 ->validate();
7572```
@@ -80,7 +77,7 @@ compute vendor consistency. Default value: `off`.
8077
8178Turn on Strict mode:
8279``` php
83- \JakubBoucek\ComposerConsistency\ ComposerConsistency::rootDir(__DIR__)
80+ ComposerConsistency::rootDir(__DIR__)
8481 ->strict()
8582 ->validate();
8683```
@@ -96,23 +93,25 @@ in Composer's file system.
9693### Cache
9794Checking vendor consistency on every request consume unnecessarily huge CPU power. Ceche is store last success check
9895only 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+ content. Default value: ` off ` .
10097
10198``` php
102- \JakubBoucek\ComposerConsistency\ ComposerConsistency::rootDir(__DIR__)
99+ ComposerConsistency::rootDir(__DIR__)
103100 ->cache(__DIR__ . '/temp')
104101 ->validate();
105102```
106103
107104### Froze mode
108105Checking vendor consistency on every request consume unnecessarily huge CPU power. Froze mode is usable when you
109- guarantee the deploy process to production is always purge the temp directory. Default value: off.
106+ guarantee the deploy process to production is always purge the temp directory. It requires a path to temporary directory
107+ for saving necessary files. Default value: ` off ` .
110108
111109``` php
112- \JakubBoucek\ComposerConsistency\ ComposerConsistency::rootDir(__DIR__)
110+ ComposerConsistency::rootDir(__DIR__)
113111 ->froze(__DIR__ . '/temp')
114112 ->validate();
115113```
116114
117115In Froze mode is vendor consistenty checked only once, then is state saved to temp directory and
118- no more checks are performed until is temp directory purged.
116+ no more checks are performed until is temp directory purged. It requires a path to temporary directory
117+ for saving necessary files. Default value: ` off ` .
0 commit comments