From dd0316133a4031c995df585325189b24b03937b4 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sun, 24 May 2026 22:34:30 +0700 Subject: [PATCH] [QA] Add StructArmed to QA --- .gitattributes | 1 + .github/workflows/code_analysis.yaml | 4 ++++ composer.json | 3 ++- .../PrePromotedTest.php | 2 +- .../Source/TwigExtension.php | 10 ---------- .../Source/TwigFilterMethod.php | 10 ---------- .../Source/TwigFunctionMethod.php | 10 ---------- .../Source/TwigSimpleFilter.php | 10 ---------- .../Source/TwigSimpleFunction.php | 10 ---------- structarmed.php | 9 +++++++++ 10 files changed, 17 insertions(+), 52 deletions(-) delete mode 100644 rules-tests/Twig134/Rector/Return_/SimpleFunctionAndFilterRector/Source/TwigExtension.php delete mode 100644 rules-tests/Twig134/Rector/Return_/SimpleFunctionAndFilterRector/Source/TwigFilterMethod.php delete mode 100644 rules-tests/Twig134/Rector/Return_/SimpleFunctionAndFilterRector/Source/TwigFunctionMethod.php delete mode 100644 rules-tests/Twig134/Rector/Return_/SimpleFunctionAndFilterRector/Source/TwigSimpleFilter.php delete mode 100644 rules-tests/Twig134/Rector/Return_/SimpleFunctionAndFilterRector/Source/TwigSimpleFunction.php create mode 100644 structarmed.php diff --git a/.gitattributes b/.gitattributes index 9e7b1a009..bd650c549 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,3 +9,4 @@ stubs export-ignore tests export-ignore rules-tests export-ignore rector.php export-ignore +structarmed.php export-ignore diff --git a/.github/workflows/code_analysis.yaml b/.github/workflows/code_analysis.yaml index ae06c8ca9..5dbf68630 100644 --- a/.github/workflows/code_analysis.yaml +++ b/.github/workflows/code_analysis.yaml @@ -36,6 +36,10 @@ jobs: name: 'Tests' run: vendor/bin/phpunit + - + name: 'Run StructArmed' + run: vendor/bin/structarmed analyze + name: ${{ matrix.actions.name }} runs-on: ubuntu-latest diff --git a/composer.json b/composer.json index 7233ff042..f1a568d59 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ "ext-xml": "*" }, "require-dev": { - "symplify/easy-coding-standard": "^13.0.4", + "boundwize/structarmed": "^0.7.7", "phpstan/extension-installer": "^1.4", "phpstan/phpstan": "^2.1.32", "phpstan/phpstan-deprecation-rules": "^2.0", @@ -26,6 +26,7 @@ "symfony/security-http": "^6.4", "symfony/validator": "^6.4", "symfony/web-link": "^6.4", + "symplify/easy-coding-standard": "^13.0.4", "symplify/phpstan-extensions": "^12.0", "symplify/phpstan-rules": "^14.9", "symplify/vendor-patches": "^11.5", diff --git a/rules-tests/CodeQuality/Rector/Class_/ControllerMethodInjectionToConstructorRector/PrePromotedTest.php b/rules-tests/CodeQuality/Rector/Class_/ControllerMethodInjectionToConstructorRector/PrePromotedTest.php index 37d6c62e6..2b3730ceb 100644 --- a/rules-tests/CodeQuality/Rector/Class_/ControllerMethodInjectionToConstructorRector/PrePromotedTest.php +++ b/rules-tests/CodeQuality/Rector/Class_/ControllerMethodInjectionToConstructorRector/PrePromotedTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace CodeQuality\Rector\Class_\ControllerMethodInjectionToConstructorRector; +namespace Rector\Symfony\Tests\CodeQuality\Rector\Class_\ControllerMethodInjectionToConstructorRector; use Iterator; use PHPUnit\Framework\Attributes\DataProvider; diff --git a/rules-tests/Twig134/Rector/Return_/SimpleFunctionAndFilterRector/Source/TwigExtension.php b/rules-tests/Twig134/Rector/Return_/SimpleFunctionAndFilterRector/Source/TwigExtension.php deleted file mode 100644 index adb0b763d..000000000 --- a/rules-tests/Twig134/Rector/Return_/SimpleFunctionAndFilterRector/Source/TwigExtension.php +++ /dev/null @@ -1,10 +0,0 @@ -withPreset(Preset::PSR4());