tbn/getter-trait-bundle
tbn/getter-trait-bundle provides reusable PHP traits for adding getter methods to your classes. It reduces boilerplate, keeps property access consistent, and works smoothly in Laravel or standalone PHP projects.
readonly, constructor promotion), most of this is now a language feature, not a package need.Bundle naming, Thomas Beaujean's ecosystem). If our stack is Laravel-first, adopting it means dragging in a bundle-style lifecycle that doesn't fit our conventions. That is a product/architecture decision, not just a technical one.Consider it when all of the following hold:
src/Support folder doesn't do better.Look elsewhere (or just write the trait ourselves in ~20 lines) when:
To executives (30 seconds): This is a tiny developer-comfort utility that reduces boilerplate accessor code. It's free (MIT) and low-risk to trial, but it's unproven — two GitHub stars, no known dependents, single maintainer. It is not a platform bet and not on the roadmap. Recommendation: no budget, no procurement, at most a one-engineer, one-week spike on a non-critical module. If it doesn't clearly pay for itself, we write the twelve lines ourselves and move on.
To engineering: It generates getters via traits for Symfony entities/DTOs. It overlaps heavily with PHP 8.1 constructor promotion and readonly properties, so the honest pitch is "convenience if your codebase predates those features, and only in Symfony." Because it's MIT and trivially forkable, the right posture is: wrap it behind an internal convention so we can replace it, never sprinkle it through the domain model, and treat the maintainer as absent. If we adopt, we add a Support/ shim and a one-paragraph ADR recording why — and we revisit when PHP version or Symfony major changes.
Decision requested: Approve a scoped evaluation spike, or reject and standardize on native language features. My recommendation is reject for production, optional spike for internal tooling — the capability is real but small, and the dependency signal is too weak to justify a standing commitment.
How can I help you explore Laravel packages today?