-
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
Static properties serialization fix. #26175
Static properties serialization fix. #26175
Conversation
Hi @p-bystritsky. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
8a881e8
to
2339529
Compare
2339529
to
9383fe1
Compare
@magento run all tests |
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.
Hi @p-bystritsky,
Could you review test failures and fix your solution?
Hi @ihor-sviziev, thank you for the review. |
@magento run all tests |
… static_properties_serialization_fix
@engcom-Alfa @engcom-Echo I see this PR in testing more than 1 month. I think you just missed it |
@magento run Integration Tests |
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.
@p-bystritsky Integration tests are failing again. Could you please fix them?
@magento create issue |
@magento run all tests |
@slavvka integration test are not failing on CI before & after merging 2.4-develop branch. Where we can see that they were failing? |
Hi @slavvka, thank you for the review. |
@magento run all tests |
Hi @p-bystritsky, thank you for your contribution! |
Description (*)
When test cleanup is disabled, Magento\TestFramework\Workaround\Cleanup\StaticProperties is caching static variables before the integration test starts, and restoring them after the test run is finished (if some instance of \Magento\TestFramework\TestCase\AbstractController has run).
Serialization and unserialization of static properties are provided by Magento\Framework\Serialize\Serializer\Json class, which wraps json_encode and json_decode functions.
Some of static properties are objects (e. g. \Magento\Framework\Autoload\AutoloaderRegistry::$autoloader). After encoding and decoding these properties through JSON we are getting arrays instead of objects. So we are facing issues on consecutive runs of integration tests.
Fixed Issues (if relevant)
Manual testing scenarios (*)
<const name="TESTS_CLEANUP" value="disabled"/>
Questions or comments
Contribution checklist (*)
Resolved issues:
Resolved issues: