calebdw/larastan-livewire

A Larastan / PHPStan extension for Livewire.
1,088,602 63
Install
composer require calebdw/larastan-livewire
Latest Version:v2.5.0
PHP:^8.2
Laravel:10 – 13
License:MIT
Last Updated:Aug 18, 2026
Links: GitHub  ·  Packagist
Maintainer: calebdw

Larastan Livewire

A Larastan / PHPStan extension for Laravel Livewire.

Laravel Compatibility Test Results License Packagist Version Total Downloads

Install

composer require calebdw/larastan-livewire --dev

If you have the PHPStan extension installer installed then nothing more is needed, otherwise you will need to manually include the extension in the phpstan.neon(.dist) configuration file:

includes:
    - ./vendor/calebdw/larastan-livewire/extension.neon

Features

Computed Properties

Computed properties are properly resolved from methods that have the Computed attribute applied.

<?php

use Livewire\Attributes\Computed;
use Livewire\Component;

class ShowPost extends Component
{
    #[Computed]
    public function post()
    {
        return Post::find($this->postId);
    }
}
Getter Style

The older, "getter" style attributes are supported as well:

<?php

use Livewire\Component;

class ShowPost extends Component
{
    // Computed Property
    public function getPostProperty()
    {
        return Post::find($this->postId);
    }
}

Contributing

Thank you for considering contributing! You can read the contribution guide here.

License

Larastan-Livewire is open-sourced software licensed under the MIT license.

Related Packages

larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan exte...

83,043,524 6,541
shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatica...

6,830,227 530
mfn/phpstan-lost-in-translation

Helps find missing translation strings in Laravel applications

7,834 1
imsuperlative/larastan-filament-macro

PHPStan extension for Filament's Macroable trait — runtime macro method resoluti...

22,923 5
laramago/laramago

Laravel compatibility preset and runner for Mago static analysis.

1,893 19

Version History

Version Released PHP Laravel License
v2.5.0 ^8.2 ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
v2.4.0 ^8.2 ^10.0 || ^11.0 || ^12.0 MIT
v2.3.0 ^8.2 ^10.0 || ^11.0 || ^12.0 MIT
v2.2.0 ^8.2 ^10.0 || ^11.0 || ^12.0 MIT
v2.1.0 ^8.2 ^10.0 || ^11.0 || ^12.0 MIT