Download the PHP package psalm/plugin-laravel without Composer
On this page you can find all versions of the php package psalm/plugin-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download psalm/plugin-laravel
More information about psalm/plugin-laravel
Files in psalm/plugin-laravel
Package plugin-laravel
Short Description Psalm plugin for Laravel
License
Homepage https://github.com/psalm/psalm-plugin-laravel
Informations about the package plugin-laravel
Psalm plugin for Laravel
The package is seeking maintainers
⚠️ This is a perfect opportunity to learn Laravel very deep and collaborate with other high-skilled developers. At this moment, the package is maintained almost solely by @alies-dev, and he is looking for developers to build a team who can constantly improve this package and the whole Psalm ecosystem.
Some ideas to implement:
- [ ] Fully support custom Model Query Builders (medium)
- [ ] Add an option to rely on Model
@property
declarations only - [ ] Get rid of
barryvdh/laravel-ide-helper
dependency and be more accurate with attribute types - [ ] Support .sql files for migrations (to find information about attributes and their types)
Overview
This Psalm plugin brings static analysis and type support to projects using Laravel. 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!
Versions & Dependencies
Maintained versions:
Laravel Psalm Plugin | PHP | Laravel | Psalm |
---|---|---|---|
master | ^8.1 | 10, 11 | 5 |
2.9.x | ^8.0 | 9, 10, 11 | 4, 5 |
1.6.x | >=7.3 | 6, 8 | 4 |
1.4.x | >=7.2 | 6, 7, 8 | 3, 4 |
See releases for more details about supported PHP, Laravel and Psalm versions.
Quickstart
Step 1: Install
Step 2: Configure
If you didn't use Psalm on the project before, you need to create a Psalm config:
Step 3: enable the plugin:
Step 4: Run 🚀
Run your usual Psalm command:
You can customize Psalm configuration using XML config and/or cli parameters.
Recommendation: use baseline file and increase
errorLevel
at least to 4
: this way you can catch more issues. Step by step set errorLevel
to 1
and use Psalm and this plugin at full power 🚀.
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.
Psalm-Laravel-Plugin or Larastan?
Both! It's fine to use both tools at the same project: they use different approaches to analyze code, and thus you can find more bugs! Psalm and PHPStan use almost same the syntax annotations, so you should not have any conflicts.
All versions of plugin-laravel with dependencies
ext-simplexml Version *
illuminate/config Version ^6.0 || ^8.0
illuminate/container Version ^6.0 || ^8.0
illuminate/contracts Version ^6.0 || ^8.0
illuminate/database Version ^6.0 || ^8.0
illuminate/events Version ^6.0 || ^8.0
illuminate/http Version ^6.0 || ^8.0
illuminate/routing Version ^6.0 || ^8.0
illuminate/support Version ^6.0 || ^8.0
illuminate/view Version ^6.0 || ^8.0
vimeo/psalm Version ^4.8.1
orchestra/testbench Version ^4.0 || ^6.0
barryvdh/laravel-ide-helper Version >=2.8.0