ibrows/annotation-reader
ibrows/annotation-reader parses PHP docblock annotations into structured objects, letting you read class, method and property metadata at runtime via reflection. A lightweight API for annotation scanning, useful for custom routing, ORMs, validation or framework features in Laravel and plain PHP proj...
doctrine/annotations (deprecated), phpdocumentor/reflection-docblock, roave/better-reflection, or native ReflectionAttribute — not this package. With 0 stars and 0 dependents, it is not a viable "buy" either.FeatureFlags class read at boot).Consider only when:
MetadataReader) with aggressive caching keyed by class plus file mtime, so a later swap to attributes is a one-file change.Look elsewhere when:
ReflectionAttribute; the annotation layer is unnecessary.phpdocumentor/reflection-docblock or roave/better-reflection.Executive summary: ibrows/annotation-reader is a low-maturity, effectively unmaintained PHP library for reading docblock annotations (0 stars, 0 dependents, negligible health score). It is not a strategic dependency and should not be adopted for new work. Its only defensible role is a short-lived compatibility shim inside a legacy PHP 7.x codebase, funded alongside an explicit migration to native PHP 8 attributes or a maintained reflection library.
For engineering: Treat any existing usage as tech debt. Wrap it behind an internal interface so no controller, model, or service calls the package directly; register it as a singleton and cache parsed metadata (parsing via reflection costs milliseconds per class and dominates requests that touch many models). Expect to own the adapter, the boot-time validation of annotations, and PHP-upgrade compatibility, and plan to fork if the upstream stalls. Note the classic failure modes: annotation autoloading (AnnotationRegistry::registerLoader('class_exists')), silent misparses on whitespace/quoting errors, and opcache or formatters stripping docblocks. Quarantine the real parser behind one or two integration tests; fake the reader everywhere else.
Recommended decision: Contain, don't adopt. Approve only as a transitional bridge with a defined exit criterion (migration to attributes or a maintained reflection library), a named internal owner, a pinned version, and a place on the deprecation backlog. Reject for greenfield, customer-facing, or performance-sensitive work.
How can I help you explore Laravel packages today?