PHPackages                             s1k3/livewire-v4-patch - 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. s1k3/livewire-v4-patch

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

s1k3/livewire-v4-patch
======================

This Package provides comprehensive tools for converting traditional Livewire class components to Multi-File Components (MFC) in Livewire v4

1.0.5(1mo ago)018MITPHPPHP ^8.2CI passing

Since Jan 24Pushed 1mo agoCompare

[ Source](https://github.com/s1k3/livewire-v4-patch)[ Packagist](https://packagist.org/packages/s1k3/livewire-v4-patch)[ RSS](/packages/s1k3-livewire-v4-patch/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

##### This Library is for Converting Livewire 4 Class Component to MFC

[](#this-library-is-for-converting-livewire-4-class-component-to-mfc)

Compatibility
-------------

[](#compatibility)

This package will work with PHP &gt;= 8.2 with CURL enabled.

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

[](#installation)

To install this library follow the following steps:

```
 composer require --dev s1k3/livewire-v4-patch
```

Publish Config File
-------------------

[](#publish-config-file)

- Execute the following command from the command-line to publish the configuration file config/livewire-v4-patch.php. this command will generate a file as above

```
php artisan vendor:publish --provider="LivewireV4\\LivewireV4PatchServiceProvider"
```

**Configuration Options**

KeyTypeDefaultDescriptionexcluded\_directoriesarray\[\]Array of directory names to exclude from Livewire component generationclass\_component\_pathstringbase\_path('app/Livewire')Path where Livewire class components are storedmfc\_component\_pathstringresource\_path('views/components')Path for Model-Focused Components (MFC)create\_jsbooleanfalseWhether to create JavaScript files alongside componentscreate\_cssbooleanfalseWhether to create CSS files alongside componentsglobal\_cssbooleanfalseWhether to use global CSS instead of component-specific CSSemojibooleanfalseWhether to use emoji in generated component outputComponent Conversions Command
-----------------------------

[](#component-conversions-command)

```
php artisan convert-class-to:mfc
```

All paths are being calculated from **class\_component\_path**. For example if your compoent is in **app/Livewire/Posts/Create.php**then your command will be

```
php artisan convert-class-to:mfc Posts/Create.php
```

If you want to convert a full directory for example, if Posts have three components

- Create.php
- Edit.php
- Show.php

And you want to convert them all just pass the folder name in the command

```
php artisan convert-class-to:mfc Posts
```

***Please Note that this will delete old class component files and view files***

To keep the old component files and view files **--keep-class-files** option needs to be used.

```
php artisan convert-class-to:mfc  --keep-class-files
```

In that case, **class and view files needs to be removed manually**

By deafult, every file created will be formatted using pint but in case if you want to disable that you need to use this flag **--without-pint-formatting**

```
php artisan convert-class-to:mfc  --without-pint-formatting
```

After Conversions you might have to clear all the caches and autoload everything.

```
php artisan optimize:clear
```

After Conversions you might have to clear all the caches and autoload everything.

```
php artisan optimize:clear
```

```
composer dump-autoload
```

```
composer install --optimize-autoloader
```

If those command still doesn't work then delete **composer.lock** and **vendor/** directory after that install all the packages

```
composer install
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance92

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~16 days

Total

5

Last Release

41d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e494186079f353417c57bcca90008cc93351897bd68e6a1edd91f6538d409629?d=identicon)[s1k3](/maintainers/s1k3)

---

Top Contributors

[![s1k3](https://avatars.githubusercontent.com/u/19550001?v=4)](https://github.com/s1k3 "s1k3 (36 commits)")

---

Tags

convertclasslivewirecomponentmfc

### Embed Badge

![Health badge](/badges/s1k3-livewire-v4-patch/health.svg)

```
[![Health](https://phpackages.com/badges/s1k3-livewire-v4-patch/health.svg)](https://phpackages.com/packages/s1k3-livewire-v4-patch)
```

###  Alternatives

[classpreloader/classpreloader

Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case

37642.4M32](/packages/classpreloader-classpreloader)[nette/robot-loader

🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.

89152.7M321](/packages/nette-robot-loader)[livewire/flux

The official UI component library for Livewire.

9385.0M85](/packages/livewire-flux)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[yzen.dev/plain-to-class

Class-transformer to transform your dataset into a structured object

16293.9k6](/packages/yzendev-plain-to-class)

PHPackages © 2026

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