-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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.php to use RouteCollectionInterface #8206
Conversation
Use RouteCollectorInterface rather than RouteCollector to allow for people implementing new RouteCollectors by implementing the interface as intended. Currently this would generate type errors.
Don't remove the PR template. |
Sorry, I'm not really familiar with the process. Just trying to help. |
Okay, thank you for trying to improve CI4. Unfortunately, this issue is not easy to fix.
https://github.com/codeigniter4/CodeIgniter4/actions/runs/6858472463/job/18649336485?pr=8206 |
It looks like RouteCollectionInterface hasn't been updated along with the changes to RouteCollection either. There are some additional functions and some changes to function parameter lists. |
If the core team agrees, it would be possible to fix the interface in But we do not accept a interface change in |
How about adding a new interface in 4.5 instead, then using that for the parameter? Slightly less breakage, and as long as the class implements both interfaces (or maybe the new one extends the old?) it shouldn't affect 99% of devs. |
I sent another PR #8911 |
Use RouteCollectorInterface rather than RouteCollector to allow for people implementing new RouteCollectors by implementing the interface as intended.
Currently this would generate type errors.
Referenced in <#8204>
Checklist: