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
4.x - Add route context helper #2759
Conversation
Looks good, althoug I have to check in more depth. Could you please add the slim file header comment to the two new files? |
In |
@adriansuter and do what? Throw an exception? PHP will already throw a |
@shadowhand we need to throw an exception to notify the user that routing hasn't been performed if those attributes are null. Probably throw a |
Or an But then, a call to this static method has to be wrapped into a try-catch block. Probably it is better to throw a |
@l0gicgate @adriansuter updated with your requested changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some imports can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me @adriansuter can you review one last time before I merge please?
Thanks - everything is fine. |
We should not forget to update the docs about this new feature. |
@adriansuter absolutely |
Creates a new
RouteContext
class that can be used to gain access to the current request route, route parser, and routing results.Fixes #2758
Fixes #2761