Skip to content

Using a class reflector based on composer.json won't load interfaces #562

@WyriHaximus

Description

@WyriHaximus

Been working on a composer plugin that runs before dumping the autoloader so the normal autoloader isn't available. With some advise from @asgrim and @Ocramius they suggested the following:

(new ClassReflector((new MakeLocatorForComposerJson())(dirname($vendorDir), (new BetterReflection())->astLocator())))->getAllClasses()

To get all classes and iterate over them so see which ones implement a specific interface. Now when doing so I'm getting errors about missing interfaces:

"Psr\EventDispatcher\ListenerProviderInterface" could not be found in the located source
"Composer\Plugin\PluginInterface" could not be found in the located source
"Psr\EventDispatcher\ListenerProviderInterface" could not be found in the located source
"Psr\EventDispatcher\EventDispatcherInterface" could not be found in the located source
"Psr\Log\LoggerInterface" could not be found in the located source

Refs: https://twitter.com/Ocramius/status/1250751832944672768

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions