Skip to content

magento/magento2#: Captcha. Improvement. Replace deprecated addError with addErrorMessage. #24340

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

Conversation

atwixfirster
Copy link
Contributor

Description (*)

Pull request replaces deprecated addError method with a new one - addErrorMessage in the Magento_Captcha module.

Fixed Issues (if relevant)

  1. magento/magento2#<issue_number>: Issue title

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

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 are green)

Thank you!

@m2-assistant
Copy link

m2-assistant bot commented Aug 28, 2019

Hi @atwixfirster. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@magento-engcom-team magento-engcom-team added Component: Captcha Release Line: 2.3 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Aug 28, 2019
@atwixfirster atwixfirster force-pushed the captcha-replace-deprecated-addError branch from 1a49cf8 to 45de309 Compare August 28, 2019 14:50
@southerncomputer
Copy link
Contributor

Why not replace all AddSuccess, AddError, and AddException calls to new format?

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Hi @atwixfirster,
Could you review and fix failing static tests?

@ghost ghost assigned ihor-sviziev Aug 28, 2019
@ihor-sviziev ihor-sviziev added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Aug 28, 2019
@atwixfirster atwixfirster force-pushed the captcha-replace-deprecated-addError branch 2 times, most recently from 8469797 to ee06632 Compare August 29, 2019 06:03
@ihor-sviziev
Copy link
Contributor

@magento run all

@sidolov
Copy link
Contributor

sidolov commented Aug 29, 2019

@magento combine 24334 24284

@magento-engcom-team
Copy link
Contributor

Hi @sidolov. Thank you for your request. I'm working on combining the pull requests for you

@magento-engcom-team
Copy link
Contributor

@atwixfirster all pull requests have been successfully combined together:

Copy link
Contributor

@dmytro-ch dmytro-ch left a comment

Choose a reason for hiding this comment

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

@atwixfirster , could you please also check the issue mentioned id the "child" PR #24334.
Thank you!

@ihor-sviziev
Copy link
Contributor

@magento run all tests

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Hi @atwixfirster,
Could you review my comments?
Also there is some issues with tests for this PR, I think we can ignore these issues

@@ -486,7 +492,8 @@ public function getAddressById($addressId)
* Getting customer address object from collection by identifier
*
* @param int $addressId
* @return Address
* @return \Magento\Framework\DataObject
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn’t it returns Address object? Looks like incorrect change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it returns Address object.

@@ -537,7 +545,8 @@ public function getAddresses()
/**
* Retrieve all customer attributes
*
* @return Attribute[]
* @return array
Copy link
Contributor

Choose a reason for hiding this comment

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

It’s better to keep original return statement there. Or it was incorrect?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the origin return statement is correct.

Thanks, @ihor-sviziev

*/
protected $_validatorFactory;
protected $dateTime;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you moved it above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sort in alphabetical order ;) I can revert this change if you request it. Thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

It’s better to keep only needed changes in order to prevent conflicts, so please revert it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes. Now I understand this. Thank you

@@ -175,9 +182,11 @@ public function __construct(
$cookieMetadataFactory,
$appState
);
$this->_eventManager->dispatch('customer_session_init', ['customer_session' => $this]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why you move it above?

Copy link
Contributor Author

@atwixfirster atwixfirster Sep 3, 2019

Choose a reason for hiding this comment

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

Sort in alphabetical order ;)

I was wrong in this case... Thank you for notice

Copy link
Contributor

Choose a reason for hiding this comment

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

It’s better to keep only needed changes in order to prevent conflicts, so please revert it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@atwixfirster atwixfirster force-pushed the captcha-replace-deprecated-addError branch from d490c6e to 5de9fdf Compare September 3, 2019 05:36
@magento-engcom-team
Copy link
Contributor

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

use Magento\Customer\Model\Url;
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
use Magento\Framework\App\Action\HttpPosttActionInterface as HttpPostActionInterface;
Copy link
Contributor

Choose a reason for hiding this comment

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

You made spelling mistake in HttpPosttActionInterface . Please, delete the extra letter t

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, @engcom-Alfa !

Thank you!

Copy link
Contributor

@engcom-Alfa engcom-Alfa left a comment

Choose a reason for hiding this comment

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

You made spelling mistake in HttpPosttActionInterface . Please, delete the extra letter t

…with addErrorMessage.

magento/magento2#: Replace deprecated Magento\Customer\Model\Customer::isConfirmationRequired method
magento/magento2#: Replace deprecated addError, addSuccess, addException methods in Magento/Customer/Controller/Account/Confirmation.php
@atwixfirster atwixfirster force-pushed the captcha-replace-deprecated-addError branch from 3281416 to 41a35bd Compare September 12, 2019 09:41
@atwixfirster
Copy link
Contributor Author

You made spelling mistake in HttpPosttActionInterface . Please, delete the extra letter t

fixed

@magento-engcom-team
Copy link
Contributor

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

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

magento-engcom-team pushed a commit that referenced this pull request Sep 14, 2019
@magento-engcom-team magento-engcom-team merged commit 8cbc374 into magento:2.3-develop Sep 14, 2019
@m2-assistant
Copy link

m2-assistant bot commented Sep 14, 2019

Hi @atwixfirster, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.4 milestone Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Captcha Component: Customer Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants