Fixed condition with usage "hack" isPostRequest method#12626
Fixed condition with usage "hack" isPostRequest method#12626magento-engcom-team merged 1 commit intomagento:2.2-developfrom
Conversation
There was a problem hiding this comment.
The Signature should be:
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
There was a problem hiding this comment.
What is the purpose of this Interface?
There was a problem hiding this comment.
This interface extends the basic interface and contains methods for determining which HTTP request used. I did not touch the original interface to not do BC break. But if we can move this "contracts" to original Request interface(https://github.com/magento/magento2/blob/56af1e73ce21867b770a7458ab6e109f4a1eface/lib/internal/Magento/Framework/App/RequestInterface.php) it is even better. Because then it will not be necessary to make checks for implementation or special annotations like "$request instance of HttpRequestInterface" or "/** @var $request HttpRequestInterface $request */"
There was a problem hiding this comment.
Thanks! In this case we must create new Interface to not do BC break as you say!
|
Thanks @pusachev for your PR, Can you squash your PR to have only one commit ? If you don't know how to squash, feel free to contact me and I will help you! |
- removed private function isPost - removed unused imports - added request method isPost - added interface that expands HTTP request class - fixed unit test in Contact module - fixed integration tests in Contact module
dae3434 to
ae09d7d
Compare
|
@osrecio Np! Squash done. Please check. |
|
Hi @ihor-sviziev, thank you for the review. |
|
@magento-engcom-team done |
|
Hi @pusachev. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
Contribution checklist