Skip to content
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

Fix #21692 #21752 - logic in constructor of address validator and Locale Resolver check #21693

Conversation

Bartlomiejsz
Copy link
Contributor

@Bartlomiejsz Bartlomiejsz commented Mar 11, 2019

Description (*)

This fixes issue #21692 - error is described there

Fixed Issues (if relevant)

  1. Incorrect constructor of Magento\Sales\Model\Order\Address\Validator #21692: Incorrect constructor of Magento\Sales\Model\Order\Address\Validator
  2. Error while installing Magento from scratch if Locale Resolver is injected in cli command #21752: Error while installing Magento from scratch if Locale Resolver is injected in cli command

Manual testing scenarios (*)

  1. Add custom module with Cli Command and inject Magento\Sales\Model\Order\Address\Validator into its constructor
  2. Run Magento installation from Cli
  3. Verify if installation is finished with success

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-engcom-team
Copy link
Contributor

Hi @Bartlomiejsz. 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-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

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

@soleksii
Copy link

Hi @Bartlomiejsz !

I've checked PR and it looks like changes does not solve the problem.

Manual testing scenario:

  1. Add custom module with Cli Command and inject Magento\Sales\Model\Order\Address\Validator into its constructor;
  2. Try to install Magento from scratch using Cli;
  3. See following error:
    problem

@Bartlomiejsz
Copy link
Contributor Author

Hi @stoleksiy, this is another error. I wasn't aware that it also will appear for this class. I will add another issue and prepare PR later. Seems that those two are just combined and the other one have to be merged first.

@soleksii
Copy link

soleksii commented Mar 14, 2019

@Bartlomiejsz But, how can i check solution to the issue #21692 ? You need to solve the problem in scope of this PR.

@Bartlomiejsz
Copy link
Contributor Author

@stoleksiy ok then, I will add fixing changes to this PR

@Bartlomiejsz Bartlomiejsz changed the title Fix #21692 - logic in constructor of address validator Fix #21692 #21752 - logic in constructor of address validator and Locale Resolver check Mar 14, 2019
@Bartlomiejsz
Copy link
Contributor Author

@stoleksiy I've added fix for second issue

private function getDeploymentConfig()
{
if (!$this->deploymentConfig) {
$this->deploymentConfig = ObjectManager::getInstance()->get(DeploymentConfig::class);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you move deploymentConfig as last argument in constructor? It's not a good idea to get it through ObjectManager.

See "Adding a constructor parameter" section in https://devdocs.magento.com/guides/v2.3/contributor-guide/backward-compatible-development/

Copy link
Contributor

Choose a reason for hiding this comment

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

Also look at failing unit tests. Please fix them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ihor-sviziev please check again now

@ihor-sviziev ihor-sviziev self-requested a review March 18, 2019 09:27
@magento magento deleted a comment Mar 18, 2019
@magento-engcom-team
Copy link
Contributor

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

@soleksii
Copy link

✔️ QA Passed

Result:

after

@ghost
Copy link

ghost commented Mar 25, 2019

Hi @Bartlomiejsz, 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.

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