diff --git a/composer.json b/composer.json index 04c2cad..48ba4cb 100644 --- a/composer.json +++ b/composer.json @@ -76,10 +76,12 @@ "@composer exec -- php-cs-fixer fix --dry-run --diff" ], "test": [ + "@phpstan:smoke", "@phpstan", "@phpunit" ], "test:ci": [ + "@phpstan:smoke", "@phpstan:ci", "@phpunit" ], @@ -87,6 +89,7 @@ "phpunit:coverage": "@composer exec -- phpunit --coverage-clover coverage.xml", "phpstan": "@composer exec -- phpstan --memory-limit=256M", "phpstan:ci": "@composer exec -- phpstan --memory-limit=256M --no-progress --error-format=github", + "phpstan:smoke": "@composer exec -- phpstan --memory-limit=256M --no-progress --configuration=tests/smoke/phpstan-smoke.neon.dist", "rector": [ "@composer exec -- rector", "@lint" diff --git a/rules.neon b/rules.neon index 155872e..94c45c9 100644 --- a/rules.neon +++ b/rules.neon @@ -7,6 +7,7 @@ parametersSchema: ])) ]) attributeRequirements: structure([ + excludedClasses: listOf(string()) attributeDefinitions: listOf(structure([ attribute: string() requires: listOf(string()) diff --git a/tests/smoke/fixture.php b/tests/smoke/fixture.php new file mode 100644 index 0000000..c1fbde9 --- /dev/null +++ b/tests/smoke/fixture.php @@ -0,0 +1,13 @@ + + * @copyright Copyright (c) 2025-2026 IWF Web Solutions + * @license https://github.com/iwf-web/phpstan-rules/blob/main/LICENSE.txt MIT License + * @link https://github.com/iwf-web/phpstan-rules + */ +// Minimal fixture analysed by the smoke phpstan run. Its only purpose is to +// trigger PHPStan's schema validation against rules.neon during container boot. diff --git a/tests/smoke/phpstan-smoke.neon.dist b/tests/smoke/phpstan-smoke.neon.dist new file mode 100644 index 0000000..9f8b3bc --- /dev/null +++ b/tests/smoke/phpstan-smoke.neon.dist @@ -0,0 +1,7 @@ +includes: + - ../../rules.neon + +parameters: + level: 0 + paths: + - fixture.php