Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.gitattributes export-ignore
.gitignore export-ignore
.php-cs-fixer.php export-ignore
/.github export-ignore
/assets/src export-ignore
/assets/babel.config.js export-ignore
/assets/tsconfig.json export-ignore
/tests export-ignore
ecs.php export-ignore
demo.gif export-ignore
phpstan.neon export-ignore
phpstan-baseline.neon export-ignore
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/coding-standards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches: ['1.x']

jobs:
php-cs-fixer:
name: PHP CS Fixer (PHP ${{ matrix.php-version }})
easy-coding-standard:
name: Easy Coding Standard (PHP ${{ matrix.php-version }})
runs-on: ubuntu-24.04

strategy:
Expand All @@ -30,5 +30,5 @@ jobs:
- name: Install Composer dependencies
uses: ramsey/composer-install@v3

- name: Run PHP CS Fixer
run: 'vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr'
- name: Run Easy Coding Standard
run: 'vendor/bin/ecs --output-format=checkstyle | cs2pr'
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
/assets/yarn.lock
/var
/vendor
.php_cs.cache
.phpunit.result.cache
composer.lock
49 changes: 0 additions & 49 deletions .php-cs-fixer.php

This file was deleted.

8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@
"symfony/translation": "^6.4 || ^7.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.86.0",
"phpstan/phpstan": "^2.1.22",
"phpstan/phpstan-deprecation-rules": "^2.0.3",
"phpunit/phpunit": "^11.1.3",
"symfony/asset-mapper": "^6.4 || ^7.0",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/twig-bundle": "^6.4 || ^7.0"
"symfony/twig-bundle": "^6.4 || ^7.0",
"symplify/easy-coding-standard": "^12.5.24"
},
"scripts": {
"ci": [
"@cs:dry",
"@phpstan",
"@phpunit"
],
"cs:dry": "vendor/bin/php-cs-fixer fix --diff --dry-run --no-interaction --ansi",
"cs:fix": "vendor/bin/php-cs-fixer fix --ansi",
"cs:dry": "vendor/bin/ecs",
"cs:fix": "vendor/bin/ecs --fix",
"phpstan": "vendor/bin/phpstan analyse --ansi",
"phpunit": "vendor/bin/phpunit --coverage-html=var/html-coverage --colors=auto"
},
Expand Down
28 changes: 28 additions & 0 deletions ecs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

declare(strict_types=1);

use PhpCsFixer\Fixer\ControlStructure\NoUselessElseFixer;
use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer;
use PhpCsFixer\Fixer\ReturnNotation\NoUselessReturnFixer;
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
use PhpCsFixer\Fixer\Strict\StrictComparisonFixer;
use PhpCsFixer\Fixer\Strict\StrictParamFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;

return ECSConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withRootFiles()
->withRules([
NoUselessElseFixer::class,
NoUselessReturnFixer::class,
StrictComparisonFixer::class,
StrictParamFixer::class,
DeclareStrictTypesFixer::class,
NoUnusedImportsFixer::class,
])
->withPhpCsFixerSets(perCS20: true, symfonyRisky: true)
;