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

Parameterbag Laravel Package

juststeveking/parameterbag

A simple, framework-agnostic parameter bag for PHP. Wrap arrays of data in a typed object and access, validate, and manipulate values through a clean, readable API—ideal for request parameters, configuration, or DTO-style payloads.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What a TPM is actually evaluating. Not "should we use this library" in the abstract, but "is this a lever I can pull in a program plan?" The package is a ~100-line value object wrapping an associative array with get/set/has/all, dot-notation nesting, defaults, ArrayAccess, and iteration. It is framework-agnostic, dependency-free, and does nothing else. That narrowness is the point: it is a convention with a class attached, not infrastructure. A TPM should evaluate it as a coding-standard decision with a small procurement step, not as a platform commitment — which is exactly why it can be adopted cheaply and dropped cheaply.

Architecture fit. Well-scoped for its job. It converts "loose associative array threaded through four layers" into a named type with a predictable surface, which is a genuine program-level win in codebases where payload shape is tribal knowledge. It has no service provider contract to satisfy, no persistence, no queue or HTTP coupling, and does not touch the request path. In a Laravel codebase it sits alongside Collection, Config\Repository, and Symfony's ParameterBag rather than replacing them — so the architectural question a TPM must force is "which of these are we standardising on, and why is this the one?" If the team cannot answer in one sentence, the program gains a fourth overlapping primitive and loses the readability payoff entirely.

Integration feasibility. Genuinely one line for a PHP 8.0+ application: composer require juststeveking/parameterbag:^2.0, then use it. No migration tooling, no config publishing, no artifact. The feasibility risk is not the integration, it is the resolution: verify composer update --dry-run against the application's actual Laravel version before putting a date on a plan. If the 2.0.0 require block pins illuminate/* to a Laravel 8/9-era range, the "one-line install" becomes a dependency-archaeology spike, and that changes the schedule. On PHP 7.4 the package is blocked outright — but PHP 7.4 and 8.0 are both end-of-life, so that block is really a runtime-modernisation program item that should be sequenced and justified on its own merits, never smuggled in on the back of a utility package.

Technical risk.

  • Dependency posture. Five stars, zero dependents, one maintainer, last release July 2021, no published support or security policy, and no evidence of CI against PHP 8.3/8.4 or Laravel 11/12. This is not "broken"; it is unverified against the versions most teams now run. A TPM should treat it as an unmaintained-but-stable artifact.
  • Signal quality on the major. A two-line 2.0.0 changelog (PHP 8.0 floor, PestPHP swap) is either a genuinely narrow break or an incomplete record. Require a diff review before commitment; a PM who accepts a major bump on a two-line note is not managing risk, they are absorbing it.
  • Type-safety ceiling. String-keyed access returns mixed. The package relocates the "what is in this array" problem into a class; it does not solve it. If the underlying requirement is validated or typed structure, this is the wrong tool and the misread is the most common cause of a failed adoption.
  • Mutation aliasing. Objects wrapping arrays are shared by reference; mutating a bag in one layer silently changes it in another. That is a design choice, but it is a footgun that a TPM should have named in the risk register before an incident names it for them.
  • Exit cost is near zero. The class can be inlined or forked in under a day. That single fact is what makes every risk above acceptable — and it is the sentence to lead with when socialising the decision.

Key questions.

  1. What does the 2.0.0 require block say about php and illuminate/*, and does it resolve cleanly against our Laravel version today?
  2. Is the CI matrix public and green, and which PHP/Laravel pairs does it cover?
  3. Is our real requirement a bag (untyped, flexible) or a DTO (typed, validated)? Different packages, different programs.
  4. Is the team standardising on this author's package family, or is this an isolated pick? Consistency is the only durable argument for choosing this over an internal class.
  5. Who owns the keep/drop decision if the maintainer disappears, and what is the review date?

Integration Approach

Stack fit. Good, with one caveat worth stating in the plan. Framework-agnostic, dependency-light, Laravel-friendly, and aligned with the ecosystem's PHP 8.0+/Pest direction. The caveat is duplication: Laravel already ships Collection for keyed data, Config\Repository for config-shaped bags, and Symfony's ParameterBag for request parameters. A TPM should not sponsor adoption until the team can articulate the gap. Where the gap does exist — domain value objects (money, address, pagination params), validated request/config bundles, job/command arguments, third-party API payloads, test fixtures — this is a clean, low-ceremony fit.

Migration path. Two populations, and they are different programs:

  • Greenfield or already on PHP 8.0+. Install ^2.0, convert one seam that currently passes an array, write one test, observe. Hours, not days. Schedule it as a background maintainability task inside an existing sprint.
  • Existing 1.x consumer on PHP 7.4. The package bump is a one-line constraint change; the PHP upgrade is the program. Sequence the runtime bump first as its own tracked item with its own justification, then land the constraint change in the same commit. Do not let the package become the Trojan horse that carries an unbudgeted platform migration onto a roadmap.

Compatibility. Do not accept the release note's PHP floor as a compatibility statement. Build the matrix empirically: run composer update --dry-run against each Laravel version in the estate and record what resolves. Since Laravel 10 requires PHP 8.1+ and Laravel 11+ requires 8.2+, the package's effective reach is bounded by its illuminate/* constraint, not its php constraint. Write the result down — the next person will assume "PHP 8.0+" means "works everywhere," and that assumption is how a green build becomes an outage.

Sequencing.

  1. Time-box a spike. One engineer, one day: install in a branch, composer why-not if it fights, confirm the public API matches the description. Output is a go/no-go memo, not code in main.
  2. Make build-vs-adopt explicit. Put the in-house estimate (under a day for an equivalent class) next to the adoption cost. Choosing to write the class is a legitimate outcome and must not be recorded as a failure to adopt — it is the cheaper ownership model.
  3. Wrap it. If adopting, put a thin adapter interface between call sites and the vendor class. This is the single highest-leverage move available: it converts any future abandonment into a one-file change and makes the exit-cost estimate real rather than rhetorical.
  4. Pin ^2.0. Do not float. On a package this quiet, floating buys nothing and destroys your ability to reason about what is installed.
  5. Record the decision. Add it to the dependency watchlist with an owner, a rationale, and a review date. Contribute upstream if you fork; an undiscussed private fork is a liability, not a hedge.

Operational Impact

Maintenance. Effectively zero runtime maintenance: no migrations, no scheduled jobs, no outbound calls, no config to drift, no data to backfill. The burden is ownership rather than operations. If a PHP 8.4 or Laravel 12 compatibility patch is ever needed, the team will almost certainly write it. Budget that as a known, small, date-unbounded item — a line in the maintenance forecast, not a surprise in a quarterly review.

Support. No published support policy, no visible security process, unknown maintainer availability. For a package this size the practical answer is "self-support," which is acceptable only if the team has explicitly accepted it in writing. Record the acceptance now; it prevents an incident review from rediscovering it as a governance failure later, when the person who made the call has moved on.

Scaling. Trivial and irrelevant in the usual sense — no throughput, no concurrency, no storage. The scaling question that matters is codebase scale: how many seams adopt the convention, and does the convention stay coherent as adoption spreads? Cap it deliberately. Use it at explicit boundaries (payload ingress, config bundles, fixtures) rather than everywhere an array appears, or the codebase acquires an untyped container idiom that a future DTO migration has to unwind. That unwind cost is the real scaling risk, and it is a design-governance item a TPM can actually control.

Failure modes.

  • Silent adoption, no owner. Package is used, nobody tracks it, the next PHP upgrade surfaces the constraint conflict at the worst possible time. Mitigation: watchlist entry with named owner and review date.
  • Misread requirement. Team wants validation/schema/typed nesting, gets a bag, and either bolts validation on badly or rewrites in three months. Mitigation: the spike's go/no-go memo explicitly states what the package does not do.
  • Resolver conflict discovered late. Constraint pins against an old Laravel line, discovered mid-sprint. Mitigation: dry-run matrix before any date is committed.
  • Aliasing bug. Shared-by-reference mutation produces a defect far from its cause. Mitigation: adapter layer plus a coding-standard note; treat bags as immutable at boundaries by convention even though the class does not enforce it.
  • Abandonment in place. Maintainer disappears; nothing breaks, but nothing is verified either. Mitigation: exit cost is under a day — say so in the risk entry so the mitigation is credible rather than aspirational.

Ramp-up. Near zero for any PHP developer who has used ArrayAccess: one short read of the class, one example, done. The ramp-up cost that actually matters is convention ramp-up — teaching the team when to reach for the bag versus a DTO versus a Collection. That is a 30-minute engineering-standard note plus one exemplary PR, and it is the difference between a targeted readability win and a codebase-wide idiom sprawl. Assign it to whoever owns the adoption; unowned conventions do not survive their first sprint boundary.

Program framing for stakeholders. This carries no customer-visible capability and no revenue lever. The business case is modest and indirect — cleaner internal contracts, marginally lower defect and onboarding cost in the modules that adopt it, and a one-file seam where payload shapes absorb partner API changes. Low stakes in both directions: a small refactor with a small payoff. The one item to flag upward is dependency posture — one maintainer, zero known dependents, no release since mid-2021 — and the corresponding decision to adopt selectively, off critical paths, pinned, wrapped, and owned.

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.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log