zfcampus / zf-api-problem

BSD 3-Clause "New" or "Revised" License
27 stars 26 forks source link

Zend ServiceManager dependency #46

Closed vincequeiroz closed 8 years ago

vincequeiroz commented 8 years ago

The version 1.2.0 is using the version of ServiceManager v3 when implements the FactoryInterface, but Zend MVC require allow use ServiceManager v2.

https://github.com/zfcampus/zf-api-problem/blob/1.2.0/composer.json#L35 https://github.com/zfcampus/zf-api-problem/search?utf8=%E2%9C%93&q=FactoryInterface

https://github.com/zendframework/zend-mvc/blob/release-2.7.9/composer.json#L18 https://github.com/zendframework/zend-servicemanager/tree/release-2.7.5/src/Factory https://github.com/zendframework/zend-servicemanager/tree/release-3.0.0/src/Factory

jackdpeterson commented 8 years ago

Bump on this. This broke Apigility for us.

jackdpeterson commented 8 years ago

Stack trace:

PHP Fatal error:  Interface 'Zend\ServiceManager\Factory\FactoryInterface' not found in /var/www/domains/com.example/vendor/zfcampus/zf-api-problem/src/Factory/ApiProblemListenerFactory.php on line 14
PHP Stack trace:
PHP   1. {main}() /var/www/domains/com.example/win_index.php:0
PHP   2. require_once() /var/www/domains/com.example/win_index.php:4
PHP   3. Zend\Mvc\Application::init() /var/www/domains/com.example/public/index.php:63
PHP   4. Zend\Mvc\Application->bootstrap() /var/www/domains/com.example/vendor/zendframework/zend-mvc/src/Application.php:281
PHP   5. Zend\EventManager\EventManager->triggerEvent() /var/www/domains/com.example/vendor/zendframework/zend-mvc/src/Application.php:169
PHP   6. Zend\EventManager\EventManager->triggerListeners() /var/www/domains/com.example/vendor/zendframework/zend-eventmanager/src/EventManager.php:251
PHP   7. call_user_func:{/var/www/domains/com.example/vendor/zendframework/zend-eventmanager/src/EventManager.php:490}() /var/www/domains/com.example/vendor/zendframework/zend-eventmanager/src/EventManager.php:490
PHP   8. ZF\ApiProblem\Module->onBootstrap() /var/www/domains/com.example/vendor/zendframework/zend-eventmanager/src/EventManager.php:490
PHP   9. Zend\ServiceManager\ServiceManager->get() /var/www/domains/com.example/vendor/zfcampus/zf-api-problem/src/Module.php:42
PHP  10. Zend\ServiceManager\ServiceManager->create() /var/www/domains/com.example/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:530
PHP  11. Zend\ServiceManager\ServiceManager->doCreate() /var/www/domains/com.example/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:597
PHP  12. Zend\ServiceManager\ServiceManager->createFromFactory() /var/www/domains/com.example/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:634
PHP  13. class_exists() /var/www/domains/com.example/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:1087
PHP  14. spl_autoload_call() /var/www/domains/com.example/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:1087
PHP  15. Composer\Autoload\ClassLoader->loadClass() /var/www/domains/com.example/vendor/zendframework/zend-servicemanager/src/ServiceManager.php:1087
PHP  16. Composer\Autoload\includeFile() /var/www/domains/com.example/vendor/composer/ClassLoader.php:301
PHP  17. include() /var/www/domains/com.example/vendor/composer/ClassLoader.php:412
jackdpeterson commented 8 years ago

The temporary workaround is to set

"zfcampus/zf-api-problem": "1.1.0",

does get Apigility working again.

Iraecio commented 8 years ago

@jackdpeterson u set in zf-apigility package?

jackdpeterson commented 8 years ago

@Iraecio -- This is set in composer.json's require section. When one performs a composer.phar update this change pins this dependency to the specific version that I know is compatible with the other items that I have installed. I think the fix for this would be to set api-problem's minimum dependencies to something higher than what it is.

Iraecio commented 8 years ago

Installing zfcampus/zf-api-problem (1.1.0) success but no fix error.

simonbaudry commented 8 years ago

Using zfcampus/zf-api-problem in version 1.1.0 did the trick for us. Thanks.

weierophinney commented 8 years ago

I'll get this fixed immediately - thanks for the report!

weierophinney commented 8 years ago

You can now pin to ^1.2.1! :smile:

jackdpeterson commented 8 years ago

Thanks, looks good here :-)