Shardj/zf1-future

Bootstrap error: Unable to resolve plugin "useragent"; no corresponding plugin with that name

kstenschke opened this issue · 8 comments

Bootstrap fails with error Unable to resolve plugin "useragent"; no corresponding plugin with that name
this error occurs on our system with zf1-future versions > 1.17.2

I suspect d822ef1 being related to the issue (added a comment into that commit as well).

Probably additional change of the autoloader configuration must be done after this diff, related info within readme.md would be helpful.

do you have example code, how i can trigger this error?

$zf = new \Zend_Application( APP_ENV, APPLICATION_PATH . '/config/application.ini' );

in the application.ini we had this option:

resources.useragent.mobile.features.classname = "Zend_Http_UserAgent_Features_Adapter_Browscap"

after commenting this out, the application got bootstrapped and worked

in the vendor/shardj/zf1-future/library/Zend/Application/Resource/UserAgent.php the class name is UserAgent, should it be Zend_Application_Resource_UserAgent?

The rename of the class name worked for me.

yes, as you were typing i also found the offending commits and reverted them in dev-master :)

nice great work, thanks for the quick response, a version bump so we can do a composer update?

In our installation, this problem was caused by a WURFL API configuration nested in application.yaml (application.ini), under resources.useragent.wurflapi.

Configuration entry was: resources.useragent

The problem resolved by changing the entry into: resources.Zend_Application_Resource_UserAgent

adli commented

The problem still exists on Linux environment (case-sensitive filenames).

For Quick fix, please rename the file UserAgent.php to Useragent.php in /shardj/zf1-future/library/Zend/Application/Resource/
directory. (that's the filename in original Zend framework)

Thanks