Go to file
feek c82b7c7cdb
Merge pull request #228 from Legion112/patch-1
Catch even Throwable when trying to create class
2022-06-09 11:41:17 -04:00
.github fix version string 2022-04-07 20:17:41 +00:00
assets chore: include screenshot 2020-05-03 21:27:08 -07:00
cache chore: move cache dir out of src 2021-06-21 16:45:30 -07:00
src Remove use 2022-06-09 17:22:58 +03:00
stubs Fix failing tests for Eloquent relation types in Laravel 9 2022-04-26 14:08:33 +02:00
tests Fix failing tests for firstOrCreate and firstOrNew in Laravel 9 2022-04-26 13:39:37 +02:00
.editorconfig add .editorconfig 2022-02-16 17:29:13 +01:00
.gitattributes add .gitattributes 2022-02-16 17:31:17 +01:00
.gitignore chore(gitignore): add laravel folder 2021-07-05 10:13:50 +02:00
codeception.yml introduce testing 2020-04-08 00:47:02 -07:00
composer.json Merge pull request #213 from Nielsvanpach/laravel-9 2022-05-02 13:39:46 -04:00
LICENSE Add license 2020-02-03 16:57:15 -05:00
phpcs.xml fix psalm issues 2022-03-20 23:02:31 +01:00
psalm-baseline.xml fix psalm issues 2022-03-20 23:02:31 +01:00
psalm.xml fix psalm issues 2022-03-20 23:02:31 +01:00
README.md chore: document branch versions 2022-05-02 13:39:15 -04:00

Psalm plugin for Laravel

Packagist Packagist Type coverage dev-master Tests

Overview

This package 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!

Screenshot

Versions

Laravel 6 Laravel 7 Laravel 8 Laravel 9
v1.* v1.* v1.* v2.*

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 psalm/plugin-laravel
./vendor/bin/psalm-plugin enable psalm/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.