72005[BUGFIX] Use ClassSchema to properly detect DomainObject properties
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Markus Klein +1
- Nikita Hovratov +1
- Stefan Froemken +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Benni Mack +2
- Markus Klein +1
- Stefan Froemken +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 8
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php4+48 −58
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php+10 −5
- typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php+15 −9
- typo3/sysext/extbase/Classes/Reflection/ClassSchema/Property.php2+6 −0
- typo3/sysext/extbase/Classes/Reflection/ClassSchema.php+17 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/Fixture/DummyEntity.php+8 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapperTest.php+16 −0
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbBackendTest.php+14 −8
Review log 5070
Show 2945 earlier messages
-
Alexander Schnitzler uploaded patch set 1 10/29/21, 15:33
-
Alexander Schnitzler wrote 10/29/21, 15:33
Topic set to extbase -
Alexander Schnitzler uploaded patch set 2 10/29/21, 15:46
-
core-ci voted on patch set 2 V -1 10/29/21, 16:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18659
-
Alexander Schnitzler uploaded patch set 3 10/29/21, 16:08
-
core-ci voted on patch set 3 V -1 10/29/21, 16:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18660
-
Alexander Schnitzler uploaded patch set 4 10/29/21, 16:52
-
core-ci voted on patch set 4 V -1 10/29/21, 17:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18661
-
core-ci voted on patch set 1 V -1 10/29/21, 17:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18658
-
Alexander Schnitzler uploaded patch set 5 10/30/21, 09:06
-
core-ci voted on patch set 5 V +1 10/30/21, 09:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18664
-
Alexander Schnitzler commented on patch set 5 10/30/21, 09:27
This change is ready for review. -
Alexander Schnitzler updated the commit message in patch set 6 10/30/21, 10:52
-
core-ci voted on patch set 6 V +1 10/30/21, 11:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18666
-
Anja Leichsenring updated the commit message in patch set 7 11/04/21, 11:40
-
core-ci voted on patch set 7 V +1 11/04/21, 11:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18871
-
Benni Mack updated the commit message in patch set 8 11/18/21, 10:45
-
core-ci voted on patch set 8 V +1 11/18/21, 11:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19460
-
Benni Mack wrote 11/29/21, 10:15
Change destination moved from master to main -
Benni Mack updated the commit message in patch set 9 11/29/21, 14:03
-
core-ci voted on patch set 9 V +1 11/29/21, 16:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20080
-
Christian Kuhn commented on patch set 9 12/06/21, 16:33
https://review.typo3.org/c/Packages/TYPO3.CMS/+/72526 also claims to fix the issue. -
Stefan Bürk commented on patch set 9 12/07/21, 05:41
^ The one Christian pointed has gone, but now the same author added another try, now with Reflection approach: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72537 -
Alexander Schnitzler commented on patch set 9 12/07/21, 06:38
Reply
Let's focus on this one. With this patch we move the resolval of reflection data to where it belongs, the ClassSchema. The goal is to be able to remove getObjectProperties from the AbstractDomainObject and to have models without the need to extend AbstractDomainObject at all some day. -
Stefan Froemken commented on patch set 9 V +1 CR +1 12/13/21, 11:25
Works good until now. Before this patch I get a lot of "Typed property JWeiland\Events2\Domain\Model\Day::$event must not be accessed before initialization" messages, but with this patch the errors are gone. Good work. -
Stefan Froemken commented on patch set 9 V -1 CR -1 12/14/21, 08:07
DataMapper.php:248This part can result NULL. F.e. for starttime or endtime columnsDataMapper.php:270As $this->mapDateTime() can return NULL this property will not be set. As it was not set, it will not be initialized. -
Stefan Froemken uploaded patch set 10 12/14/21, 08:22
-
core-ci voted on patch set 10 V -1 12/14/21, 08:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21063
-
Stefan Froemken commented on patch set 10 CR -1 12/14/21, 08:31
Sorry...wrong base branch. I will deliver a new patch -
Stefan Froemken uploaded patch set 11 12/14/21, 08:47
-
Stefan Froemken commented on patch set 11 12/14/21, 08:49
I have added a test to show the problem with uninitialized ?\DateTime properties -
Stefan Froemken uploaded patch set 12 12/14/21, 08:51
-
core-ci voted on patch set 11 V -1 12/14/21, 09:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21066
-
core-ci voted on patch set 12 V -1 12/14/21, 09:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21067
-
Stefan Froemken uploaded patch set 13 12/14/21, 12:25
-
core-ci voted on patch set 13 V -1 12/14/21, 12:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21076
-
Stefan Froemken uploaded patch set 14 12/14/21, 12:30
-
core-ci voted on patch set 14 V +1 12/14/21, 12:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21077
-
Stefan Froemken uploaded patch set 15 12/14/21, 13:14
-
core-ci voted on patch set 15 V +1 12/14/21, 13:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21079
-
Stefan Froemken uploaded patch set 16 12/14/21, 13:46
-
Markus Kugler commented on patch set 16 CR +1 12/14/21, 14:04
Looks good to me, I like the test for uninitialized properties in DataMapperTest.php -
core-ci voted on patch set 16 V +1 12/14/21, 14:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21083
-
Markus Kugler commented on patch set 16 12/15/21, 06:53
Reply
Sorry, didn't check the resolved checkbox. -> New to gerrit. -
Stefan Froemken voted on patch set 16 V +1 CR +1 12/23/21, 20:27
-
Stefan Bürk uploaded patch set 17 01/05/22, 18:12
-
Stefan Bürk commented on patch set 17 01/05/22, 18:14
Reply
Done -
core-ci voted on patch set 17 V +1 01/05/22, 18:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/21663
-
Stefan Froemken commented on patch set 17 01/05/22, 21:20
Property.php:147Why you have removed that? I mean: If you remove that wouldn't it be better to remove const PropertyCharacteristics::ANNOTATED_INJECT and line 248-254 in ClassSchema.php, too? -
Stefan Bürk commented on patch set 17 01/05/22, 21:51
Property.php:147ReplyThe answer is simple: Solving merge-conflict manually. You are "right", but that was already done with: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72498 Just solving the merge-conflict/rebase on that. -
Nikita Hovratov rebased onto patch set 18 05/18/22, 15:59
-
core-ci voted on patch set 18 V +1 05/18/22, 16:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27306
-
Nikita Hovratov uploaded patch set 19 05/18/22, 16:27
-
Nikita Hovratov commented on patch set 19 05/18/22, 16:31
DataMapper.php:270ReplyDone -
core-ci voted on patch set 19 V -1 05/18/22, 16:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27308
-
Nikita Hovratov commented on patch set 19 05/18/22, 16:40
DataMapper.php:248ReplyI guess this is resolved by your patches, too. -
Nikita Hovratov uploaded patch set 20 05/18/22, 16:41
-
Nikita Hovratov voted on patch set 20 CR +1 05/18/22, 16:42
-
core-ci voted on patch set 20 V +1 05/18/22, 16:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/27309
-
Alexander Schnitzler commented on patch set 20 07/31/22, 12:32
Hi Folks, what's the hold up here? I have the feeling nobody really knows the status of this patch, hence the lack of reviews, right? Stefan, are all issues, you mentioned, resolved? And to all others: Can you make sure to remove yourself as reviewer or cc if you don't intend to review. No hard feelings here, just want to make sure this patch doesn't look crowded and/or well taken care of if it isn't. Thanks in advance. :) And regarding those that want to participate: Does anyone wants to take the lead or should I push things forward again. I am asking because this patch went through a couple of hands now and I don't know who is responsible. -
Simon Schaufelberger commented on patch set 20 V -1 08/02/22, 16:21
I have a customer project with exactly this issue. I have applied this patch via composer patches but the issue I have now is that properties annotated with an Object and no default value don't work like: protected StaticCountry $country; Since this property is required and can't be null, this is correct. In the initializeObject() method, I assign a default value but somehow this method is not executed at all times because now I get an exception: Typed property Vendor\Extension\Domain\Model\Bla::$country must not be accessed before initialization in AbstractDomainObject: public function _getProperty(string $propertyName) { return $this->{$propertyName}; } @Alex: can you verify? -
Simon Schaufelberger commented on patch set 20 08/02/22, 16:48
Reply
This error happens when I update an object and persist it. -
Simon Schaufelberger commented on patch set 20 V +1 CR +1 08/03/22, 13:03
I've played with blog_example and it really works. -
Simon Schaufelberger commented on patch set 20 08/03/22, 13:05
Reply
My problem is that I serialize a model and store it in the user session and when I restore it, it doesn't have all the nested objects initialized. Therefor this patch is valid and I need to fix my code instead. -
Markus Klein voted on patch set 20 V +1 CR +1 08/03/22, 17:09
-
Stefan Froemken commented on patch set 20 V +1 CR +1 08/04/22, 18:25
Works, but keep in mind: If you work with "protected \DateTime $date;" you should also/have to set this field as required in TCA and validate against NotEmpty in Domain Model. If you also think that this is the expected way to go: Happy merging ;-) -
Simon Schaufelberger commented on patch set 20 08/04/22, 23:25
Reply
They have nothing to do with each other. This is the responsibility of the developer to take care of this himself. -
Benni Mack voted on patch set 20 V +2 CR +2 08/08/22, 12:47
-
Benni Mack merged patch set 21 08/08/22, 12:47
-
Oliver Hader commented on patch set 21 08/22/22, 14:57
→ regression https://forge.typo3.org/issues/98148