[Issue] Static properties serialization fix. #29313
Labels
Fixed in 2.4.x
The issue has been fixed in 2.4-develop branch
Issue: Format is not valid
Gate 1 Failed. Automatic verification of issue format is failed
Priority: P3
May be fixed according to the position in the backlog.
Severity: S3
Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
This issue is automatically created based on existing pull request: #26175: Static properties serialization fix.
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:
The text was updated successfully, but these errors were encountered: