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 Resource Modifier Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Hard break in identity. 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.
  • Compatibility floor raised sharply. PHP ^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.
  • Positive signal, and it answers prior questions. Explicit Illuminate constraints in 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

  • Is 1.x receiving any maintenance under the old vendor name, or is it formally abandoned? What is the supported upgrade window?
  • Was the old Packagist name abandoned, transferred, or left live? A live-but-frozen old name is a dependency-confusion and confusion-for-new-engineers hazard.
  • Does the 2.0.0 diff contain only the rename/version bump, or are there behavioral changes to meta handling not called out in the notes? The changelog reads as rename-only, but that needs confirming against the diff.
  • Is Laravel 13 support verified by an actual green CI run, or declared in constraints with a matrix entry that is currently skipped/allow-failure?
  • Any change to precedence when both the package and additional() write the same meta key? The prior review's highest-likelihood failure mode, still unresolved in the notes.
  • Why Illuminate ^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.

Integration Approach

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:

  1. Treat as scheduled maintenance, not a routine bump. Budget the framework/PHP upgrade as the critical path; the package rename is the tail.
  2. Do the swap behind the internal abstraction. If the prior recommendation was followed, call sites depend on an internal base resource or trait, so the namespace change is confined to one file. If it was not followed, the rename exposes every scattered call site at once — a useful, if uncomfortable, audit.
  3. Use the forced migration as the exit ramp. The rip-out was always going to cost one file. 2.0.0 is the cheapest moment to take it: replace the dependency with the native additional()/withResponse() implementation, delete the trait indirection, and stop tracking a package through every future framework major.

For new adopters:

  1. Build the baseline first. Implement the target behavior natively in one endpoint. This establishes that the native cost is genuinely ~50 lines and gives a permanent fallback.
  2. Only then evaluate 2.0.0 against that baseline, with the version precondition confirmed.
  3. If adopted, pin the exact 2.0.x version, commit the lockfile, and mirror internally if the org restricts third-party code. Ensure no transitive reference to the old vendor name remains in lockfiles, Docker layers, or IDE configs.
  4. Republish and diff the config file. The upgrade notes call out published config, and silent divergence between published config and package defaults is a classic post-rename failure.

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.

Operational Impact

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

  • Dead-end 1.x pin (new, elevated) — teams that cannot reach Laravel 12 are stranded on a superseded package name with no forward path. Highest-likelihood new risk.
  • Half-completed rename (new) — old and new vendor names coexisting in the lockfile, or stale imports surviving in rarely-executed code paths; fails at runtime, not at install.
  • Silent meta loss — interceptor precedence conflicts with additional() and metadata disappears without error. Still unresolved by this release, still highest impact.
  • Pagination contract drift — meta/links mutated in ways that break typed clients or OpenAPI contracts.
  • Framework upgrade breakage — the 12→13 boundary is now inside the supported window, so the next Laravel major is a first-party concern rather than a hypothetical.
  • Dependency abandonment — reduced but not eliminated; the release improves the odds of a future patch, and the 1.x/2.x split shows the maintainer is willing to leave versions behind.
  • Supply-chain exposure — unchanged. A rename is also the moment to re-read the source; confirm the new package name is controlled by the same maintainer and the repo link resolves.

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.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums