diff --git a/.gitignore b/.gitignore index c1e069c..4a3058f 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,8 @@ /public/assets/ /assets/vendor/ ###< symfony/asset-mapper ### + +###> php-cs-fixer/shim ### +/.php-cs-fixer.php +/.php-cs-fixer.cache +###< php-cs-fixer/shim ### diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 0000000..3788194 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,13 @@ +in(__DIR__) + ->exclude('var') +; + +return (new PhpCsFixer\Config()) + ->setRules([ + '@Symfony' => true, + ]) + ->setFinder($finder) +; diff --git a/composer.json b/composer.json index abe228a..8cd40ce 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,7 @@ "doctrine/doctrine-bundle": "^2.12", "doctrine/doctrine-migrations-bundle": "^3.3", "doctrine/orm": "^3.2", + "php-cs-fixer/shim": "^3.60", "phpdocumentor/reflection-docblock": "^5.4", "phpstan/phpdoc-parser": "^1.29", "symfony/asset": "7.1.*", diff --git a/composer.lock b/composer.lock index 459cef8..eac7bbc 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": "3aa6efbb754ccfee8f386f7b0ee73bb4", + "content-hash": "b95d0b47b3e17a42fc155c872f77daee", "packages": [ { "name": "composer/semver", @@ -1477,6 +1477,58 @@ ], "time": "2024-06-28T09:40:51+00:00" }, + { + "name": "php-cs-fixer/shim", + "version": "v3.60.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/shim.git", + "reference": "11f328afa9768eed89bacffab02f56263185058c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/11f328afa9768eed89bacffab02f56263185058c", + "reference": "11f328afa9768eed89bacffab02f56263185058c", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "replace": { + "friendsofphp/php-cs-fixer": "self.version" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer", + "php-cs-fixer.phar" + ], + "type": "application", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz RumiƄski", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "support": { + "issues": "https://github.com/PHP-CS-Fixer/shim/issues", + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.60.0" + }, + "time": "2024-07-25T09:27:32+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "2.2.0", diff --git a/symfony.lock b/symfony.lock index c3b74f1..8d511c8 100644 --- a/symfony.lock +++ b/symfony.lock @@ -26,6 +26,18 @@ "migrations/.gitignore" ] }, + "php-cs-fixer/shim": { + "version": "3.60", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "3.0", + "ref": "16422bf8eac6c3be42afe07d37e2abc89d2bdf6b" + }, + "files": [ + ".php-cs-fixer.dist.php" + ] + }, "phpunit/phpunit": { "version": "9.6", "recipe": {