[BUGFIX] Use ClassSchema to properly detect DomainObject properties
To gather information about properties of domain objects, extbase used method DomainObjectInterface::_getProperties() which internally used get_object_vars() which does not return uninitialized properties. This leads to the inability to use such uninitialized properties in models. Hence, those properties are not reconstituted at all when converting an object instance from a database row, eventually leading to fatal errors. To mitigate this issue, extbase does now use the existing information about classes gathered via ClassSchema which gathers information via reflection (anyway). Releases: main, 11.5 Resolves: #95819 Change-Id: I00e2eb4967631ca28a5889e934fd409fd3fdef96 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72005 Reviewed-by: Nikita Hovratov <nikita.h@live.de> Reviewed-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by: Markus Klein <markus.klein@typo3.org> Reviewed-by: Stefan Froemken <froemken@gmail.com> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: core-ci <typo3@b13.com> Tested-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com> Tested-by: Markus Klein <markus.klein@typo3.org> Tested-by: Stefan Froemken <froemken@gmail.com> Tested-by: Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php 15 additions, 9 deletionstypo3/sysext/extbase/Classes/Persistence/Generic/Backend.php
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php 48 additions, 58 deletions...extbase/Classes/Persistence/Generic/Mapper/DataMapper.php
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php 10 additions, 5 deletions...se/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
- typo3/sysext/extbase/Classes/Reflection/ClassSchema.php 17 additions, 0 deletionstypo3/sysext/extbase/Classes/Reflection/ClassSchema.php
- typo3/sysext/extbase/Classes/Reflection/ClassSchema/Property.php 6 additions, 0 deletions...ysext/extbase/Classes/Reflection/ClassSchema/Property.php
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapperTest.php 16 additions, 0 deletions.../Tests/Unit/Persistence/Generic/Mapper/DataMapperTest.php
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/Fixture/DummyEntity.php 8 additions, 0 deletions...s/Unit/Persistence/Generic/Mapper/Fixture/DummyEntity.php
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbBackendTest.php 14 additions, 8 deletions...s/Unit/Persistence/Generic/Storage/Typo3DbBackendTest.php
Loading
Please register or sign in to comment