diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 91b24d77..b98253fc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,4 +20,7 @@ jobs: uses: SymfonyCasts/.github/.github/workflows/php-cs-fixer.yaml@main sca: - uses: SymfonyCasts/.github/.github/workflows/psalm.yaml@main + uses: SymfonyCasts/.github/.github/workflows/phpstan.yaml@main + with: + php: 8.3 + install-phpunit-bridge: true diff --git a/composer.json b/composer.json index 1127e5f2..ebe7c334 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ "symfony/framework-bundle": "^5.4 | ^6.0 | ^7.0", "symfony/phpunit-bridge": "^5.4 | ^6.0 | ^7.0", "doctrine/doctrine-bundle": "^2.8", - "doctrine/annotations": "^1.0" + "doctrine/annotations": "^1.0", + "phpstan/phpstan": "^1.11.x-dev" }, "autoload": { "psr-4": { @@ -28,5 +29,8 @@ "psr-4": { "SymfonyCasts\\Bundle\\ResetPassword\\Tests\\": "tests/" } + }, + "scripts": { + "phpstan": "vendor/bin/phpstan" } } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 00000000..55179011 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,46 @@ +parameters: + ignoreErrors: + - + message: "#^Property SymfonyCasts\\\\Bundle\\\\ResetPassword\\\\Command\\\\ResetPasswordRemoveExpiredCommand\\:\\:\\$cleaner has no type specified\\.$#" + count: 1 + path: src/Command/ResetPasswordRemoveExpiredCommand.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeParentInterface\\:\\:integerNode\\(\\)\\.$#" + count: 1 + path: src/DependencyInjection/Configuration.php + + - + message: "#^Property SymfonyCasts\\\\Bundle\\\\ResetPassword\\\\Exception\\\\TooManyPasswordRequestsException\\:\\:\\$availableAt has no type specified\\.$#" + count: 1 + path: src/Exception/TooManyPasswordRequestsException.php + + - + message: "#^Method SymfonyCasts\\\\Bundle\\\\ResetPassword\\\\Model\\\\ResetPasswordToken\\:\\:getExpirationMessageData\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Model/ResetPasswordToken.php + + - + message: "#^Property SymfonyCasts\\\\Bundle\\\\ResetPassword\\\\ResetPasswordHelper\\:\\:\\$repository has no type specified\\.$#" + count: 1 + path: src/ResetPasswordHelper.php + + - + message: "#^Property SymfonyCasts\\\\Bundle\\\\ResetPassword\\\\ResetPasswordHelper\\:\\:\\$resetPasswordCleaner has no type specified\\.$#" + count: 1 + path: src/ResetPasswordHelper.php + + - + message: "#^Property SymfonyCasts\\\\Bundle\\\\ResetPassword\\\\ResetPasswordHelper\\:\\:\\$tokenGenerator has no type specified\\.$#" + count: 1 + path: src/ResetPasswordHelper.php + + - + message: "#^PHPDoc tag @param references unknown parameter\\: \\$resetRequestLifetime$#" + count: 1 + path: src/ResetPasswordHelperInterface.php + + - + message: "#^Property SymfonyCasts\\\\Bundle\\\\ResetPassword\\\\Util\\\\ResetPasswordCleaner\\:\\:\\$repository has no type specified\\.$#" + count: 1 + path: src/Util/ResetPasswordCleaner.php diff --git a/phpstan.dist.neon b/phpstan.dist.neon new file mode 100644 index 00000000..140e3355 --- /dev/null +++ b/phpstan.dist.neon @@ -0,0 +1,11 @@ +includes: + - phpstan-baseline.neon +parameters: + level: 6 + bootstrapFiles: + - vendor/autoload.php + paths: + - src + #- tests +# excludePaths: +# ignoreErrors: diff --git a/psalm.xml b/psalm.xml deleted file mode 100644 index c8a05478..00000000 --- a/psalm.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -