- ide-helper Version: 2.10.0
- Laravel Version: 8.65.0
- PHP Version: 8.0.7
ide-helper:meta command results in a lot of services being skipped unncessesarily if
class_exists() gets called when an abstract is resolved from the container.
One of the packages I use (laravel-actions) registers a
beforeResolving callback which checks if the abstract is a class:
class_exists($abstract). But since a lot of the abstracts are not class names (
request etc), it means that the MetaCommand's autoloader eventually gets called, which throws an exception and the service gets skipped.
I considered asking laravel-actions to wrap the
class_exists() call in a try-catch, but I realized it would be an unreasonable request, since
class_exists() isn't supposed to throw an exception.
Is the custom autoloader strictly necessary? When I disabled it, all the warnings went away, and it generated a meta file which looks perfect to me.
Steps To Reproduce:
- Register a
beforeResolvingcallback which calls
php artisan ide-helper:metaand watch the console output.