Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

router defaults not being set properly in console #4652

Closed
wants to merge 1 commit into from

Conversation

radnan
Copy link
Contributor

@radnan radnan commented Jun 13, 2013

The router configuration defaults were not being set correctly when the console.router config was not present.

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();
Copy link
Member

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.

Copy link
Member

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.

@ghost ghost assigned mwillbanks Jun 13, 2013
mwillbanks pushed a commit that referenced this pull request Jun 13, 2013
@ossinkine
Copy link
Contributor

@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.

@weierophinney
Copy link
Member

@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.

@diego3g
Copy link

diego3g commented Jun 15, 2013

@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.

@weierophinney
Copy link
Member

We cannot update an existing release. I will try and create a patch release
(e.g. 2.2.1p1), but the availability of my tram is quite curtailed this
week.
On Jun 15, 2013 7:27 AM, "Diego Fernandes" [email protected] wrote:

@weierophinney https://github.com/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.


Reply to this email directly or view it on GitHubhttps://github.com//pull/4652#issuecomment-19497207
.

@localheinz
Copy link
Member

@diego3g @ossinkine

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(),
),

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants