Weave 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

Laravel Patches Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Package: rappasoft/laravel-patches — a Laravel package for running ordered, versioned data patches (a migrations-style ledger for one-off data/state changes rather than schema changes).

Architecture fit. The package sits alongside Laravel's native migrator and follows the same conventions: a repository table for execution history, an artisan-driven runner, up()/down() contracts, and framework events for observability. That symmetry is the main architectural argument for adoption — it introduces a second ledger but no second mental model. Teams already comfortable with php artisan migrate and migrate:rollback inherit the operational semantics with minimal translation. v4.1.0 does not alter that core shape; it hardens the failure path and widens the framework support envelope.

Integration feasibility. High for any Laravel 11/12/13 application on PHP 8.2+ (8.3+ required for Laravel 13). The upgrade from 4.0.x is explicitly migration-free — no new migrations are introduced — so this is a Composer version bump plus behavioral verification. The documented installation paths now cover both existing migration sets and the v3 → v4 upgrade, which lowers the cost of adopting from older releases. The significant integration work is not installation but policy: deciding how patch rollback is expected to behave in non-production environments, and confirming that existing runbooks, CI jobs, and on-call documentation match the new failure semantics.

Technical risk. The dominant risk in this release is a deliberate behavioral change, not a defect. Previously, a patch whose down() threw could be reported as rolled back and have its execution record discarded — a silent divergence between the ledger and reality. v4.1.0 now stops the rollback, rethrows the original exception, and preserves the execution record. Consequences a TPM must plan for:

  1. Automation assumptions break. Any script, pipeline, or operator muscle memory that expects "rollback continues past a failed patch" (or expects history to be cleaned up after a failed rollback) will now observe a hard stop and a lingering record. This is the correct behavior, but it is observable and must be socialized.
  2. Records are preserved, database state is not. The release notes are unusually candid here: keeping the execution record does not undo partial changes made inside a failed down(). Teams that assumed rollback was atomic will need to wrap down() bodies in transactions where partial reversion matters. This is a real correctness gap that the release surfaces rather than closes.
  3. Laravel 11 is compatibility-only. It remains supported but is outside security support with four unresolved upstream advisories, allowlisted only in temporary CI. Production Composer audits stay enabled, meaning a team on Laravel 11 can adopt this package but inherits their framework's advisory exposure. This is a platform decision, not a package defect.
  4. Retry discipline is now manual. Operators must correct a failed rollback before retrying. stop_on_error still governs forward runs only; rollback always stops. That asymmetry is defensible (it preserves rollback ordering) but is a documented footgun for anyone who reads stop_on_error as a global setting.

Key questions.

  • Which of our environments have ever had a patch down() fail, and what did we do next? Those are the exact runbooks that change.
  • Do any of our patches have multi-statement down() methods that could leave partial state? If so, is transaction wrapping feasible given the DDL/DML involved?
  • What is our Laravel 11 exit date, and does this dependency nudge it forward?
  • Who consumes the rollback events, and do their handlers assume the previous batch payload shape? The notes say events now carry the original batch — verify downstream listeners.
  • Is patch history used as an audit artifact? If yes, the preserved-record change is a net gain and should be documented as such.

Integration Approach

Stack fit. Standard Laravel application with Composer, artisan, and a relational database. No new infrastructure, no queue or cache dependency implied by the release. The package's value scales with how much one-off data correction the team performs — teams that regularly hand-write "fix the rows" scripts get the most, teams that only manage schema get little.

Migration path. Two distinct paths, both low-friction:

  • From 4.0.x: Composer bump to 4.1.0. No new migrations. Verify rollback behavior in a non-production environment, then in staging.
  • From v3 or earlier: Follow the newly clarified installation documentation covering the existing migration sets; treat this as a small project rather than a patch bump, and schedule it with a review of the ledger table.

No data backfill is described, and none is required for the 4.0.x path.

Compatibility. PHP 8.2–8.5, Laravel 11–13. The matrix is explicit: Laravel 13 requires PHP 8.3+, while 8.2 remains viable on Laravel 11/12. For production, the package's own guidance is to prefer patched Laravel 12.69+ or 13.30+ — that is a recommendation worth encoding directly into our dependency constraints rather than leaving to individual developers.

Sequencing.

  1. Pin and confirm the framework/PHP combination (prefer 12.69+/13.30+; avoid greenfield Laravel 11 adoption).
  2. Upgrade the package in a low-risk environment; run the full patch ledger forward and back.
  3. Deliberately exercise a failing down() in staging to observe the stop, the rethrow, and the preserved record — this is the only reliable way to validate that our runbooks match reality.
  4. Add transaction wrapping to any down() that mutates more than one statement, where the database supports transactional DDL.
  5. Update on-call documentation and any CI rollback automation with the new "fix before retry" rule.
  6. Roll to production, then begin the Laravel 11 exit plan if applicable.

Operational Impact

Maintenance. Low and decreasing. The package ships a real test matrix (154 tests / 403 assertions), runs it on both the merged master commit and the version tag, and has refreshed its Testbench/Pest/PHPUnit tooling and GitHub Actions. Building on the tag and the merge commit is a meaningful supply-chain signal — it catches the case where the tagged artifact differs from what was reviewed. Documentation metadata and rollback guidance were corrected in the same release, which suggests maintenance attention is going to the parts operators actually read.

Support. Single-maintainer-adjacent project; the release notes reference one PR (#15) and a clean dependency audit for Laravel 12/13. That is a small bus factor. Mitigation: the package is thin (a ledger table, an artisan command, an event surface), so a fork-and-own contingency is cheap if the maintainer disappears. Laravel 11 support is best read as a compatibility courtesy, not a support commitment — the upstream advisories are outside the package's control.

Scaling. The workload is bounded by the number of patches and the cost of each patch body, executed serially against the ledger. This is not a throughput-sensitive component; it runs during deploys, not in the request path. The relevant scaling concern is ledger growth and rollback time — long patch histories make a full rollback a long, now-stop-on-first-failure operation. Plan rollback scope rather than attempting full-ledger reversals.

Failure modes. This release materially improves the most dangerous one.

  • Previously: a throwing down() could be recorded as rolled back, discarding history and desynchronizing the ledger from the database. Recovery required manual forensics.
  • Now: rollback halts, the original exception propagates with its stack intact, and the execution record survives — so the ledger still tells the truth about what ran.
  • Residual: partial database changes from the failed down() are not automatically reverted. This is the failure mode to design against, and it is explicitly flagged.
  • Secondary: forward runs still honor stop_on_error, so forward and backward failure semantics diverge; operators should be told in one sentence rather than left to discover it.

Ramp-up. Low for anyone who knows Laravel migrations — the concepts transfer directly, and the artisan surface is familiar. The new operational knowledge is narrow and documentable in a short runbook: rollback stops on failure, fix before retry, wrap multi-statement down() bodies in transactions, check the ledger after a failed rollback. Budget roughly half a day of engineering time for the upgrade plus a staging drill, and an hour of documentation work. Onboarding a new engineer to the package itself is near-zero once they have read the rollback page of the docs.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib