Weave Code
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

Construct Finder Laravel Package

league/construct-finder

Locate PHP code constructs (classes, interfaces, traits, enums) within one or more directories. Returns construct objects or just names, with type-specific finders and support for excluding files via simple wildcard patterns.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Codebase Navigation & Tooling: Enables faster development by powering IDE-like class discovery (e.g., autocomplete, refactoring tools, or documentation generators).
  • Build vs. Buy: Justifies in-house tooling for static analysis (e.g., dependency mapping, codebase audits) instead of licensing commercial solutions.
  • Developer Experience (DX): Reduces friction for onboarding new engineers by providing programmatic access to class metadata (e.g., "Find all classes using this trait").
  • Roadmap for Refactoring Tools: Core component for future features like:
    • Automated dependency visualization (e.g., "Show all classes extending BaseModel").
    • Legacy code analysis (e.g., "Find unused interfaces").
  • API/Plugin Ecosystem: Foundation for building custom CLI tools or IDE plugins (e.g., "List all enums in the project").

When to Consider This Package

  • Avoid if:
    • Your team uses PHPStan/Psalm or PHPUnit (they already include similar functionality).
    • You need runtime reflection (use native ReflectionClass instead).
    • Your project is small (<10K LOC) and lacks complex class hierarchies.
    • You’re constrained by performance (this scans files; for large codebases, consider compiled solutions like phpDocumentor).
  • Consider if:
    • You’re building static analysis tools (e.g., custom linters, migration helpers).
    • Your team relies on programmatic codebase introspection (e.g., scaffolding generators).
    • You need lightweight, dependency-free solutions (no heavy frameworks like Symfony’s ClassLoader).

How to Pitch It (Stakeholders)

For Executives: "This package lets us build internal tools to navigate and analyze our PHP codebase programmatically—like a search engine for classes, traits, and enums. It’s lightweight, open-source, and could power everything from developer onboarding to automated refactoring. Think of it as the ‘Ctrl+Shift+F’ for our codebase, but for machines. Upfront cost: near-zero; ROI: faster development and fewer manual audits."

For Engineering: *"Need to find all classes implementing Serializable or list every trait used in a module? This package gives us a fast, reliable way to query class metadata without regex or manual grepping. It’s the backbone for:

  • Custom CLI tools (e.g., php find-orphaned-classes).
  • IDE plugins or VS Code extensions.
  • Pre-commit hooks to enforce architecture rules. No dependencies, pure PHP, and works with any project structure."*

For Developers: *"Tired of grep -r "class "? This library scans your codebase once and lets you query classes by name, namespace, or even parent traits—programmatically. Use it to:

  • Build a ‘Where Used?’ tool for any class.
  • Auto-generate API documentation with context.
  • Write tests that verify class relationships (e.g., ‘Does NewFeature extend BaseController?’). It’s like find for your codebase, but for your scripts."*
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport