Skip to content

Commit 3509b66

Browse files
committed
Fix composer scripts
1 parent 0b63daf commit 3509b66

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
run: composer install --prefer-source --optimize-autoloader --ansi --no-interaction
3939
- name: Check coding style
4040
if: matrix.os == 'ubuntu-latest' && matrix.php-version == '7.2'
41-
run: ./vendor/bin/php-cs-fixer fix --path-mode=intersection --config=./.php_cs.dist --dry-run --using-cache=no --diff --diff-format=udiff --ansi --no-interaction .
41+
run: composer run cs-check -- --using-cache=no --no-interaction
4242
- name: Run Atoum
4343
run: php ./vendor/atoum/atoum/scripts/coverage.php --format xml --output clover.xml
4444
- name: Install Composer dependencies (excluding dev)

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,16 @@ To ensure a consistent code base, you should make sure the code follows
136136
the [PSR-1](http://www.php-fig.org/psr/psr-1/) and
137137
[PSR-2](http://www.php-fig.org/psr/psr-2/) coding standards.
138138

139-
To avoid CS issues, you should use [php-cs-fixer](http://cs.sensiolabs.org/):
139+
To check CS issues, you can use the `cs-check` composer command:
140140

141141
```sh
142-
$ php-cs-fixer fix src/
142+
$ composer run cs-check
143+
```
144+
145+
To automatically fix CS issues, you can use the `cs-fix` composer command:
146+
147+
```sh
148+
$ composer run cs-fix
143149
```
144150

145151
Support

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@
5252
"discard-changes": true
5353
},
5454
"scripts": {
55-
"cs": "vendor/bin/php-cs-fixer --ansi fix --config=sf23",
56-
"test": "vendor/bin/atoum --force-terminal && vendor/bin/behat --suite pickle --colors"
55+
"cs-fix": "php-cs-fixer fix --path-mode=intersection --config=./.php_cs.dist --ansi .",
56+
"cs-check": "php-cs-fixer fix --path-mode=intersection --config=.php_cs.dist --ansi --dry-run --diff --diff-format=udiff .",
57+
"test": "atoum --force-terminal && ./vendor/bin/behat --suite pickle --colors"
5758
},
5859
"extra": {
5960
"patches": {

0 commit comments

Comments
 (0)