yehuuu6/hyperwire
HyperWire is a Laravel package that brings hypermedia-driven UI patterns to Blade and Livewire, helping you build dynamic, partial-update interfaces with less JavaScript. It streamlines request handling and rendering for faster, more maintainable interactive apps.
What v2.0.0 actually is: a major bump whose only stated change is moving the package's Livewire dependency from v3 to v4. Treat it as a breaking release by proxy — the package's own public surface may be unchanged, but Livewire's is not, so every consumer app has to migrate.
First moves on an existing app:
composer require <package>:^1.0 in a branch, commit the lockfile, so you have a known-good rollback.composer.json require block for the Livewire constraint (^4.0) and the minimum PHP it implies. Compare against your app's PHP version and CI matrix before running the update.^1.0 — this separates "Livewire 4 broke my app" from "the package broke my app."composer require <package>:^2.0 and re-publish anything the package ships: config, views, migrations, and frontend assets.php artisan optimize:clear plus view:clear and component:clear.npm ci && npm run build) — Livewire's JS payload is versioned and a stale public/vendor or old bundle will produce hydration errors that look like package bugs.Where to look first: the package's UPGRADE.md / CHANGELOG.md, then its service provider boot() method (that is where component registration and Livewire asset hooks usually live), then any published Blade views — those are the most likely place an overridden file still contains a Livewire 3-era directive.
First success criterion: one package-provided component rendering and re-rendering in a browser, plus one Livewire::test(PackageComponent::class)->assertOk() green. If both pass, the remaining work is your own components.
Upgrade workflow (recommended shape):
Day-to-day usage stays largely identical: you still register components in Blade (<livewire:... /> or the tag syntax), dispatch and listen for events, use wire:model, actions, polling, and file uploads. The package is a thin integration layer; your authoring style does not need to change just because the underlying major moved.
Testing pattern that pays for itself here:
Livewire::test(PackageComponent::class)
->set('field', 'value')
->call('save')
->assertHasNoErrors()
->assertDispatched('saved');
Keep a handful of these around package components. They catch Livewire upgrades cheaply, and they're the fastest way to confirm the v2 bump didn't regress behavior.
Integration tips:
^1.0 and migrate one app at a time. A shared internal package that requires <package>:^2.0 will force every dependent app forward at once — check your dependency graph before bumping the constraint anywhere central.This is a hard break, not a soft one. v2.0.0 drops Livewire 3 support. There is no compatibility window; an app on Livewire 3 cannot use this release. Plan the constraint change as a scheduled migration, not a routine composer update.
Composer resolution pain. During the transition you'll hit conflicts where the package wants ^4.0 and something else (a third-party Livewire addon, a starter kit) still pins ^3.0. Diagnose with composer why-not livewire/livewire ^4.0 rather than reading error walls. Every Livewire plugin in your app is now a blocker to enumerate up front.
Alpine duplication. Livewire bundles Alpine. If the package or your layout also loads Alpine independently, you get "Alpine is already defined" and silently broken reactivity. Load exactly one.
Stale assets masquerade as code bugs. Hydration mismatches, 404s on the Livewire update endpoint, and "component not found" errors after an upgrade are usually a cached view, a stale public/vendor directory, or an un-rebuilt bundle. Clear and rebuild before debugging logic.
Published views are the top regression source. A Blade file you copied out of the package in 2024 still speaks Livewire 3. Either re-publish and re-apply your edits, or drop the override if you no longer need it.
Test-suite churn is expected. HTML snapshot assertions, assertSeeHtml escaping, and anything asserting on rendered internals may need updating — that is a test problem, not a package problem. Don't let it mask a real failure; review each diff rather than bulk-accepting.
Debugging ladder: Livewire::test() in a unit test (fastest, no JS) → browser with the network tab open (inspect the update payload and response) → Livewire's devtools → only then read package source. Most "package" bugs are app-side component state that Livewire 4 now validates more strictly.
Extension points to check for drift: published config keys, view overrides, custom component registration in the service provider, and any event/listener wiring. These are where a major Livewire bump leaks into your code even when the package's README looks unchanged.
Keep a documented rollback. Because the break is transitive, rolling back means reverting Livewire and the package together. Write down the exact pinned pair (livewire/livewire version + package version) that was known-good before you start.
How can I help you explore Laravel packages today?