rappasoft/laravel-patches
rappasoft/laravel-patches offers a curated set of patch files for the Laravel framework, packaged for Composer's patch plugin. Apply targeted core fixes and small behavior tweaks without forking Laravel, handy for temporary workarounds until upstream changes land.
composer require rappasoft/laravel-patches, then follow docs/installation.md — it now documents two paths: the migration set for existing v4.0.x users (unchanged in 4.1.0) and the upgrade path from v3. Read the one that matches your install before running anything.stop_on_error), the patch-execution table migration (this is your audit/history surface), and docs/error-handling.md, which is the doc most affected by this release.migrations/. Write a patch class with up()/down(), run it, confirm the execution record lands in the table, then roll the batch back in staging to prove down() actually works. Do that drill before you ship a patch that touches production data.migrations/ for structure and this package for one-off data movement. The value of the package is the execution record and batch semantics, not schema versioning — don't blur the two or you'll fight both systems' rollback ordering.down() as production code. As of 4.1.0 a throwing down() stops the rollback, rethrows the original exception, and keeps the patch execution record. That's a safer default, but it means your down() is now on the critical path for rollback ordering. Write it deliberately; if it's genuinely irreversible, make it fail loudly rather than silently no-op.down() threw. If your down() deletes then re-inserts, wrap it in DB::transaction() so a failure leaves nothing half-applied.stop_on_error only for forward runs. It governs running patches. Rollback now always stops on failure, by design, to preserve rollback order. Don't try to configure your way around that — it's an invariant, not a setting.updateOrCreate rather than blind inserts.migrate, never interleaved, and run rollbacks only as a deliberate operator action — not automatically as part of a failed deploy hook.down() throw before re-running the rollback. Retrying against a half-reverted dataset is how you get inconsistent data.composer audit remains enabled by design — leave it that way.How can I help you explore Laravel packages today?