https://github.com/nextgen-tech/phpstan-laravel-rules
PHPStan rules for Laravel applications.
https://github.com/nextgen-tech/phpstan-laravel-rules
laravel php phpstan
Last synced: 5 months ago
JSON representation
PHPStan rules for Laravel applications.
- Host: GitHub
- URL: https://github.com/nextgen-tech/phpstan-laravel-rules
- Owner: nextgen-tech
- License: mit
- Created: 2020-10-14T12:47:36.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-10-14T13:11:39.000Z (over 5 years ago)
- Last Synced: 2025-08-02T15:50:41.343Z (10 months ago)
- Topics: laravel, php, phpstan
- Language: PHP
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PHPStan Laravel Rules
This package provides collection of PHPStan rules for Laravel applications. For now it provides 2 new rules:
- disallow debug functions (`dd`, `ddd`, `dump`, `debug`, `print_r`, `var_dump` and `var_export`)
- disallow debug methods on Collections (`dd`, `dump` and `debug`)
## Installation
```sh
composer require nextgen-tech/phpstan-laravel-rules --dev
```
## Including extension to PHPStan
In `phpstan.neon` or `phpstan.neon.dist` file in `includes` section add:
```yaml
./vendor/nextgen-tech/phpstan-laravel-rules/extension.neon
```
After that file should looks like this:
```yaml
includes:
- ./vendor/nunomaduro/larastan/extension.neon # larastan extension, could be omited
- ./vendor/nextgen-tech/phpstan-laravel-rules/extension.neon # extension from this package
parameters:
paths:
- app
level: 8
```