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

Reflection Laravel Package

nette/reflection

Standalone PHP reflection library from Nette that extends PHP’s Reflection API with easier inspection of classes, methods, properties, parameters, and annotations. Useful for frameworks, DI containers, and code analysis tools.

Deep Wiki
Context7

Product Decisions This Supports

  • Dependency-risk triage in the legacy/upgrade backlog. nette/reflection is archived (last release 2017-07-14) with a NOASSERTION license. If it appears in a Laravel project, it is almost always a transitive leftover from a Nette-era component or an old annotation-driven package. The decision it drives is keep, fork, or remove — not adopt.
  • Build vs. buy for metadata and annotation parsing. Docblock annotation parsing is a solved, commoditized problem in the PHP ecosystem (native Reflection, PHP 8 attributes, phpdocumentor/reflection-docblock, roave/better-reflection, symfony/property-info). The PM call: do not build or maintain a bespoke parser, and do not standardize on a discontinued one.
  • Feature direction: annotation-driven vs. attribute-driven configuration. Presence of this package usually signals an annotation-based pipeline (DI metadata, validation, serialization, route/controller metadata read from docblocks). That choice gates roadmap items: PHP runtime upgrades, static analysis coverage, IDE/autocomplete quality for extension authors, and onboarding docs.
  • PHP runtime upgrade gating. Moving a Laravel app or package from PHP 7.x to 8.x/8.3+ makes docblock-annotation stacks the usual blocker. Locating this package converts a vague "upgrade is risky" into a scoped, costable work item.
  • Public/extension API surface decisions. If third parties write docblock annotations against your package's semantics, removing the parser is a breaking change to their code, not just yours — it needs a deprecation window, a codemod, and changelog/migration-guide work.
  • Procurement and legal review. NOASSERTION means the license was not machine-identifiable; shipping it in a commercial or redistributed product requires a human legal read before it stays in the tree.

When to Consider This Package

Consider it only when all of these hold:

  • You are maintaining an existing Nette Framework 2.x application or addon that already depends on it and you cannot change consumer code this cycle.
  • You need Nette's specific annotation semantics (type resolution from @var/@param, annotation objects on class/method/property reflection) preserved bit-for-bit for backward compatibility.
  • The runtime is pinned to a PHP version where the package is known-good, and there is a dated plan to leave it.

Look elsewhere in every other case — which is nearly all of them:

  • Any new build. Archived for ~8 years, one 2017 release, no security response path.
  • Laravel-native work. The container, route model binding, and modern Laravel packages use PHP's native Reflection and PHP 8 attributes. Adding a docblock parser to a Laravel service provider buys nothing.
  • You only need class/method/property introspection. Use native ReflectionClass/ReflectionMethod — zero dependencies, no autoload side effects.
  • You only need docblock parsing. phpdocumentor/reflection-docblock is maintained and does exactly that.
  • You need reflection without autoloading or on unloaded code. roave/better-reflection is the maintained answer.
  • You want structured metadata. Prefer PHP 8 attributes (spatie/laravel-data, native attribute-based routing/validation) over annotations; doctrine/annotations itself is deprecated, which tells you where the whole pattern is heading.
  • You need typed property extraction for API docs or serialization. symfony/property-info or phpdocumentor/type-resolver cover it with active maintenance.

Two practical red flags to check before any decision: whether the codebase touches internal PHP reflection APIs that shifted in PHP 8 (likely breakage), and whether the package's license text can be resolved to something your legal team accepts.

How to Pitch It (Stakeholders)

For executives (30-second version): This is a discontinued PHP library, last shipped in 2017, now archived, with an unclear license. We are not proposing to adopt it. It shows up only as a legacy leftover in older code, and its cost is not licensing — it is the engineering time to remove it before our next PHP upgrade and the legal review needed while it stays. Recommendation: log it as a small, bounded tech-debt item, not a strategic dependency.

For engineering leads: Treat nette/reflection as a migration target, not a component. Inventory where it is actually used (its annotation reads are usually the real coupling point), replace docblock-annotation lookups with PHP 8 attributes or native Reflection, and where raw docblock parsing is genuinely required, swap in phpdocumentor/reflection-docblock or roave/better-reflection behind a thin internal interface so the choice stays reversible. Expect PHP 8 incompatibility given its age and its extension of native reflection internals. If external consumers depend on the annotation semantics, ship a deprecation notice and a codemod before removal.

One-line framing for a steering deck: "Discontinued since 2017, archived, unlicensed — we are scheduling its removal, not evaluating its adoption."

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings