diff --git a/dev-tools/composer.json b/dev-tools/composer.json index 9df7afa3bb2..49cdc32a58a 100644 --- a/dev-tools/composer.json +++ b/dev-tools/composer.json @@ -11,7 +11,8 @@ "phpstan/extension-installer": "^1.4.3", "phpstan/phpstan": "^1.12.9", "phpstan/phpstan-phpunit": "^1.4.0", - "phpstan/phpstan-strict-rules": "^1.6.1" + "phpstan/phpstan-strict-rules": "^1.6.1", + "phpstan/phpstan-symfony": "^1.4.12" }, "config": { "allow-plugins": { diff --git a/dev-tools/composer.lock b/dev-tools/composer.lock index 0507482e8c6..f8d807a8791 100644 --- a/dev-tools/composer.lock +++ b/dev-tools/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": "8373eca2afcc6c66153b9974587a08fa", + "content-hash": "ddfe04f2abfc2101cd5c26816df8eae7", "packages": [ { "name": "composer-unused/contracts", @@ -850,6 +850,43 @@ ], "description": "Extra strict and opinionated rules for PHPStan" }, + { + "name": "phpstan/phpstan-symfony", + "version": "1.4.12", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-symfony.git", + "reference": "c7b7e7f520893621558bfbfdb2694d4364565c1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/c7b7e7f520893621558bfbfdb2694d4364565c1d", + "reference": "c7b7e7f520893621558bfbfdb2694d4364565c1d" + }, + "require": { + "ext-simplexml": "*", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.12" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon", + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "license": [ + "MIT" + ], + "description": "Symfony Framework extensions and rules for PHPStan" + }, { "name": "psr/container", "version": "2.0.2", diff --git a/src/RuleSet/RuleSets.php b/src/RuleSet/RuleSets.php index b419af4f14a..3f3aebe9bfd 100644 --- a/src/RuleSet/RuleSets.php +++ b/src/RuleSet/RuleSets.php @@ -38,6 +38,7 @@ public static function getSetDefinitions(): array foreach (Finder::create()->files()->in(__DIR__.'/Sets') as $file) { $class = 'PhpCsFixer\RuleSet\Sets\\'.$file->getBasename('.php'); + /** @var RuleSetDescriptionInterface */ $set = new $class();