toneflix-code/laravel-resource-modifier
A Laravel package for modifying API resources on the fly, letting you add, remove, or transform fields in JsonResource responses without rewriting resource classes. Useful for tailoring API output per request, user role, or context.
Architecture fit
Unchanged. The package still targets the same narrow seam — JsonResource::toResponse() / additional() / pagination meta — which remains a favorable, stateless, per-request intervention point with no new infrastructure layer. It is still a presentation-layer utility rather than infrastructure. What 2.0.0 changes is not the architectural fit but the cost of entry and exit: the vendor and namespace rename means the seam is now reached through a different, incompatible import path, so the package's identity itself has become a migration surface.
Integration feasibility Feasibility has materially decreased for new adopters and become a scheduled task for existing ones.
toneflix-code/laravel-resource-modifier → toneflix/laravel-resource-modifier, ToneflixCode\ResourceModifier → Toneflix\ResourceModifier. This is a remove/re-require plus a global import rewrite plus a published-config republish. Not a composer update.^8.3|^8.4 and Illuminate ^12.0|^13.0 only. Laravel 10 and 11 are now unsupported; teams on 11 must either upgrade the framework first or pin the 1.x line — which lives under the old vendor name and is therefore now the abandoned namespace. That is a genuine dead-end risk for anyone mid-upgrade.composer.json (not just README claims), a documented CI matrix for Laravel 12 and 13, Testbench ^10.11|^11.1, and Pest 4. The "is it tested / is compatibility enforced / is there a version matrix" questions from the prior review now have affirmative answers.Net: the engineering effort to adopt 2.0.0 is still small in absolute terms, but it is now a coordinated change requiring a framework-version precondition — which is exactly the class of change that slips in a roadmapped org.
Technical risk The risk profile has shifted rather than improved. Provenance risk is more legible now, not less:
| Signal | Prior | Now | TPM read |
|---|---|---|---|
| Stars / dependents | 0 / 0 | 0 / 0 (no new evidence) | Still no peer validation or production evidence |
| Release hygiene | Anomalous future-dated tag | Semver-correct 2.0.0 with changelog, compare link, CI matrix |
Improved — this is a professionally cut release |
| Naming | Single vendor namespace | Vendor + namespace migration under a solo maintainer | Governance churn signal; single-maintainer namespace moves are a common precursor to handoff or abandonment |
| 1.x line | Current | Effectively EOL under a superseded package name | The old name is now a dangling dependency; any 1.x pin is a dead end |
| Bus factor | 1 | 1 | Unchanged |
The dominant risk is no longer "unknown quality" — it is lifecycle risk. A maintainer willing and able to execute a clean 2.0 with CI, changelog, and upgrade instructions is a better-than-average solo maintainer. But a vendor namespace move on a zero-dependent package means the migration has no crowd to validate it: if the rename breaks something, nobody else will have hit it first. And the 1.x/2.x split creates a fork in the road where the safe version (1.x) is on the deprecated name.
Weigh that against the fact that the functional surface it replaces is still roughly 50 lines of native Laravel (additional(), withResponse(), a response macro). The convenience-to-risk ratio has not improved; the migration cost simply made the convenience more expensive.
Key questions
additional() write the same meta key? The prior review's highest-likelihood failure mode, still unresolved in the notes.^12|^13 and not ^11? If the code is unchanged, the floor looks like a policy choice rather than a technical constraint — which constrains adopters more than necessary.Stack fit Unchanged in principle: strong fit for Eloquent + API Resources + JSON, no Fractal, no GraphQL. But the fit now carries a stack-version precondition — PHP 8.3+ and Laravel 12 or 13. Any service on Laravel 11 or PHP 8.2 is out of scope until it upgrades, regardless of how good a fit the pattern is. Screen by runtime version first, then by serialization style.
Migration path This release turns adoption into a two-step decision, and existing users into a distinct case.
For teams already on 1.x:
additional()/withResponse() implementation, delete the trait indirection, and stop tracking a package through every future framework major.For new adopters:
Compatibility
The declared matrix is the headline improvement and should be verified, not assumed. Confirm CI is green on Laravel 12 and 13, and exercise the package explicitly against paginated collections — that remains where framework changes break response metadata and where client-facing regressions surface silently. Also confirm the PHP floor against your actual runtime fleet; ^8.3|^8.4 excludes 8.2, which many Laravel 11 shops still run.
Sequencing
Version-and-serialization screen (0.5 day) → framework/PHP upgrade feasibility check, if applicable (own the estimate) → spike on one endpoint (0.5–1 day) → pilot on one low-traffic, non-contractual endpoint with side-by-side output diff against native (1–2 days) → go/no-go. Gate the decision on: green CI on your Laravel version, confirmed rename-only diff, and deterministic precedence with additional(). For existing 1.x users, invert the sequencing — the framework upgrade drives the calendar, and the package swap is a rider on it.
Maintenance Still expect to own it, and now with a sharper reason: the maintainer has demonstrated willingness to make breaking, namespace-level changes in a major release. That is legitimate semver behavior and better hygiene than most solo packages — but it means every future major may carry a coordinated rename or version-floor change, and with zero dependents you will be the first to discover any fallout. Budget a fork-and-patch contingency; the surface remains small enough that forking is realistic. Note that the 2.0.0 changelog plus CI matrix makes a fork easier to validate than before.
Support Still no community channel, no issue-history depth, no escalation path. The upgrade notes are clear and well-structured, which raises the floor on documentation. But the support story now has a new wrinkle: engineers searching for the package will find the old name, and the resolution path (which name is current, why the import fails, whether 1.x is safe) is entirely tribal knowledge. Add the rename to internal dependency documentation or the next person will burn an afternoon on it.
Scaling Unchanged and non-issue. Per-request array manipulation on an already-serialized payload; no memory, connection, or concurrency impact. The scaling risk remains organizational — knowledge concentration in one maintainer and, now, in whoever on your team remembers which vendor name is real.
Failure modes
additional() and metadata disappears without error. Still unresolved by this release, still highest impact.Ramp-up Still minutes for a Laravel-fluent engineer — but the onboarding cost has risen from "install and use" to "install, verify you're on Laravel 12+, rewrite imports, republish config, and understand why the docs and the lockfile disagree about the vendor name." The native alternative remains comparably cheap to learn and does not introduce a rename event into your history. On the updated evidence — improved release hygiene and a real compatibility matrix, offset by a breaking rename, a raised version floor, an abandoned 1.x name, and still zero dependents — the TPM recommendation softens but does not reverse: prototype it if the pattern is genuinely wanted, then implement the ~50 lines natively and own it. For anyone already on 1.x, treat 2.0.0 as the scheduled moment to rip the dependency out rather than migrate it.
How can I help you explore Laravel packages today?