mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 07:41:43 +03:00
Add php-cs-fixer
This commit is contained in:
parent
5bad727da1
commit
cb69478c78
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -40,5 +40,8 @@ jobs:
|
||||
- name: Validate composer
|
||||
run: composer validate --strict --no-check-lock
|
||||
|
||||
- name: "Run code-style check"
|
||||
run: vendor/bin/php-cs-fixer fix --dry-run --config=.php-cs-fixer.dist.php --using-cache=no --show-progress=none -v
|
||||
|
||||
- name: Run tests
|
||||
run: vendor/bin/phpunit
|
||||
|
11
.php-cs-fixer.dist.php
Normal file
11
.php-cs-fixer.dist.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in(__DIR__)
|
||||
;
|
||||
|
||||
return Retailcrm\PhpCsFixer\Defaults::rules()
|
||||
->setFinder($finder)
|
||||
->setCacheFile(__DIR__ . '/.php_cs.cache');
|
3
Makefile
3
Makefile
@ -10,6 +10,9 @@ vendor: composer.json
|
||||
@$(PHP) composer install -o -n --no-ansi
|
||||
@touch vendor || true
|
||||
|
||||
php-cs: $(PHP_CONSOLE_DEPS)
|
||||
@$(PHP) vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --using-cache=no -v
|
||||
|
||||
phpunit: $(PHP_CONSOLE_DEPS)
|
||||
@$(PHP) vendor/bin/phpunit --color=always
|
||||
|
||||
|
@ -24,10 +24,12 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/annotations": "^1.0",
|
||||
"friendsofphp/php-cs-fixer": "^3",
|
||||
"friendsofsymfony/rest-bundle": "^3.7",
|
||||
"jms/serializer": "^3.15",
|
||||
"jms/serializer-bundle": "^4.1|^5.4",
|
||||
"phpunit/phpunit": "~9.5",
|
||||
"retailcrm/php-code-style": "^1",
|
||||
"symfony/asset": "^5.0|^6.0",
|
||||
"symfony/browser-kit": "^5.0|^6.0",
|
||||
"symfony/translation": "^5.0|^6.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user