Skip to content

Fixed condition with usage "hack" isPostRequest method #12626

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

Merged
merged 1 commit into from
Jun 7, 2018

Conversation

pusachev
Copy link
Contributor

  • removed private function isPost
  • removed unused imports
  • added request method isPost
  • added interface that expands HTTP request class

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Dec 11, 2017

CLA assistant check
All committers have signed the CLA.

@@ -0,0 +1,52 @@
<?php
/**
* @author Pavel Usachev <webcodekeeper@hotmail.com>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Signature should be:

/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

@@ -0,0 +1,52 @@
<?php
Copy link
Member

@osrecio osrecio Dec 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this Interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 */"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! In this case we must create new Interface to not do BC break as you say!

@osrecio
Copy link
Member

osrecio commented Dec 12, 2017

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!

@osrecio osrecio self-assigned this Dec 12, 2017
- 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
@pusachev
Copy link
Contributor Author

@osrecio Np! Squash done. Please check.

@ihor-sviziev ihor-sviziev self-assigned this Jun 5, 2018
@magento-engcom-team magento-engcom-team added this to the Release: 2.2.6 milestone Jun 5, 2018
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-1875 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

@pusachev thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@pusachev
Copy link
Contributor Author

pusachev commented Jun 5, 2018

@magento-engcom-team done

@magento-engcom-team
Copy link
Contributor

Hi @pusachev. Thank you for your contribution.
Changes from your Pull Request will be available with the upcoming 2.2.6 release.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants