hanneskod/classtools
Scan the filesystem for PHP classes, interfaces, and traits using Symfony Finder. Build a class-to-file map, detect parse/syntax errors, and iterate results as ReflectionClass objects, with optional autoloading for discovered classes.
Codebase Introspection & Tooling:
grep/find commands or IDE-based searches for metadata (e.g., "Find all classes using HasFactory").ServiceContract implementations).@ListenTo('order.created')).@Fixture traits).Build vs. Buy:
glob() + ReflectionClass scripts).php artisan make:controller) to add intelligence (e.g., "Generate a controller for all Resource classes").Roadmap Priorities:
App\Contracts).CacheableInterface").Use Cases:
config/services.php entries for all discovered service classes.exec(), file_get_contents()) via reflection.not()->where('isUsedInTests')).Adopt If:
Look Elsewhere If:
ClassLoader or app()->make()).php artisan tasks).nikic/PHP-Parser).*"This package automates manual codebase tasks, saving dev time and reducing errors. For example:
exec() calls).grep for PHP classes, but programmable. Let’s pilot it for [specific use case, e.g., ‘auto-generating admin panels’] in the next sprint."**"ClassTools lets you query your codebase like a database:
iter->type('App\Contracts\Cacheable')->where('isInstantiable').ReflectionClass to create custom Artisan commands, IDE helpers, or dev tools.
Why use it?grep -r 'class ' with programmatic discovery.type()->inNamespace()->not()).*"This fills a gap in Laravel’s tooling:
@Deprecated’).Call to Action: "Propose a 2-week pilot to build [specific tool, e.g., a ‘Class Auditor’ Artisan command]. If it saves 5+ hours/month, we’ll expand its use."
How can I help you explore Laravel packages today?