Kdyby/Events

Ambiguous class Doctrine\Common\EventSubscriber resolution

Closed this issue · 2 comments

This error appeared after upgrade to new version.

Reason is that we use RobotLoader on our composer vendor folder (as ugly fix for some libraries misbehaving autoload). This results in loading of file Doctrine/aliases.php even when Doctrine is already included.

I know that correct way would by to fix autoload in misbehaving libraries but I think this coud be problem for more people who does not rely on composer autoload functionality.

You should be able to create a robotloader.txt file that blacklists the directory.
Also adding only directories of the misbehaving libraries to robotloader might be a slighly better approach.

Thanks for opening this issue, but I really do not wish to make it easier for people to ignore or go against composer.

I agree that fix should be elsewhere. It's just break of something that used to work.