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
ApiWrapper not loading for PSR-4 #32
Comments
Always run |
I'm using the latest version of Composer. And I tested on PHP 5.5.20 on OSX and PHP 5.6.5 on Ubuntu 12.04 64bit. |
This is very weird. I can reproduce it but it doesn't make sense. It should work. Need to investigate. Maybe it's even a composer bug which I would normally strongly doubt. |
I have read a bit about psr-4 and it seems like the library is slightly in the wrong. I believe the rename is the correct thing to do. This is the most clear article I have found on the subject: http://www.sitepoint.com/battle-autoloaders-psr-0-vs-psr-4/ |
My knowledge of the PSR's is pretty limited but I think the class name and file name need to match. |
I guess I was wrong about psr-4. Only strange that it worked for me so far that way. I'll try to find some time to find out why. |
@leftnode @markushausammann I will try to get a PR up for this this week if you don't beat me to it. |
PR up! |
@leftnode Can you try Version 1.1.0 and let me know if you run into the same problems? |
@janxious you'll need to tag a release before that, just in case. |
Derp. That is done, and also added one for 1.0.1. |
May have to do a new release, this one is missing a few things:
Updated the call to |
Was running into issues where our tests are not actually testing the |
Just pulled in |
👍 Good to hear! I really appreciate your patience, and I am sorry for taking so much of your time. |
Hah, no problem at all - glad it got worked out. |
I'm using Composer version
1.0-dev 69210d5bc130f8cc9f96f99582a041254d7b9833 2015-05-25 13:29:26
and theApiWrapper
class can not be found using the autoloader.First, I downloaded Composer from getcomposer.org and then ran the following command:
This created a
composer.json
file that looks like this:I copied the sample code from the README into this file:
When running this, I get the following error:
If I go into the
vendor/expectedbehavior/php-docraptor/src/
directory and renameDocRaptor.php
toApiWrapper.php
it works fine.Am I missing something with my Composer file, or does PSR-4 expect the class and file to have the same name?
The text was updated successfully, but these errors were encountered: