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

Fix: multiple subgroups not work #16

Merged
merged 1 commit into from Jan 19, 2020
Merged

Conversation

thenotsoft
Copy link
Member

@thenotsoft thenotsoft commented Jan 18, 2020

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Tests pass? ✔️
Fixed issues
$router = ... 
    
$router->addGroup('/api', static function (RouteCollectorInterface $r) {
    $r->addRoute(Route::get('/comments'));
    $r->addGroup('/posts', static function (RouteCollectorInterface $r) {
        $r->addRoute(Route::get('/list'));
    });
    $r->addGroup('/comments', static function (RouteCollectorInterface $r) {
        $r->addRoute(Route::get('/list'));
    });
});

the loop stops at the first group found, and the remaining groups and routers are ignored
and when you try to go to the url api/comments/list returns 404

@samdark samdark added the type:bug Bug label Jan 19, 2020
@samdark samdark merged commit 74d7fbd into yiisoft:master Jan 19, 2020
@samdark
Copy link
Member

samdark commented Jan 19, 2020

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants