Skip to content

[ci] replace psalm with phpstan #289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -28,5 +29,8 @@
"psr-4": {
"SymfonyCasts\\Bundle\\ResetPassword\\Tests\\": "tests/"
}
},
"scripts": {
"phpstan": "vendor/bin/phpstan"
}
}
46 changes: 46 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
includes:
- phpstan-baseline.neon
parameters:
level: 6
bootstrapFiles:
- vendor/autoload.php
paths:
- src
#- tests
# excludePaths:
# ignoreErrors:
62 changes: 0 additions & 62 deletions psalm.xml

This file was deleted.

Loading