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

Clarifying nested $routes->group() options [ci skip] #3985

Merged
merged 1 commit into from
Dec 13, 2020
Merged

Clarifying nested $routes->group() options [ci skip] #3985

merged 1 commit into from
Dec 13, 2020

Conversation

tangix
Copy link
Contributor

@tangix tangix commented Dec 13, 2020

Description
Added to the documentation that when nesting $routes->group(), the options passed to the outer group() is not merged with the inner group(). A definition such as:

$routes->group('config', ['filter' => 'myfilter:config'], function ($routes) {
    $routes->get('/', 'Home::index');
    $routes->group('region', ['filter' => 'myfilter:region'], function ($routes) {
        $routes->get('/', 'Home::index');
    });
});

would only call myfilter:region for config/region which may not be what a user expects.

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@MGatner MGatner merged commit f3389d1 into codeigniter4:develop Dec 13, 2020
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