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
composer.json
: empty string in autoloader-suffix
#10720
Comments
IMO having an empty suffix is a bad idea, as the point of the suffix is ensuring different projects get unique class names in case they coexist in the same process. So you can set it to your project's name or something if you like, but don't use empty. Clarified this in #10725 |
@Seldaek in your case, bad idea is same suffix for loaders and no matter empty suffix or not. But in cases when uses single autoloader is's better then useless suffix. |
I understand it's not what you wanted to hear, but I also don't see a huge problem with having this suffix set to something.. This classname shouldn't even appear anywhere in your code. |
Nope. Case: project declare N autoloaders, your code in vendor package. Question: how you get Composer autoloader to get registered namespaces? |
@Seldaek I don't see a huge problem in omitted suffix in cases like my |
I don't understand exactly your use case, but you can either use spl_autoload_functions() to retrieve it or use |
@Seldaek you right, I miss class of returned object. I'm was planed get instance by |
My
composer.json
:Output of
composer diagnose
:When I run this command:
Actual result:
class ComposerAutoloaderInit... {...}
(autoload_real.php
)And I expected this to happen:
class ComposerAutoloaderInit {...}
The text was updated successfully, but these errors were encountered: