Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow merge router, controller and action configuration #183

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

popovserhii
Copy link

Related to #182

public function canMergeActionAndRouterConfig()
{
return $this->mergeActionAndRouterConfig;
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To prevent potential regression in future releases, I will ask you to test that default configuration is set to false.
Test class for this file can be found here:
https://github.com/widmogrod/zf2-assetic-module/blob/master/tests/AsseticBundleTest/Configuration.php

$config = $this->getRouterConfig();
$mergeConfigs = $this->configuration->canMergeActionAndRouterConfig();
if ($mergeConfigs) {
$config = array_merge($routerConfig, $config);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would you verify that merging returns the expected result?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use this in my project on production and all works as expected.
If you about tests, OK, I'll add some.

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

Successfully merging this pull request may close these issues.

2 participants