Skip to content

Commit

Permalink
Fix PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaudaj committed Jul 14, 2023
1 parent 4b214b2 commit b923f98
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 43 deletions.
18 changes: 18 additions & 0 deletions tests/php/phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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: '#.*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
19 changes: 2 additions & 17 deletions tests/php/phpstan_1.7.8.9.dist.neon
Original file line number Diff line number Diff line change
@@ -1,23 +1,8 @@
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 \$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/phsptan.dist.neon
17 changes: 4 additions & 13 deletions tests/php/phpstan_8.0.0.dist.neon
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
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: '#.*Doctrine\\Persistence\\Event\\LifecycleEventArgs but does not specify its types\: TObjectManager.*#'
path: %currentWorkingDirectory%/src/EventListener/BlockGroupHooksUpdater.php
reportUnmatchedIgnoredErrors: true
level: 8
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

includes:
- %currentWorkingDirectory%/tests/php/.phpstan_bootstrap.neon
- %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon
- %currentWorkingDirectory%/tests/php/phpstan.dist.neon

17 changes: 4 additions & 13 deletions tests/php/phpstan_latest.dist.neon
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
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: '#.*Doctrine\\Persistence\\Event\\LifecycleEventArgs but does not specify its types\: TObjectManager.*#'
path: %currentWorkingDirectory%/src/EventListener/BlockGroupHooksUpdater.php
reportUnmatchedIgnoredErrors: true
level: 8
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

includes:
- %currentWorkingDirectory%/tests/php/.phpstan_bootstrap.neon
- %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon
- %currentWorkingDirectory%/tests/php/phpstan.dist.neon

0 comments on commit b923f98

Please sign in to comment.