-
Notifications
You must be signed in to change notification settings - Fork 116
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 and improve Hanami 2.2 support #1328
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tombruijn
changed the title
Set Hanami action name from middleware
Fix and improve Hanami 2.2 support
Nov 5, 2024
unflxw
approved these changes
Nov 7, 2024
This comment has been minimized.
This comment has been minimized.
jeffkreeftmeijer
approved these changes
Nov 8, 2024
Add Hanami 2.2 to the build matrix so we test against it on the CI.
Remove the need for the monkeypatch in the Hanami loader and fetch the Hanami action instance from the request env to determine the action name. I'll remove the monkeypatch in the next commit. This only works on Hanami 2.2 and newer. Part of #911
In the previous commit we started reading the action name from the Hanami Action instance on the request env. Disable the monkeypatch on Hanami 2.2+ so it's not doing the same thing twice. We'll leave the monkeypatch for now, but eventually we should be able to remove it. Like on the next major Hanami version or after some years. Part of #911
In Hanami 2.2 they removed the params class. We can't access it that way anymore. This "router.params" env key contains both query params and POST request payload params. This approach seems to be least intrusive and less prone to breaking in future version of Hanami.
Configure the loader to ignore some Hanami built-in errors by default so they don't confuse our users.
tombruijn
force-pushed
the
hanami-2.2
branch
from
November 11, 2024 08:23
72b374c
to
f150098
Compare
This is a message from the daily scheduled checks. |
luismiramirez
approved these changes
Nov 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Hanami 2.2 to the CI build
Add Hanami 2.2 to the build matrix so we test against it on the CI.
Set Hanami action name from middleware
Remove the need for the monkeypatch in the Hanami loader and fetch the Hanami action instance from the request env to determine the action name.
I'll remove the monkeypatch in the next commit.
This only works on Hanami 2.2 and newer.
Part of #911
Disable Hanami monkeypatch on Hanami 2.2
In the previous commit we started reading the action name from the Hanami Action instance on the request env.
Disable the monkeypatch on Hanami 2.2+ so it's not doing the same thing twice. We'll leave the monkeypatch for now, but eventually we should be able to remove it. Like on the next major Hanami version or after some years.
Part of #911
Fix request parameter reporting for Hanami 2.2
In Hanami 2.2 they removed the params class. We can't access it that way anymore.
This "router.params" env key contains both query params and POST request payload params.
This approach seems to be least intrusive and less prone to breaking in future version of Hanami.
Ignore Hanami errors by default
Configure the loader to ignore some Hanami built-in errors by default so they don't confuse our users.