Before this change, DriverChain::getAllClassNames was returning 4500+ classes... while I have only 126.
Because drivers can return the same class names.
Fix duplicated class names returned by DriverChain
I know the fix is not good, btw here is a test to show the problem it tries to solve:
Just to say the issue is still here...
Add die(count($classNames).' classes'); in DriverChain::getAllClassNames() and you will see the number of classes is far higher than what you expect.