Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Livewire V4 Patch Laravel Package

s1k3/livewire-v4-patch

Dev-only Laravel tool to convert Livewire v4 class components into Model-Focused Components (MFC). Provides an Artisan command to convert single components or whole folders, with options to keep originals, generate JS/CSS, exclude directories, and disable Pint formatting.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Migration Strategy: Enables a structured, tool-assisted transition from Livewire v3/v4 class components to Multi-File Components (MFC), reducing manual refactoring effort and risk. Critical for teams adopting Livewire v4’s modern architecture.
  • Developer Productivity: Automates boilerplate conversion (e.g., splitting logic into *.php, *.js, *.css), accelerating onboarding for legacy codebases.
  • Roadmap Alignment: Supports a phased upgrade path—convert components incrementally without full rewrite, aligning with Agile sprints or feature releases.
  • Build vs. Buy: Justifies buying this lightweight tool over custom scripts (low maintenance, no dependencies) for teams already using Livewire.
  • Use Cases:
    • Refactoring monolithic Livewire components into modular MFCs.
    • Preparing for Livewire v4’s deprecation of class components.
    • Standardizing team workflows (e.g., enforcing MFC patterns via CI checks).

When to Consider This Package

  • Adopt if:
    • Your app uses Livewire v4 class components and needs to migrate to MFCs.
    • You prioritize speed over customization (default templates suffice).
    • Your team lacks frontend expertise to manually split components into PHP/JS/CSS.
    • You’re on PHP ≥8.2 with Composer/CURL support.
  • Look elsewhere if:
    • You’re not using Livewire v4 (package is v4-specific).
    • You need advanced customization (e.g., non-standard file structures, complex JS/CSS logic).
    • Your components rely on legacy Livewire v3 patterns incompatible with MFCs.
    • You prefer zero-dependency solutions (this adds a dev-only package).

How to Pitch It (Stakeholders)

Executives: "This tool automates the migration of Livewire class components to Livewire v4’s modern Multi-File Components (MFC), cutting refactoring time by 70%. For a one-time dev effort (~2 hours setup), it future-proofs our codebase against Livewire’s deprecation of class components, improves maintainability, and aligns with our modular architecture roadmap. Low risk—uses existing Livewire ecosystem."

Engineering: *"The s1k3/livewire-v4-patch package handles the tedious work of splitting Livewire components into MFCs (PHP + JS + CSS) via a single CLI command. Key benefits:

  • Configurable: Exclude directories, customize paths, or skip JS/CSS generation.
  • Safe: Preserves existing logic while enforcing MFC structure.
  • Lightweight: Zero runtime impact (dev-only dependency). Example workflow:
composer require s1k3/livewire-v4-patch --dev
php artisan vendor:publish --provider="LivewireV4\LivewireV4PatchServiceProvider"
php artisan convert-class-to:mfc app/Livewire/MyComponent.php

Proposal: Pilot on 2–3 low-risk components in the next sprint to validate ROI."*

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky