Skip to content

Fixed #22396 config:set fails with JSON values #22513

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

shikhamis11
Copy link
Member

Fixed #22396 config:set fails with JSON values

Preconditions (*)

  1. 2.3.1

Steps to reproduce (*)

  1. Try to set a config value for a config option that uses JSON values via the command line cli
  2. i.e.: php bin/magento config:sataloginventory/item_options/min_sale_qty "{"32000":2,"0":2}"

Expected result (*)

  1. Config is set to provided value

Actual result (*)

  1. Config is set to empty value.

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)

@m2-assistant
Copy link

m2-assistant bot commented Apr 26, 2019

Hi @shikhamis11. 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

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 add corresponding test case.

@ghost ghost assigned orlangur Apr 26, 2019
@shikhamis11
Copy link
Member Author

shikhamis11 commented Apr 28, 2019

hi @orlangur , I have updated changes for unit test Please review.

@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-5002 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.

@shikhamis11 please add a new test case similar to issue reported - containing some JSON.

After changes are applied and all builds are green, please squash them into a single commit so that we have perfectly clean history 😉

@Nazar65
Copy link
Member

Nazar65 commented May 14, 2019

Hi @shikhamis11 please look at failed unit test

Too few arguments to function Magento\CatalogInventory\Test\Unit\Helper\MinsaleqtyTest::testGetConfigValue(), 2 passed and at least 4 expected
#0 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestCase.php(894): PHPUnit\Framework\TestResult->run(Object(Magento\CatalogInventory\Test\Unit\Helper\MinsaleqtyTest))
#1 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(755): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#2 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(755): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#3 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(755): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#4 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(755): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#5 /var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(545): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#6 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(195): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#7 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(148): PHPUnit\TextUI\Command->run(Array, true)
#8 /var/www/html/vendor/phpunit/phpunit/phpunit(53): PHPUnit\TextUI\Command::main()
#9 {main}

@Nazar65
Copy link
Member

Nazar65 commented May 15, 2019

@shikhamis11 thank you, can you "squash" commit to one ?

@shikhamis11
Copy link
Member Author

Yes I will

@Nazar65 Nazar65 force-pushed the 2.3-developPr22396 branch from 42a66eb to 8da509a Compare May 16, 2019 06:33
@Nazar65
Copy link
Member

Nazar65 commented May 21, 2019

ping @orlangur

@magento-engcom-team
Copy link
Contributor

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

@m2-assistant
Copy link

m2-assistant bot commented May 24, 2019

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

config:set fails with JSON values
6 participants