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: Reverse Routing does not take into account the default namespace #5936

Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Apr 29, 2022

Description
Fixes #5042 (comment)
Fixes #5934

The following code does not work now.

$routes->get('users/(:num)/gallery(:any)', 'Galleries::showUserGallery/$1/$2');
$match = $routes->reverseRoute('Galleries::showUserGallery', 15, 12);

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

By default, 'App\Controllers\Galleries::showUserGallery/$1/$2' means 'App\Controllers\App\Controllers\Galleries::showUserGallery/$1/$2'.
@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label Apr 29, 2022
@kenjis kenjis merged commit ba6fddc into codeigniter4:develop May 1, 2022
@kenjis kenjis deleted the fix-reverse-routing-default-namespace branch May 1, 2022 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: url_to() is not fully explained. Bug: url_to() does not take into account the default namespace
2 participants