-
Notifications
You must be signed in to change notification settings - Fork 90
Add Zend\ServiceManager v3 compatibility #59
Add Zend\ServiceManager v3 compatibility #59
Conversation
I see the tests fail. I just tried a |
Here is my generated composer.json {
"name": "zendframework/zend-expressive-skeleton",
"type": "project",
"homepage": "https://github.com/zendframework/zend-expressive-skeleton",
"license": "BSD-3-CLAUSE",
"authors": [
{
"name": "Geert Eltink",
"homepage": "https://xtreamwayz.github.io/"
}
],
"require": {
"roave/security-advisories": "dev-master",
"zendframework/zend-expressive": "^0.5",
"zendframework/zend-stdlib": "~2.7",
"zendframework/zend-expressive-fastroute": "^0.1",
"zendframework/zend-servicemanager": "^2.5",
"ocramius/proxy-manager": "^1.0",
"zendframework/zend-expressive-twigrenderer": "^0.1"
},
"require-dev": {
"composer/composer": ">=1.0.0-alpha10",
"phpunit/phpunit": "^4.8",
"squizlabs/php_codesniffer": "^2.3",
"filp/whoops": "^1.1"
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"AppTest\\": "test/"
}
},
"scripts": {
"test": [
"php vendor/squizlabs/php_codesniffer/scripts/phpcs",
"php vendor/phpunit/phpunit/phpunit"
]
}
}
`` |
Last information, after using the installer, if I
|
The way to make it work with both v2 and v3 is to create a I'm really not sure how you were getting the 3.0 version (the constraints should never install it), nor why an update is downgrading versions to pre-1.0 tags. Honestly, I suspect a subtle composer issue or stale composer cache. |
Thanks for you suggestion, I have updated this PR. |
Add Zend\ServiceManager v3 compatibility
Hello,
I wanted to give this skeleton a try. So I just did
composer create-project zendframework/zend-expressive-skeleton
but directly ran into the following error after install :Fatal error: Uncaught TypeError: Argument 1 passed to Zend\ServiceManager\ServiceManager::__construct() must be of the type array, object given
I had chosen : FastRoute, Zend\ServiceManager and Twig as dependencies.
It appears that the installer made me download Zend\ServiceManager v3 as dependency. This PR fixes the config file to be compliant with v3, whose constructor expects an array to be injected.