Browse Source

CI: use phpstan-symfony (#8287)

Dariusz Rumiński 3 months ago
parent
commit
922305090f
3 changed files with 41 additions and 2 deletions
  1. 2 1
      dev-tools/composer.json
  2. 38 1
      dev-tools/composer.lock
  3. 1 0
      src/RuleSet/RuleSets.php

+ 2 - 1
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": {

+ 38 - 1
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",

+ 1 - 0
src/RuleSet/RuleSets.php

@@ -38,6 +38,7 @@ final class RuleSets
 
             foreach (Finder::create()->files()->in(__DIR__.'/Sets') as $file) {
                 $class = 'PhpCsFixer\RuleSet\Sets\\'.$file->getBasename('.php');
+
                 /** @var RuleSetDescriptionInterface */
                 $set = new $class();