Skip to content

Remove direct use of object manager #23020

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

Conversation

AnshuMishra17
Copy link
Contributor

Description (*)

Remove the direct use of object manager and replace it with the dependency injection.

Manual testing scenarios (*)

  1. Tried accessing the cms grid listing page and got success.
  2. Ran unit tests for cms module.

@m2-assistant
Copy link

m2-assistant bot commented May 27, 2019

Hi @AnshuMishra17. 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 Assistant documentation

*/
public function __construct(
Context $context,
PageFactory $resultPageFactory
PageFactory $resultPageFactory,
DataPersistorInterface $dataPersistor
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
DataPersistorInterface $dataPersistor
DataPersistorInterface $dataPersistor = null

To make it an optional backward compatible argument

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @atishgoswami
I have updated the code as per the suggestion.

@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-5168 has been created to process this Pull Request

@VasylShvorak
Copy link
Contributor

✔️ QA passed

Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

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

Please squash changes into a single commit so that we have perfectly clean history 😉

@AnshuMishra17
Copy link
Contributor Author

@orlangur I have squashed to single commit.

@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-5168 has been created to process this Pull Request

@VasylShvorak
Copy link
Contributor

✔️ QA passed

magento-engcom-team pushed a commit to okorshenko/magento2 that referenced this pull request May 31, 2019
@magento-engcom-team magento-engcom-team merged commit e2d6415 into magento:2.3-develop May 31, 2019
@m2-assistant
Copy link

m2-assistant bot commented May 31, 2019

Hi @AnshuMishra17, 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.3 milestone May 31, 2019
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.

6 participants