-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange behavior of 0.5.4
for ComposerFinder::inNamespace
#24
Comments
I found the reason for such behavior of
I changed the bundle's directory structure to move the source code to the For now, I have another error: Context: andrew-demb/graphqlite-bundle#1 Commit that introduced test with ignoring bad class thecodingmachine/graphqlite-bundle@d221cb1#diff-c10c2bd297e9e7ba6de365b2ed643b3cf48e114110664533a61de233e61bc4d2R425 Code that initiates a search for classes in test namespace: https://github.com/andrew-demb/graphqlite-bundle/blob/ff06ee1548b2e95918f937e11073bc0f7eed67fd/src/DependencyInjection/GraphQLiteCompilerPass.php#L484-L491 Please hint whether I can have the same behavior about ignoring bad classes with Full error output for PHPUnit run:
|
Hi @andrew-demb, The second part is trickier, but to make it short, it is caused by composer/composer#6987 and it cannot be fixed: the presence of a global class or a global function (or a misspelled namespace) inside a PSR-0/4 structure will break the autoloader and the finder if not used with a generated authoritative classmap. |
Thank you, @alekitto. |
I'm in the process of making
graphqlite-bundle
compatible withgraphqlite
v7 (dev) andsymfony
v7(continuation from PR thecodingmachine/graphqlite-bundle#203; here's a permalink to the used
graphqlite
dependency version https://github.com/thecodingmachine/graphqlite/tree/0f1a112fe46a131fb6564b2f1001b5dc6d35b075)While investigating issues with test suite I found, that
ComposerFinder::inNamespace
does autoload of unrelated classes (not related to the requested namespace).Please suggest a path to investigate the reason for such behavior and how to fix it (should it be a fix in
class-finder
or ingraphqlite
?)The reason, why I am investigating it - is because of that behavior - in
graphqlite-bundle
tests there's an error about redeclaring an existent class.The text was updated successfully, but these errors were encountered: