crell/attributeutils
Utilities for PHP 8+ attributes: a cached AttributeReader that fetches and instantiates attributes on classes, methods, properties, and parameters, with helpers for repeatable attributes, inheritance, and object mapping. A lightweight base for attribute-driven config and dependency injection.
ReflectionClass::getAttributes() wrapper and re-solves the same edge cases (repeatable attributes, attributes inherited from parent classes/interfaces, nested attributes used as arguments, attributes on parameters and promoted constructor properties, caching). This package is that layer, already solved.Consider adoption when:
Look elsewhere when:
NOASSERTION) — legal must clear terms before any adoption decision; treat this as a gating item, not a footnote.For executives: This is a small, low-cost library that lets our PHP engineers use native PHP 8 attributes as clean, code-adjacent configuration — the modern replacement for scattered YAML and array config. Adopting it stops each team from rebuilding the same fragile attribute-parsing glue and reduces long-term maintenance and bug risk across features like routing, validation, and service discovery. Cost is a single Composer dependency; the only gates are a quick legal check on the currently unrecognized license and a short engineering spike to confirm fit.
For engineering: crell/attributeutils (maintained by Larry Garfield, a well-known PHP FIG contributor) handles the tedious parts of attribute handling: reading attributes with inheritance, repeatable and nested attributes, parameter and promoted-property attributes, and caching. It's framework-agnostic and composes with Laravel/Symfony. Proposed next steps: (1) 1–2 day spike validating it against our actual attribute patterns and measuring hot-path performance, (2) wrap it behind an internal interface so we can swap implementations if the package stalls, (3) pin the version and confirm the license with legal. Watch items: license verification, bus factor, and upstream activity.
How can I help you explore Laravel packages today?