brokeyourbike/plugin-laravel
A Laravel 8 plugin for Psalm. PHP 8 only.
Maintainers
Package info
github.com/brokeyourbike/psalm-plugin-laravel
Type:psalm-plugin
pkg:composer/brokeyourbike/plugin-laravel
Requires
- php: ^8
- ext-simplexml: *
- barryvdh/laravel-ide-helper: ^2.10
- illuminate/container: ^8
- illuminate/contracts: ^8
- illuminate/database: ^8
- illuminate/http: ^8
- illuminate/support: ^8
- orchestra/testbench: ^6
- vimeo/psalm: ^4.8.1
Requires (Dev)
- codeception/codeception: ^4.1.21
- codeception/module-asserts: ^1.3.1
- codeception/module-phpbrowser: ^1.0.2
- slevomat/coding-standard: ^7.0
- squizlabs/php_codesniffer: ^3.6
- weirdan/codeception-psalm-module: ^0.13.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT dd20cc2395514330027954a80d5889d4f6cdb3c3
- Matthew Brown <github.woop@muglug.com>
- Ivan Stasiuk <brokeyourbike.woop@gmail.com>
README
👁 Packagist
👁 Packagist
👁 Type coverage
👁 Tests
Overview
This package brings static analysis and type support to projects using Laravel 8. Our goal is to find as many type-related bugs as possible, therefore increasing developer productivity and application health. Find bugs without the overhead of writing tests!
Quickstart
Please refer to the full Psalm documentation for a more detailed guide on introducing Psalm into your project.
First, start by installing Psalm if you have not done so already:
composer require --dev vimeo/psalm ./vendor/bin/psalm --init
Next, install this package and enable the plugin
composer require --dev brokeyourbike/plugin-laravel
./vendor/bin/psalm-plugin enable brokeyourbike/plugin-laravel
Finally, run Psalm to analyze your codebase
./vendor/bin/psalm
How it works
Under the hood it just runs https://github.com/barryvdh/laravel-ide-helper and feeds the resultant stubs into Psalm, which can read PhpStorm meta stubs.
It also parses any database migrations it can find to try to understand property types in your database models.
