PHPackages                             shawnveltman/livewire-3-property-updater - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. shawnveltman/livewire-3-property-updater

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

shawnveltman/livewire-3-property-updater
========================================

A package to update Livewire 2 computed properties to use the Livewire 3 syntax

1.0.5(2y ago)582[2 PRs](https://github.com/shawnveltman/livewire-3-property-updater/pulls)MITPHPPHP ^8.1|^8.2

Since Sep 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/shawnveltman/livewire-3-property-updater)[ Packagist](https://packagist.org/packages/shawnveltman/livewire-3-property-updater)[ Docs](https://github.com/shawnveltman/livewire-3-property-updater)[ RSS](/packages/shawnveltman-livewire-3-property-updater/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (13)Versions (9)Used By (0)

A package to update Livewire 2 computed properties to use the Livewire 3 syntax
===============================================================================

[](#a-package-to-update-livewire-2-computed-properties-to-use-the-livewire-3-syntax)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ec16c65fabe4be47f3c3a13b3369b8a646c4023e632393f2302481b183d437d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736861776e76656c746d616e2f6c697665776972652d332d70726f70657274792d757064617465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shawnveltman/livewire-3-property-updater)[![GitHub Tests Action Status](https://camo.githubusercontent.com/69b31962cc4d9de870654da3cc420f543b2c7fcaaf4efbce93ed39d87fe9169e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736861776e76656c746d616e2f6c697665776972652d332d70726f70657274792d757064617465722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/shawnveltman/livewire-3-property-updater/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/2c083d0a6dc4ede833b4ebb425aec568c62e1a611de809199ac6c2c1b8b0372b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736861776e76656c746d616e2f6c697665776972652d332d70726f70657274792d757064617465722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/shawnveltman/livewire-3-property-updater/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/1653e4ab13adf9b8f49955f9a4b6ead8dbbcfbb517d9a861f7a6c9c145d1d5b5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736861776e76656c746d616e2f6c697665776972652d332d70726f70657274792d757064617465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shawnveltman/livewire-3-property-updater)

In Livewire 2, a computed property "foo" would be defined like this:

```
public function getFooProperty()
{
    return 'bar';
}
```

In Livewire 3, the same property would be defined like this:

```
#[Computed]
public function foo()
{
    return 'bar';
}
```

This package automates that update in your Livewire components folder.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require --dev shawnveltman/livewire-3-property-updater
```

You can publish the config file with:

```
php artisan vendor:publish --tag="livewire-3-property-updater-config"
```

This is the contents of the published config file:

```
return [
    'start_directory' => 'app/Livewire',  // Defaulting to the app directory, but users can change this.
    'disk' => 'base_path',
    'method_name_style' => 'snake_case', // StudlyCase or  snake_case
];
```

Two notes on this. First and foremost, the package expects you to have a disk called 'base\_path' set up (typically in config/filesystems.php) which points to the base path of the app.

```
 'base_path' => [
            'driver' => 'local',
            'root'   => base_path(),
        ],

```

Second - I'm the kind of monster that GREATLY prefers snake\_case for method names, so that's the default, but it's easy enough to change it to StudlyCase if that's your preference

Usage for updating computed properties
--------------------------------------

[](#usage-for-updating-computed-properties)

```
php artisan shawnveltman:livewire-3-property-updater
```

Check For Invalid Attempts To Set Property To Null in Livewire 3
----------------------------------------------------------------

[](#check-for-invalid-attempts-to-set-property-to-null-in-livewire-3)

In Livewire 3, setting a computed property to null will cause an error. After updating, you might find instances in your code where properties are explicitly set to null. This command automates the process of identifying and updating these instances to use unset instead.

When running this command, it'll scan the Livewire components in your specified directory and look for computed properties being set to null. It will replace these instances with the unset function, preventing potential errors in Livewire 3.

Usage for checking null assignments
-----------------------------------

[](#usage-for-checking-null-assignments)

```
php artisan shawnveltman:livewire-null-property-updater
```

Identify Dispatch Patterns in Livewire
--------------------------------------

[](#identify-dispatch-patterns-in-livewire)

The shawnveltman:dispatch-identifier command scans your Livewire components for specific dispatch patterns. It's especially useful when identifying or refactoring certain dispatch() method usages in Livewire.

The command filters out dispatches with named arguments and presents an output of file paths with the line numbers where the dispatch() method matches the targeted pattern.

Usage for identifying dispatch patterns
---------------------------------------

[](#usage-for-identifying-dispatch-patterns)

```
php artisan shawnveltman:dispatch-identifier
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Shawn Veltman](https://github.com/shawnveltman)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

955d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6dd8d72a34070f86fc3cd5180b2cacbf81d41d69b1016b91da26b5ef409b577c?d=identicon)[shawnveltman](/maintainers/shawnveltman)

---

Top Contributors

[![shawnveltman](https://avatars.githubusercontent.com/u/8326484?v=4)](https://github.com/shawnveltman "shawnveltman (44 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

laravelshawnveltmanlivewire-3-property-updater

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/shawnveltman-livewire-3-property-updater/health.svg)

```
[![Health](https://phpackages.com/badges/shawnveltman-livewire-3-property-updater/health.svg)](https://phpackages.com/packages/shawnveltman-livewire-3-property-updater)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
