-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 framework json classes #10367
Remove zend json from framework json classes #10367
Conversation
*/ | ||
public function __construct( | ||
\Magento\Framework\App\Helper\Context $context, | ||
\Magento\Framework\Json\DecoderInterface $jsonDecoder, | ||
\Magento\Framework\Json\EncoderInterface $jsonEncoder | ||
\Magento\Framework\Json\EncoderInterface $jsonEncoder, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like these parameters may be deprecated now.
Hi @dmanners Thank you for this PR. We need to adjust the code and cover this cases. |
Hi @okorshenko and @ishakhsuvarov thanks for your time on this review. I would be interested as to why the travis build was showing green even if the tests failed/did not work as expected or does it not run the functional test suite? Anyway my thoughts on the code change needed would be either.
I am leaning towards the 2nd option here since the type hint for the serialize method is What are your thoughts? |
Functional tests suite which is executed on Travis CI has limited number of tests, which covers only the most critical scenarios. Unfortunately running the whole functional tests suite is currently possible only with Magento's internal CI.
I would suggest looking at this approach to be implemented in the Encoder/Decoder classes, since that would minimize the risk of breaking existing third-party extensions which may potentially rely on that behavior.
This the classes in question are already deprecated I would only look into possibility to eliminate their usages, but not to fix those in some ways. |
Hey @dmanners |
hi @ishakhsuvarov, nothing to update here as yet. Will hope to get sometime on this coming up. One thing that is a concern/problem is that magento2/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php Line 48 in 4c9194d
|
@dmanners I am closing this for now due to inactivity. Please reopen if you wish to continue at any time. |
Description
I updated the encoder and decoder classes to use the new serializer class for the case that someone other class is using these directly.
I updated the json helper to stop using the encoder and decoder but instead going directly to the serializer class with half an eye on the removal of the encoder and decoder I thought this was a good option compared to simply updating the encoder and decoder classes.
Fix the import customer composite data test to work with the new serializer.
I was tempted to go through and replace the usage of these classes but I thought that can wait as that is a much bigger change.
I was a bit worried that this change only broke 1 other test class, but still.
Fixed Issues (if relevant)
Contribution checklist