Skip to content

Commit

Permalink
Fix PHPStan configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
franmomu committed Nov 29, 2020
1 parent a3a936f commit faf4a35
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
39 changes: 22 additions & 17 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
parameters:
ignoreErrors:
-
message: "#^PHPDoc tag @param references unknown parameter\\: \\$applyFilters$#"
count: 1
path: lib/Doctrine/ODM/MongoDB/Aggregation/Builder.php
ignoreErrors:
# Adding a parameter would be BC-break
-
message: "#^PHPDoc tag @param references unknown parameter\\: \\$applyFilters$#"
count: 1
path: lib/Doctrine/ODM/MongoDB/Aggregation/Builder.php

-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
count: 1
path: lib/Doctrine/ODM/MongoDB/Aggregation/Expr.php
# Making classes final as suggested would be a BC-break
-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
paths:
- lib/Doctrine/ODM/MongoDB/Aggregation/Expr.php
- lib/Doctrine/ODM/MongoDB/DocumentManager.php

-
message: "#^Return type \\(Doctrine\\\\ODM\\\\MongoDB\\\\Aggregation\\\\Stage\\\\GeoNear\\) of method Doctrine\\\\ODM\\\\MongoDB\\\\Aggregation\\\\Stage\\\\GeoNear\\:\\:limit\\(\\) should be compatible with return type \\(Doctrine\\\\ODM\\\\MongoDB\\\\Aggregation\\\\Stage\\\\Limit\\) of method Doctrine\\\\ODM\\\\MongoDB\\\\Aggregation\\\\Stage\\:\\:limit\\(\\)$#"
count: 1
path: lib/Doctrine/ODM/MongoDB/Aggregation/Stage/GeoNear.php
# The limit option in GeoNear has been removed in MongoDB 4.2 in favor of $limit stage
-
message: "#^Return type \\(Doctrine\\\\ODM\\\\MongoDB\\\\Aggregation\\\\Stage\\\\GeoNear\\) of method Doctrine\\\\ODM\\\\MongoDB\\\\Aggregation\\\\Stage\\\\GeoNear\\:\\:limit\\(\\) should be compatible with return type \\(Doctrine\\\\ODM\\\\MongoDB\\\\Aggregation\\\\Stage\\\\Limit\\) of method Doctrine\\\\ODM\\\\MongoDB\\\\Aggregation\\\\Stage\\:\\:limit\\(\\)$#"
count: 1
path: lib/Doctrine/ODM/MongoDB/Aggregation/Stage/GeoNear.php

-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
count: 1
path: lib/Doctrine/ODM/MongoDB/DocumentManager.php
# Union types cannot be added yet
-
message: "#^Result of && is always false\\.$#"
count: 1
path: lib/Doctrine/ODM/MongoDB/Query/Builder.php

1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ includes:
- phpstan-baseline.neon

parameters:
treatPhpDocTypesAsCertain: false
level: 5
paths:
- %rootDir%/../../../benchmark
Expand Down

0 comments on commit faf4a35

Please sign in to comment.