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: DefinedRouteCollector to use RouteCollectionInterface #8911

Merged
merged 6 commits into from
Jun 15, 2024

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented May 24, 2024

Description
Supersedes #8206
See #6814

  • fix RouteCollectionInterface
  • DefinedRouteCollector uses RouteCollectionInterface instead of RouteCollection

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

@kenjis kenjis added bug Verified issues on the current code behavior or pull requests that will fix them breaking change Pull requests that may break existing functionalities 4.6 docs needed Pull requests needing documentation write-ups and/or revisions. labels May 24, 2024
Copy link
Contributor

@datamweb datamweb left a comment

Choose a reason for hiding this comment

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

Looks good so far.

Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

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

Ok, we just need some changelog.

'message' => '#^Call to an undefined method CodeIgniter\\\\Router\\\\RouteCollectionInterface\\:\\:setHTTPVerb\\(\\)\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Router/Router.php',
'message' => '#^Call to an undefined method CodeIgniter\\\\Router\\\\RouteCollectionInterface\\:\\:getRegisteredControllers\\(\\)\\.$#',
Copy link
Member

Choose a reason for hiding this comment

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

If we are fixing the interface, why are we not adding this missing method?

Copy link
Member Author

Choose a reason for hiding this comment

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

The method is only for AutoRouting Improved, and marked as @interal.
I don't think the RouteCollectionInterface should have it.

@kenjis kenjis force-pushed the fix-DefinedRouteCollector branch from fa31017 to 1994d1e Compare June 13, 2024 01:12
@kenjis kenjis removed the docs needed Pull requests needing documentation write-ups and/or revisions. label Jun 13, 2024
@kenjis
Copy link
Member Author

kenjis commented Jun 13, 2024

Added docs.

@kenjis kenjis requested a review from paulbalandan June 14, 2024 00:37
@kenjis kenjis merged commit 71d4371 into codeigniter4:4.6 Jun 15, 2024
42 checks passed
@kenjis kenjis deleted the fix-DefinedRouteCollector branch June 15, 2024 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.6 breaking change Pull requests that may break existing functionalities 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.

4 participants