-
Notifications
You must be signed in to change notification settings - Fork 4
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
Symfony 5.x support #31
Conversation
@kiettran any idea on when you will finish this? |
It's done. |
Thanks for the effort (again). In its current form I'm unable approve this. Symfony 4.4 is supported until the end of 2022 and I'm unwilling to drop support for it when Symfony does not. Though, I am willing to drop support for Symfony 3.4 to make the upgrade path easier. A lot is going on in this pull request and it's not just Symfony 5.x support. It should only contain just that. |
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.
Finally had some time to review in more detail. I still think it is possible to support all three currently maintained Symfony versions.
@@ -71,7 +71,7 @@ public function __construct( | |||
/** | |||
* Validates the body of a request to an OpenAPI specification route. Throws an exception when validation failed. | |||
*/ | |||
public function validateRequestBody(GetResponseEvent $event): void | |||
public function validateRequestBody(RequestEvent $event): void |
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.
By changing to the following, it's made compatible with both Symfony 3.4 and 4.4/5.1 (including the above suggestions):
public function validateRequestBody(RequestEvent $event): void | |
public function validateRequestBody($event): void |
tests/EventListener/JsonRequestBodyValidationSubscriberTest.php
Outdated
Show resolved
Hide resolved
I noticed after my review that the change of type hints in the For this I tried the following changes: Although it's not the prettiest code, it works like a charm. 😄 When you rebase to master and possibly fix the conflicts, I can PR it to your branch. If you need any help getting this ready. Let me know! |
Co-authored-by: Niels Nijens <nijens.niels@gmail.com>
Co-authored-by: Niels Nijens <nijens.niels@gmail.com>
Thanks! |
This pull request adds full symfony 5 support. Do note, this pull request does not have symfony 3.4 or symfony 4.x support anymore.
#23