Skip to content

Commit

Permalink
fix: add extension to PHPStan config
Browse files Browse the repository at this point in the history
  • Loading branch information
canvural committed Apr 16, 2024
1 parent a2c9caa commit 5bc58cc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
15 changes: 0 additions & 15 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
parameters:
ignoreErrors:
-
message: "#^Constant LARAVEL_VERSION not found\\.$#"
count: 1
path: src/LarastanStubFilesExtension.php

-
message: "#^PHPDoc tag @var assumes the expression with type PHPStan\\\\Type\\\\Type\\|null is always PHPStan\\\\Type\\\\Constant\\\\ConstantStringType but it's error\\-prone and dangerous\\.$#"
count: 1
Expand Down Expand Up @@ -45,13 +40,3 @@ parameters:
count: 2
path: src/Rules/ModelRuleHelper.php

-
message: "#^Call to PHPStan\\\\Type\\\\Type\\:\\:getTemplateType\\(\\) references unknown template type TChildModel on class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\BelongsTo\\.$#"
count: 1
path: src/Types/ModelRelationsDynamicMethodReturnTypeExtension.php

-
message: "#^Call to PHPStan\\\\Type\\\\Type\\:\\:getTemplateType\\(\\) references unknown template type TRelatedModel on class Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\Relation\\.$#"
count: 1
path: src/Types/ModelRelationsDynamicMethodReturnTypeExtension.php

1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
- extension.neon
- phpstan-baseline.neon
parameters:
level: 8
Expand Down

2 comments on commit 5bc58cc

@szepeviktor
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@canvural Larastan should be self sufficient while testing it with PHPStan.

@canvural
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@canvural Larastan should be self sufficient while testing it with PHPStan.

I agree mostly. But I just added so that we get the stub file validation.

Please sign in to comment.