-
Notifications
You must be signed in to change notification settings - Fork 125
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
Update composer.json #164
base: master
Are you sure you want to change the base?
Update composer.json #164
Conversation
@erusev We need this merge! |
Thanks for the PR. How can I reproduce the issue? When I do |
It happens specifically on
I believe its because the test classes don't have namespaces. |
This occurs specifically with the composer optimizer. You can replicate this by generating the autoloader with the optimize flag set
Should output
Hope this helps |
Can anyone explain why the same issue doesn't occur with Parsedown, which also uses |
the warning is about |
I believe PSR is wanting
Most other libraries will place the source files in the src directory and then instruct PSR to look inside there. That way the tests and other materials are kept out of the way. So basically,
I haven't tested this, but it is the theoretical fix. I hope this helps. |
@daftspunk this has nothing to do with To fix this, namespaces of the classes in |
I still don't understand why the same issue doesn't occur with Parsedown, and now I have one more question, perhaps it's related: Why does |
Hey @erusev. Me again. I note that in both repos you are implementing the use of .gitattributes which are being instructed to ignore the This will have an interesting effect, via composer:
This is likely why you are seeing inconsistent outcomes with equivalent packages. |
Hey @daftspunk thanks for sharing your thoughts, but I still don't understand it. In an empty folder, run Why is that? |
That's because the latest tagged version of |
fix composer with warning:
Class ParsedownExtraTest located in ./vendor/erusev/parsedown-extra/test/ParsedownExtraTest.php does not comply with psr-0 autoloading standard. Skipping.