Skip to content

magento/magento2#: Replace deprecated addError, addSuccess, addException methods in Magento/Customer/Controller/Account/CreatePost.php #24197

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

@atwixfirster atwixfirster commented Aug 20, 2019

Description (*)

Pull request replaces deprecated addError, addSuccess, addException methods in Magento/Customer/Controller/Account/CreatePost.php of Magento_Customer module:

addError -> addErrorMessage
addSuccess -> addSuccessMessage
addException -> addExceptionMessage

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!

…ion methods in Magento_Customer module

addError -> addErrorMessage
addSuccess -> addSuccessMessage
addException -> addExceptionMessage
@m2-assistant
Copy link

m2-assistant bot commented Aug 20, 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: Customer Release Line: 2.3 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Aug 20, 2019
@atwixfirster atwixfirster added Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner and removed Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Aug 20, 2019
@dmytro-ch dmytro-ch self-requested a review August 20, 2019 06:15
@dmytro-ch dmytro-ch self-assigned this Aug 20, 2019
…ion methods in Magento_Customer module

Fix. Unit tests
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 check the failed integration tests.
There is a difference in expected results due to escaped characters after using the new methods.

@atwixfirster atwixfirster changed the title magento/magento2#: Replace deprecated addError, addSuccess, addException methods in Magento_Customer module magento/magento2#: Replace deprecated addError, addSuccess, addException methods in Magento/Customer/Controller/Account/CreatePost.php Aug 25, 2019
…ion methods in Magento/Customer/Controller/Account/CreatePost.php
@atwixfirster
Copy link
Contributor Author

@atwixfirster , could you please check the failed integration tests.

done

@dmytro-ch, could you please review?

Thank you!

@dmytro-ch dmytro-ch added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests and removed Area: Frontend labels Aug 29, 2019
@magento-engcom-team
Copy link
Contributor

Hi @dmytro-ch, thank you for the review.
ENGCOM-5730 has been created to process this Pull Request
✳️ @dmytro-ch, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Copy link
Contributor

@sidolov sidolov left a comment

Choose a reason for hiding this comment

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

@atwixfirster looks like the simple implementation with just messages became a really complex, could you please clarify why we need to use additional templates for simple messages that can be inlined and used in addSuccessMessage method?

@ghost ghost assigned sidolov Oct 1, 2019
@atwixfirster
Copy link
Contributor Author

atwixfirster commented Oct 2, 2019

@atwixfirster looks like the simple implementation with just messages became a really complex, could you please clarify why we need to use additional templates for simple messages that can be inlined and used in addSuccessMessage method?

Hi, @sidolov !

I will try to explain on the following example.

Preconditions:

  1. Go to CUSTOMERS > Customer Configuration > Create New Account Options on the back-end side
  2. Set option Require Emails Confirmation = Yes

Steps to reproduce:

  1. Register a new customer on FE side
  2. With addComplexSuccessMessage you will get:

24197_01

  1. With addSuccessMessage output result will be a slightly different:

24197_02

Thank you!

@atwixfirster
Copy link
Contributor Author

atwixfirster commented Oct 3, 2019

@atwixfirster looks like the simple implementation with just messages became a really complex,...

@sidolov , you can see the same implementations in the Magento_Wishlist module:

Thank you!

magento-engcom-team pushed a commit that referenced this pull request Oct 22, 2019
…ss, addException methods in Magento/Customer/Controller/Account/CreatePost.php #24197
@magento-engcom-team magento-engcom-team merged commit dd34452 into magento:2.3-develop Oct 22, 2019
@m2-assistant
Copy link

m2-assistant bot commented Oct 22, 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 Oct 22, 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 Award: test coverage 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.

6 participants