-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #1547 Upgrade to PHPStan 2 (rosier)
This PR was merged into the main branch. Discussion ---------- Upgrade to PHPStan 2 This PR: - Upgrades to PHPStan 2 - Adds a separate test job for PHPStan - Turns off the doctrine rules - Merges the config files phpstan.dist.neon and phpstan.neon.dist I disabled the doctrine rules because all the errors coming from this were basically ignored permanently anyway. I keep the config file phpstan.dist.neon from the recipe https://github.com/symfony/recipes-contrib/blob/main/phpstan/phpstan/1.0/phpstan.dist.neon and added the rest of the config into that file. Commits ------- 5dc439e Upgrade to PHPStan 2
- Loading branch information
Showing
9 changed files
with
54 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,7 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Property App\\\\Entity\\\\Comment\\:\\:\\$author type mapping mismatch\\: property can contain App\\\\Entity\\\\User\\|null but database expects App\\\\Entity\\\\User\\.$#" | ||
message: '#^Call to function method_exists\(\) with ''Symfony\\\\Component\\\\Dotenv\\\\Dotenv'' and ''bootEnv'' will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 1 | ||
path: src/Entity/Comment.php | ||
|
||
- | ||
message: "#^Property App\\\\Entity\\\\Comment\\:\\:\\$content type mapping mismatch\\: property can contain string\\|null but database expects string\\.$#" | ||
count: 1 | ||
path: src/Entity/Comment.php | ||
|
||
- | ||
message: "#^Property App\\\\Entity\\\\Comment\\:\\:\\$post type mapping mismatch\\: property can contain App\\\\Entity\\\\Post\\|null but database expects App\\\\Entity\\\\Post\\.$#" | ||
count: 1 | ||
path: src/Entity/Comment.php | ||
|
||
- | ||
message: "#^Property App\\\\Entity\\\\Post\\:\\:\\$author type mapping mismatch\\: property can contain App\\\\Entity\\\\User\\|null but database expects App\\\\Entity\\\\User\\.$#" | ||
count: 1 | ||
path: src/Entity/Post.php | ||
|
||
- | ||
message: "#^Property App\\\\Entity\\\\Post\\:\\:\\$content type mapping mismatch\\: property can contain string\\|null but database expects string\\.$#" | ||
count: 1 | ||
path: src/Entity/Post.php | ||
|
||
- | ||
message: "#^Property App\\\\Entity\\\\Post\\:\\:\\$slug type mapping mismatch\\: property can contain string\\|null but database expects string\\.$#" | ||
count: 1 | ||
path: src/Entity/Post.php | ||
|
||
- | ||
message: "#^Property App\\\\Entity\\\\Post\\:\\:\\$summary type mapping mismatch\\: property can contain string\\|null but database expects string\\.$#" | ||
count: 1 | ||
path: src/Entity/Post.php | ||
|
||
- | ||
message: "#^Property App\\\\Entity\\\\Post\\:\\:\\$title type mapping mismatch\\: property can contain string\\|null but database expects string\\.$#" | ||
count: 1 | ||
path: src/Entity/Post.php | ||
|
||
- | ||
message: "#^Property App\\\\Entity\\\\User\\:\\:\\$email type mapping mismatch\\: property can contain string\\|null but database expects string\\.$#" | ||
count: 1 | ||
path: src/Entity/User.php | ||
|
||
- | ||
message: "#^Property App\\\\Entity\\\\User\\:\\:\\$fullName type mapping mismatch\\: property can contain string\\|null but database expects string\\.$#" | ||
count: 1 | ||
path: src/Entity/User.php | ||
|
||
- | ||
message: "#^Property App\\\\Entity\\\\User\\:\\:\\$password type mapping mismatch\\: property can contain string\\|null but database expects string\\.$#" | ||
count: 1 | ||
path: src/Entity/User.php | ||
|
||
- | ||
message: "#^Property App\\\\Entity\\\\User\\:\\:\\$username type mapping mismatch\\: property can contain string\\|null but database expects string\\.$#" | ||
count: 1 | ||
path: src/Entity/User.php | ||
|
||
- | ||
message: "#^Method App\\\\Entity\\\\User::getUserIdentifier\\(\\) should return non-empty-string but returns string\\.$#" | ||
count: 1 | ||
path: src/Entity/User.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$function of class ReflectionFunction constructor expects Closure\\|string, callable\\(\\)\\: mixed given\\.$#" | ||
count: 1 | ||
path: src/Twig/SourceCodeExtension.php | ||
path: tests/bootstrap.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
includes: | ||
- phpstan-baseline.neon | ||
- vendor/phpstan/phpstan-doctrine/extension.neon | ||
- vendor/phpstan/phpstan-symfony/extension.neon | ||
- vendor/phpstan/phpstan-symfony/rules.neon | ||
|
||
parameters: | ||
bootstrapFiles: | ||
- vendor/bin/.phpunit/phpunit/vendor/autoload.php | ||
|
||
doctrine: | ||
objectManagerLoader: tests/object-manager.php | ||
|
||
ignoreErrors: | ||
- identifier: missingType.generics | ||
|
||
level: 6 | ||
paths: | ||
- bin/ | ||
- config/ | ||
- public/ | ||
- src/ | ||
- tests/ | ||
- bin | ||
- config | ||
- public | ||
- src | ||
- tests | ||
|
||
symfony: | ||
containerXmlPath: var/cache/dev/App_KernelDevDebugContainer.xml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters