Skip to content

Update checkout controller json usage #12806

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

dmanners
Copy link
Contributor

@dmanners dmanners commented Dec 19, 2017

Description

The controller app/code/Magento/Checkout/Controller/Account/Create.php uses the object manager directly when building it's json response. I have replaced the usage of object manager with the usage of $this->resultFactory->create(ResultFactory::TYPE_JSON);

Manual testing scenarios

  1. Creating an account via checkout using this branch and the clean mainline branch should result in the exact same behavior.

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)

->with(100)
->will($this->returnValue($customer));

$resultJson = '{"errors": "false", "message": "A letter with further instructions will be sent to your email."}';
Copy link
Contributor

Choose a reason for hiding this comment

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

@dmanners Please can you split this up so the line doesn't exceed 120 characters? I'd do it myself but my VM pretends to by dying atm so I cannot run my tests locally sigh. ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure I can sort that out today

@dmanners
Copy link
Contributor Author

@mzeis updated from your feedback.

@mzeis
Copy link
Contributor

mzeis commented Dec 21, 2017

Thank you very much for your contribution, the change will be merged!

@magento-team magento-team merged commit 43d6ee8 into magento:2.3-develop Dec 26, 2017
@dmanners dmanners deleted the update-checkout-controller-json-usage branch January 24, 2018 16:42
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.

3 participants