Skip to content

Commit cf4e1ca

Browse files
committed
feat: phpstan/extension-installer support
1 parent 35d2280 commit cf4e1ca

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

README.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,10 @@ However, this package is integrated with specific IDE combinations:
8383
## PHPStan
8484

8585
This extension is adding a lot of missing PostgreSQL functionality to Laravel.
86-
If you are using [PHPStan](https://phpstan.org/) to statically analyze your code, you may get errors because PHPStan doesn't know of the functionality added to Laravel:
86+
A custom set of [PHPStan](https://phpstan.org/) extensions have been developed to get full static analysis support!
8787

88-
```
89-
------ -----------------------------------------------------------------------------------
90-
Line Console/Commands/DeleteOldUsers.php
91-
------ -----------------------------------------------------------------------------------
92-
36 Call to an undefined method Illuminate\Database\Query\Builder::deleteReturning().
93-
------ -----------------------------------------------------------------------------------
94-
```
95-
96-
To solve this problem a custom set of PHPStan extensions have been developed to get full static analysis support for Laravel 9!
97-
You should first install [Larastan](https://github.com/nunomaduro/larastan) to get PHPStan support for Laravel and then activate the PostgreSQL PHPStan extension.
98-
Just add the following path to your `includes` list in `phpstan.neon`, your config should now look like this:
88+
All features provided this extension are automatically recognized by the [phpstan/extension-installer](https://github.com/phpstan/extension-installer).
89+
Otherwise, you have to manually add the following path to your `includes` list in `phpstan.neon`, your config should now look like this:
9990

10091
```
10192
includes:

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
"providers": [
6363
"Tpetry\\PostgresqlEnhanced\\PostgresqlEnhancedServiceProvider"
6464
]
65+
},
66+
"phpstan": {
67+
"includes": [
68+
"phpstan-extension.neon"
69+
]
6570
}
6671
},
6772
"minimum-stability": "dev",

0 commit comments

Comments
 (0)