Composer autoloader
I'm not clear if this is an issue, or if I'm just missing something.
I had trouble getting Bisna's Doctrine.php to autoload when everything is installed via composer. I kept getting "unable to resolve plugin". My workaround was to use a full path for the Bisna plugin in my application.ini:
pluginPaths.Bisna\Application\Resource\ = APPLICATION_PATH "vendor/guilhermeblanco/zendframework1-doctrine2/library/Bisna/Application/Resource"
. . . which really, works fine, though it seems to me that the Composer autoloader should help out here. I am including that in my ZF index.php. Any idea why it's not working in this instance?
oh god! I spent the whole day trying to fix this problem @shaneiseminger is right path has to be absolute
When trying to reduce the amount of entries in the deprecated 'include-path' section of my composer.json I stumbled upon this as well.
The resource autoloader uses the include() statement and therefore either:
- the path should be absolute
- the path is relative and on the include-path
Also see: https://github.com/zendframework/zf1/blob/master/library/Zend/Loader/Autoloader/Resource.php#L201
I too am experiencing this. 'Unable to resolve plugin "doctrine"'.
I'm not sure whether I'm doing this right or not, but changing pluginPaths.Bisna\Application\Resource\ = "Bisna/Application/Resource" to pluginPaths.Bisna\Application\Resource\ = APPLICATION_PATH "vendor/guilhermeblanco/zendframework1-doctrine2/library/Bisna/Application/Resource" did not work for me.
I'm a bit late to the party, but @naroga your path is incorrect. You're missing a hop backwards from the APPLICATION_PATH.
It should be like this:
pluginPaths.Bisna\Application\Resource\ = APPLICATION_PATH "/../vendor/guilhermeblanco/zendframework1-doctrine2/library/Bisna/Application/Resource"
Thanks @halfpastfouram.
I believe the issue was solved. I'm no longer working in that project (or at that same company), so I can't really confirm.
Well, better late than never, right?