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

Remove zend json from package info #10340

Merged

Conversation

dmanners
Copy link
Contributor

@dmanners dmanners commented Jul 26, 2017

Description

Replace Zend_Json usage in Framework/Module/PackageInfo.php …

  • inject the new \Magento\Framework\Serialize\Serializer\Json class,
  • update the load method to use the Serializer,
  • update the load method to catch the InvalidArgumentException exception

Fixed Issues (if relevant)

  1. Upgrade ZF components. Zend_Json #9236: Upgrade ZF components. Zend_Json

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)

dmanners added 2 commits July 26, 2017 19:51
 - inject the new \Magento\Framework\Serialize\Serializer\Json class,
 - update the load method to use the Serializer,
 - update the load method to catch the InvalidArgumentException exception
} catch (\Zend_Json_Exception $e) {
throw new \Zend_Json_Exception(
$packageData = $this->serializer->unserialize($jsonData[$key]);
} catch (\InvalidArgumentException $e) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not a big fan of catching this and then throwing the same exception. I was thinking about adding a new exception for this case here. What are people's thoughts on this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you mean specific exception for Json or Serialization?
I assume this specific fix is fine, since there is no major change.

@okorshenko okorshenko self-assigned this Jul 26, 2017
@okorshenko okorshenko added this to the July 2017 milestone Jul 26, 2017
@magento-team magento-team merged commit fd155b3 into magento:develop Jul 27, 2017
magento-team pushed a commit that referenced this pull request Jul 27, 2017
[EngCom] Public Pull Requests
 - MAGETWO-71060 Remove zend json from package info #10340
 - MAGETWO-71059 Remove Zend_Json from setup #10339
@dmanners dmanners deleted the remove-zend-json-from-package-info branch July 28, 2017 07:00
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.

4 participants