-
Notifications
You must be signed in to change notification settings - Fork 2.5k
router defaults not being set properly in console #4652
Conversation
The router defaults were not being set correctly when the "console.router" config was not present.
$routerClass = 'Zend\Mvc\Router\Console\SimpleRouteStack'; | ||
$routerConfig = isset($config['console']['router']) ? $config['console']['router'] : array(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is exactly what the if
block was doing above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
never mind, now I see why this works.
@weierophinney @mwillbanks Can you include this fix in the 2.2.1 release? Now this version does not work, we need to use 2.2.0. |
@ossinkine Since 2.2.1 is already released, no. I may do a 2.2.1p1 release, however, if I get time today. The release works fine -- it's only with very specific, CLI-only, use cases that this issue affects people (primarily if no console routes are defined, or some situations that occur with Zend\Test). You can use latest master until we get a patched version out. |
@weierophinney solution worked for me. can someone request a pull into the Zend 2.2.1 repository to add this line of code in the application? Thanks. |
We cannot update an existing release. I will try and create a patch release
|
You can fix the problem by adding the following section to your application configuration: /**
* Remove this configuration once ZF 2.2.2 is released.
*
* See https://github.com/zendframework/zf2/pull/4652
*/
'console' => array(
'router' => array(),
), |
The router configuration defaults were not being set correctly when the
console.router
config was not present.