diff --git a/tests/php/phpstan.dist.neon b/tests/php/phpstan.dist.neon new file mode 100644 index 0000000..8047cd5 --- /dev/null +++ b/tests/php/phpstan.dist.neon @@ -0,0 +1,14 @@ +parameters: + paths: + # We consider that the extension file will be stored the folder test/phpstan + # From Phpstan 0.12, paths are relative to the .neon file. + - %currentWorkingDirectory%/src + - %currentWorkingDirectory%/kjblocks.php + excludePaths: + - %currentWorkingDirectory%/src/Grid/Position + reportUnmatchedIgnoredErrors: true + level: 8 + +includes: + - %currentWorkingDirectory%/tests/php/.phpstan_bootstrap.neon + - %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon diff --git a/tests/php/phpstan_1.7.8.9.dist.neon b/tests/php/phpstan_1.7.8.9.dist.neon index 029ae0f..47e75a0 100644 --- a/tests/php/phpstan_1.7.8.9.dist.neon +++ b/tests/php/phpstan_1.7.8.9.dist.neon @@ -1,23 +1,11 @@ parameters: - paths: - # We consider that the extension file will be stored the folder test/phpstan - # From Phpstan 0.12, paths are relative to the .neon file. - - %currentWorkingDirectory%/src - - %currentWorkingDirectory%/kjblocks.php - excludePaths: - - %currentWorkingDirectory%/src/Grid/Position ignoreErrors: + - + message: '#^Negated boolean expression is always false.$#' + path: %currentWorkingDirectory%/src/Block.php - - message: "#^Parameter \#1 \$characterCleaner of class PrestaShop\\PrestaShop\\Core\\ConstraintValidator\\TypedRegexValidator - constructor expects PrestaShop\\PrestaShop\\Core\\String\\CharacterCleaner, PrestaShop\\PrestaShop\\Adapter\\Configuration - given\.$#" + message: '#^Parameter \#1 \$characterCleaner of class PrestaShop\\PrestaShop\\Core\\ConstraintValidator\\TypedRegexValidator constructor expects PrestaShop\\PrestaShop\\Core\\String\\CharacterCleaner, PrestaShop\\PrestaShop\\Adapter\\Configuration given\.$#' path: %currentWorkingDirectory%/src/Constraint/ConstraintValidatorFactory.php - - - message: '#.*Doctrine\\Persistence\\Event\\LifecycleEventArgs but does not specify its types\: TObjectManager.*#' - path: %currentWorkingDirectory%/src/EventListener/BlockGroupHooksUpdater.php - reportUnmatchedIgnoredErrors: true - level: 8 includes: - - %currentWorkingDirectory%/tests/php/.phpstan_bootstrap.neon - - %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon + - %currentWorkingDirectory%/tests/php/phpstan.dist.neon diff --git a/tests/php/phpstan_8.0.0.dist.neon b/tests/php/phpstan_8.0.0.dist.neon index 363918a..3a60c64 100644 --- a/tests/php/phpstan_8.0.0.dist.neon +++ b/tests/php/phpstan_8.0.0.dist.neon @@ -1,18 +1,12 @@ parameters: - paths: - # We consider that the extension file will be stored the folder test/phpstan - # From Phpstan 0.12, paths are relative to the .neon file. - - %currentWorkingDirectory%/src - - %currentWorkingDirectory%/kjblocks.php - excludePaths: - - %currentWorkingDirectory%/src/Grid/Position ignoreErrors: - + message: '#^Parameter \#1 \$configuration of class PrestaShop\\PrestaShop\\Core\\ConstraintValidator\\TypedRegexValidator constructor expects PrestaShop\\PrestaShop\\Core\\ConfigurationInterface, PrestaShop\\PrestaShop\\Core\\String\\CharacterCleaner given\.$#' + path: %currentWorkingDirectory%/src/Constraint/ConstraintValidatorFactory.php + - message: '#.*Doctrine\\Persistence\\Event\\LifecycleEventArgs but does not specify its types\: TObjectManager.*#' path: %currentWorkingDirectory%/src/EventListener/BlockGroupHooksUpdater.php - reportUnmatchedIgnoredErrors: true - level: 8 includes: - - %currentWorkingDirectory%/tests/php/.phpstan_bootstrap.neon - - %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon + - %currentWorkingDirectory%/tests/php/phpstan.dist.neon + diff --git a/tests/php/phpstan_latest.dist.neon b/tests/php/phpstan_latest.dist.neon index 363918a..3a60c64 100644 --- a/tests/php/phpstan_latest.dist.neon +++ b/tests/php/phpstan_latest.dist.neon @@ -1,18 +1,12 @@ parameters: - paths: - # We consider that the extension file will be stored the folder test/phpstan - # From Phpstan 0.12, paths are relative to the .neon file. - - %currentWorkingDirectory%/src - - %currentWorkingDirectory%/kjblocks.php - excludePaths: - - %currentWorkingDirectory%/src/Grid/Position ignoreErrors: - + message: '#^Parameter \#1 \$configuration of class PrestaShop\\PrestaShop\\Core\\ConstraintValidator\\TypedRegexValidator constructor expects PrestaShop\\PrestaShop\\Core\\ConfigurationInterface, PrestaShop\\PrestaShop\\Core\\String\\CharacterCleaner given\.$#' + path: %currentWorkingDirectory%/src/Constraint/ConstraintValidatorFactory.php + - message: '#.*Doctrine\\Persistence\\Event\\LifecycleEventArgs but does not specify its types\: TObjectManager.*#' path: %currentWorkingDirectory%/src/EventListener/BlockGroupHooksUpdater.php - reportUnmatchedIgnoredErrors: true - level: 8 includes: - - %currentWorkingDirectory%/tests/php/.phpstan_bootstrap.neon - - %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon + - %currentWorkingDirectory%/tests/php/phpstan.dist.neon +