bfg/attributes
bfg/attributes brings PHP 8 attributes to Laravel, giving you a clean, declarative way to configure models, controllers, and services. Reduce boilerplate and keep metadata close to your code with simple, reusable attributes.
ReflectionAttribute helper,” not “buy versus build.”Consider it when:
ReflectionAttribute or another library is cheap.Look elsewhere when:
Executive summary: bfg/attributes is a small MIT PHP 8 attributes utility that could speed up internal prototypes and reduce boilerplate for declarative class metadata. It is not mature enough to be foundational infrastructure: 0 stars, 0 dependents, and minimal adoption signal. Recommend a time-boxed pilot with clear success and exit criteria, not a roadmap dependency.
Engineering summary: Evaluate the source and compatibility first, then wrap it behind an internal interface. Use it only where attribute-driven metadata creates clear leverage, and keep a native ReflectionAttribute fallback. If adopted, pin the version, add tests, document ownership, and be prepared to fork or replace it. The pitch is “low-cost experiment with contained risk,” not “standardize on this package.”
How can I help you explore Laravel packages today?