peterfox / laravel-static-analysis-starter-kit
The skeleton application for the Laravel framework.
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
Type:project
pkg:composer/peterfox/laravel-static-analysis-starter-kit
Requires
- php: ^8.2
- laravel/framework: ^12.0
- laravel/tinker: ^2.10.1
- webmozart/assert: ^1.11
Requires (Dev)
- driftingly/rector-laravel: ^2.0
- fakerphp/faker: ^1.23
- larastan/larastan: ^3.0
- laravel/pail: ^1.2.2
- laravel/sail: ^1.41
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-webmozart-assert: ^2.0
- phpunit/phpunit: ^11.5.3
- symplify/easy-coding-standard: ^12.5
- symplify/phpstan-rules: ^14.4
This package is not auto-updated.
Last update: 2025-10-24 17:07:31 UTC
README
The Laravel Static Analysis Starter Kit
This starter template is less for making projects and more for educational purposes. When creating a project with this starter kit you can quickly play around with static analysis tools with Laravel.
How to use it
Have the Laravel installer installed
laravel new --using peterfox/laravel-static-analysis-starter-kit
What's installed?
This starter kit is to demo the use of:
- PHPStan
- Rector
- Easy Coding Standards (replaces Laravel Pint)
How to run
You can action all of these in one go using:
composer ci
This will run tests as well between linting and phpstan.
What's configured?
PHPStan
The project includes the following PHPStan extensions:
- Larastan - Helps analyse for Laravel related issues.
- PHPStan deprecated warnings - Finds use of deprecated code.
- PHPStan webmozart/assert - Allow extra detections via webmozart/assert.
- PHPStan PHPUnit - Highlights issues with PHPUnit tests.
- Simplify PHPStan Rule - Additional Rules around clean architecture.
At current the phpstan.neon.dist config sets level 6 and covers the app and tests folders.
EasyCoding Standards
EasyCoding Standards is a wrapper around PHP CS Fixer in the same way Laravel Pint is but it makes the config easier to write. Instead of JSON, it's a PHP file that IDEs will be able to auto-complete with.
The config for EasyCoding Standards lives in ecs.php.
Rector
Rector is for automatically fixing, upgrading and improving code. This will act in the same way PHP CS Fixer does but goes even further but performing a type hint analysis before applying rules.
The config for rector lives in rector.php.