diff --git a/composer.json b/composer.json index c4bbbd48..901be570 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "laravel/homestead": "^14.0", "barryvdh/laravel-debugbar": "^3.3", "laravel/ui": "^4.0", - "symplify/easy-coding-standard": "^11.0" + "symplify/easy-coding-standard": "^12.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 88391353..f56a72a7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "be27a87f8ab60a2670725ee6919e9254", + "content-hash": "477519c6513ad7a80080ea3e7a268146", "packages": [ { "name": "barryvdh/laravel-dompdf", @@ -8979,16 +8979,16 @@ }, { "name": "symplify/easy-coding-standard", - "version": "11.5.0", + "version": "12.0.8", "source": { "type": "git", "url": "https://github.com/easy-coding-standard/easy-coding-standard.git", - "reference": "1d2400f7bfe92e3754ce71f0782f2c0521bade3d" + "reference": "99d87d188acc712dd6655ee946569f823cfeff69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/1d2400f7bfe92e3754ce71f0782f2c0521bade3d", - "reference": "1d2400f7bfe92e3754ce71f0782f2c0521bade3d", + "url": "https://api.github.com/repos/easy-coding-standard/easy-coding-standard/zipball/99d87d188acc712dd6655ee946569f823cfeff69", + "reference": "99d87d188acc712dd6655ee946569f823cfeff69", "shasum": "" }, "require": { @@ -9021,7 +9021,7 @@ ], "support": { "issues": "https://github.com/easy-coding-standard/easy-coding-standard/issues", - "source": "https://github.com/easy-coding-standard/easy-coding-standard/tree/11.5.0" + "source": "https://github.com/easy-coding-standard/easy-coding-standard/tree/12.0.8" }, "funding": [ { @@ -9033,7 +9033,7 @@ "type": "github" } ], - "time": "2023-06-21T06:26:15+00:00" + "time": "2023-09-08T10:17:14+00:00" }, { "name": "theseer/tokenizer", @@ -9096,5 +9096,5 @@ "ext-json": "*" }, "platform-dev": [], - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/ecs.php b/ecs.php index 85a9144a..60e07446 100644 --- a/ecs.php +++ b/ecs.php @@ -3,25 +3,26 @@ declare(strict_types=1); use Symplify\EasyCodingStandard\Config\ECSConfig; -use Symplify\EasyCodingStandard\ValueObject\Option; use Symplify\EasyCodingStandard\ValueObject\Set\SetList; return static function (ECSConfig $config): void { - $config->import(SetList::COMMON); - $config->import(SetList::PSR_12); - $config->import(SetList::CLEAN_CODE); + $config->sets([ + SetList::COMMON, + SetList::PSR_12, + SetList::CLEAN_CODE, + ]); // need more fixers? Search them on: https://mlocati.github.io/php-cs-fixer-configurator - $services = $config->services(); - $services->set(PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer::class); - $services->set(PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer::class); - $services->set(PhpCsFixer\Fixer\PhpUnit\PhpUnitMethodCasingFixer::class); - $services->set(PhpCsFixer\Fixer\PhpUnit\PhpUnitSetUpTearDownVisibilityFixer::class); - $services->set(PhpCsFixer\Fixer\Whitespace\ArrayIndentationFixer::class); - $services->set(PhpCsFixer\Fixer\Alias\ArrayPushFixer::class); + $config->rules([ + PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer::class, + PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer::class, + PhpCsFixer\Fixer\PhpUnit\PhpUnitMethodCasingFixer::class, + PhpCsFixer\Fixer\PhpUnit\PhpUnitSetUpTearDownVisibilityFixer::class, + PhpCsFixer\Fixer\Whitespace\ArrayIndentationFixer::class, + PhpCsFixer\Fixer\Alias\ArrayPushFixer::class, + ]); - $parameters = $config->parameters(); - $parameters->set(Option::PATHS, [ + $config->paths([ __DIR__ . '/app/', __DIR__ . '/config/', __DIR__ . '/database/', @@ -31,7 +32,7 @@ __DIR__ . '/ecs.php', ]); - $parameters->set(Option::SKIP, [ + $config->skip([ PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer::class, ]); };