Skip to content
This repository was archived by the owner on Oct 7, 2022. It is now read-only.

Commit 45a49cf

Browse files
committed
Readme: Fix typos
1 parent 421aed8 commit 45a49cf

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ For small teams can be difficult to cooperate and keep `/vendor` directory synch
88
in `composer.json`. Your colleagues can be a junior or can be not accustomed to right use the Composer.
99

1010
You 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

1313
Or… just add this package to you project. It checks if you `/vendor` is consistent with project and can
1414
notify you and your colleagues to forgotten refresh.
@@ -21,9 +21,6 @@ composer require --dev jakubboucek/composer-consistency
2121

2222
In your app just call `validate()` method:
2323
```php
24-
<?php
25-
use JakubBoucek\ComposerConsistency\ComposerConsistency;
26-
2724
ComposerConsistency::rootDir(__DIR__)->validate();
2825
```
2926

@@ -36,7 +33,7 @@ When `/vendor` is not consistent with `composer.json`, checker throws an Excepti
3633
```php
3734
use 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.
4845
By 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

6966
Also 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

8178
Turn 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
9794
Checking vendor consistency on every request consume unnecessarily huge CPU power. Ceche is store last success check
9895
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+
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
108105
Checking 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

117115
In 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`.

src/ComposerConsistency.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function validate(): void
104104
$this->cache->invalidate($this->getFileNames());
105105
}
106106

107-
$error = 'Composer has no consistent vendor directory with project requirements, call `composer install`';
107+
$error = "Composer has no consistent 'vendor/' directory with project requirements, call `composer install`";
108108
if (in_array($this->errorMode, self::ALLOWED_ERROR_SEVERITY, true)) {
109109
trigger_error($error, $this->errorMode);
110110
} else {

0 commit comments

Comments
 (0)