-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[2.4] Add support for missing Curl methods to the Curl client #39471
base: 2.4-develop
Are you sure you want to change the base?
[2.4] Add support for missing Curl methods to the Curl client #39471
Conversation
Hi @lbajsarowicz. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
@magento run all tests (after changing the method to pass payloads) |
Failed to run the builds. Please try to re-run them later. |
@magento run all tests |
… ("backwards compatibility")
@magento run all tests I simplified the |
*/ | ||
public function delete($uri) | ||
{ | ||
$this->makeRequest("DELETE", $uri, $params); |
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.
@lbajsarowicz there's a bug in here - it uses $params for makeRequest but is not receiving any in the method head, there's only $uri there.
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.
Nice catch. I'm handling it.
@magento run all tests |
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.
Hello @lbajsarowicz,
Thanks for the contribution!
Please have a look at the below review comments.
Thanks
* | ||
* @url https://www.rfc-editor.org/rfc/rfc9110.html#section-9.3.5 | ||
*/ | ||
public function delete($uri) |
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.
Add void
as the function return type
public function delete($uri) | |
public function delete($uri): 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.
As per the documentation, delete method might have Payload. So I think we can add $params
as an optional variable. I think here @bgorski is just pointing out that we are not passing $params
but using it in the makeRequest method.
Description (*)
Cherry-picked change from #39330 rated as "backwards-incompatible" by @engcom-Dash rejecting all the changes to Testing Framework, leaving just the new methods in the
Curl
class.It makes me upset that after spending hours to get the previous PR in shape to merge, this bug fix was taken down instead of recommendation to fix imaginary "backwards incompatiblity", provided Maintainers can point what change became backwards-incompatible.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)