New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

calebdw/larastan-livewire

A Larastan / PHPStan extension for Livewire.
1,275,457 66

Larablocks Analysis

calebdw/larastan-livewire works with Laravel 10 to 13 (latest release v2.6.0, Nov 2, 2026).

Recommendation checks

Recommended

Recommended by Larablocks: meets all 4 checks.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Nov 2, 2026)
  • 147,122 downloads a month (at least 10,000)
  • 66 GitHub stars, but 147,122 downloads a month (at least 100,000)

State

Actively maintained
  • Last stable release: Nov 2, 2026.
  • 3 releases in the last 12 months.
  • First released: Dec 22, 2023.
  • Monthly downloads: 147,122, up 101% from six months ago.
  • 1 open issue on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 1, 2026.

Install
composer require calebdw/larastan-livewire
Latest Version:v2.6.0
PHP:^8.2
Laravel:10 – 13
License:MIT
Last Updated:Nov 30, 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);
    }
}

Testing generics

Livewire::test() and the fluent testing helpers (actingAs(), withQueryParams(), …) resolve the component generic, so instance() is the component you passed instead of a bare Component:

/** @var \App\Livewire\Index $component */
$component = Livewire::actingAs($user)->test(Index::class)->instance();

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.

Alternatives to calebdw/larastan-livewire

larastan/larastan

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

100,439,351 6,560
shipmonk/dead-code-detector

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

8,468,318 539
edalzell/dead-code-detector-laravel

PHPStan extensions teaching shipmonk/dead-code-detector about Eloquent trait hoo...

2,313 0
mfn/phpstan-lost-in-translation

Helps find missing translation strings in Laravel applications

9,642 1

Version History

Version Released PHP Laravel License
v2.6.0 ^8.2 ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
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