82305[!!!][FEATURE] Add PSR-14 Events for modifying cObj stdWrap
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Stefan Bürk +1
- Benni Mack +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Oli Bartsch +2
- Stefan Bürk +1
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 18
- typo3/sysext/core/Documentation/Changelog/13.0/Breaking-102745-RemovedContentObjectStdWrapHook.rstnew+44 −0
- typo3/sysext/core/Documentation/Changelog/13.0/Deprecation-102745-UnusedInterfaceForStdWrapHook.rstnew+40 −0
- typo3/sysext/core/Documentation/Changelog/13.0/Feature-102745-PSR-14EventsForModifyingContentObjectStdWrapFunctionality.rstnew+86 −0
- typo3/sysext/frontend/Classes/ContentObject/Event/AfterStdWrapFunctionsExecutedEvent.phpnew+23 −0
- typo3/sysext/frontend/Classes/ContentObject/Event/AfterStdWrapFunctionsInitializedEvent.phpnew+24 −0
- typo3/sysext/frontend/Classes/ContentObject/Event/BeforeStdWrapFunctionsExecutedEvent.phpnew+23 −0
- typo3/sysext/frontend/Classes/ContentObject/Event/BeforeStdWrapFunctionsInitializedEvent.phpnew+23 −0
- typo3/sysext/frontend/Classes/ContentObject/Event/EnhanceStdWrapEvent.php7new+62 −0
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php+28 −112
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectStdWrapHookInterface.php+3 −0
- typo3/sysext/frontend/Tests/Functional/ContentObject/ContentObjectRendererTest.php+33 −0
- typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugSiteRequestTest.php+4 −4
- typo3/sysext/frontend/Tests/Unit/ContentObject/Event/EnhanceStdWrapEventTest.phpnew+61 −0
- typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php+17 −82
- typo3/sysext/frontend/Tests/Unit/Processor/GalleryProcessorTest.php+7 −0
- typo3/sysext/frontend/Tests/Unit/Typolink/AbstractTypolinkBuilderTest.php+5 −0
- typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php+6 −0
- typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php+7 −0
Review log 3343
Show 1218 earlier messages
-
Oli Bartsch uploaded patch set 1 01/03/24, 16:36
-
core-ci voted on patch set 1 V -1 01/03/24, 16:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51081
-
Oli Bartsch uploaded patch set 2
V -101/03/24, 16:44 -
core-ci voted on patch set 2 V +1 01/03/24, 16:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51083
-
Simon Schaufelberger commented on patch set 2 01/04/24, 01:04
Feature-102745-ImproveContentObjectStdWrapHooksRegistration.rst:23I would love to have a code snippet here. -
Simon Schaufelberger commented on patch set 2 01/04/24, 01:06
a general question: we also use php attributes in other places for registering stuff. would it make sense to use them here as well? -
Oli Bartsch uploaded patch set 3
V +101/04/24, 07:34 -
Oli Bartsch commented on patch set 3 01/04/24, 07:37
Reply
Implementing the interface is required anyways. This information allows to auto register the services. There is no need to force developers in adding additional PHP Attributes to those services. Especially because no specific configuration can be applied to them.Feature-102745-ImproveContentObjectStdWrapHooksRegistration.rst:15ReplyDoneFeature-102745-ImproveContentObjectStdWrapHooksRegistration.rst:23ReplyDone -
core-ci voted on patch set 3 V +1 01/04/24, 07:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51096
-
Simon Schaufelberger voted on patch set 3 CR +1 V +1 01/04/24, 12:33
-
Christian Kuhn commented on patch set 3 CR -1 01/08/24, 11:06
I don't think we should do it this way: The wording 'hook' is imho wrong in the first place already and should get rid of it. Isn't a casual transfer towards single events possible without further hassle here? -
Oli Bartsch commented on patch set 3 CR -1 01/08/24, 11:13
Reply
Yes, will handle it similar to https://review.typo3.org/c/Packages/TYPO3.CMS/+/82332. -
Oli Bartsch uploaded patch set 4
CR +1V +101/12/24, 14:11 -
Oli Bartsch uploaded patch set 5 01/12/24, 14:15
-
core-ci voted on patch set 5 V -1 01/12/24, 14:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51509
-
core-ci voted on patch set 4 V -1 01/12/24, 14:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51508
-
Oli Bartsch uploaded patch set 6
V -101/12/24, 20:32 -
core-ci voted on patch set 6 V +1 01/12/24, 20:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51516
-
Oli Bartsch commented on patch set 6 01/12/24, 20:47
Reply
Done -
Benni Mack commented on patch set 6 CR +1 01/12/24, 20:48
Reply
Done -
Benni Mack commented on patch set 7
CR +1V +101/12/24, 20:50Published edit on patch set 6. -
core-ci voted on patch set 7 V +1 01/12/24, 20:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51517
-
Benni Mack voted on patch set 7 CR +1 V +1 01/12/24, 21:04
-
Stefan Bürk commented on patch set 7 01/12/24, 22:45
EnhanceStdWrapEvent.php:32Can we make the class `abstract` ? Okay, could not see that this class and a child is dispatched - but this may slip in in the future and leads to issues I guess. We had that one time where lolli played around with a nested event chain (both dispatched). Therefore, I would suggest to add `abstract` here so it can never created and used to be dispatched. I highly encourage to make that clear. (And a additional point why we are making event DTO's final normally). At least add a big fat comment to it that it should never directly be dispatched. -
Stefan Bürk commented on patch set 7 CR +1 V +1 01/12/24, 23:29
EnhanceStdWrapEvent.php:32ReplyAs discussed in slack. Not really happy, but let us wait until it go wrong. -
Oli Bartsch uploaded patch set 8
CR +1V +101/12/24, 23:32 -
Oli Bartsch commented on patch set 8 01/12/24, 23:34
EnhanceStdWrapEvent.php:32ReplyDeclared the class abstract, since we did this for other parent Event classes, e.g. `AbstractSectionMarkupGeneratedEvent`, in the past already. -
Oli Bartsch uploaded patch set 9 01/12/24, 23:37
-
core-ci voted on patch set 8 V +1 01/12/24, 23:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51527
-
Stefan Bürk voted on patch set 9 CR +1 V +1 01/12/24, 23:39
-
Stefan Bürk commented on patch set 9 01/12/24, 23:40
EnhanceStdWrapEvent.php:32ReplyThank you. 😊 -
core-ci voted on patch set 9 V +1 01/12/24, 23:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51528
-
Benni Mack voted on patch set 9 CR +1 V +1 01/14/24, 00:18
-
Nikita Hovratov uploaded patch set 10
CR +1V +101/14/24, 02:05 -
core-ci voted on patch set 10 V +1 01/14/24, 02:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51542
-
Nikita Hovratov commented on patch set 10 CR -1 01/14/24, 02:19
EnhanceStdWrapEvent.php:38Not sure to restrict this to null|string here. Oftentimes `$content` can also have other types, which can come from various sources. The method `stdWrapValue` for example has the doctype `string|int|bool|null`. Probably we should align to this? If we don't do this, odd side effects could occur due to type conversion. See the Test SlugSiteRequestTest, where the values changed to string due to implicit php type conversion, because ContentObjectRenderer has no strict mode enabled. This will fail hard, if we ever switch to strict mode there. -
Oli Bartsch commented on patch set 10 01/14/24, 09:57
EnhanceStdWrapEvent.php:38ReplyUnsure. This patch is already breaking. I think we should take such opportunities to make the code base - especially such central features - more strict. `stdWrapValue` still returns `string|int|bool|null` based on the corresponding default value. `stdWrap` is annotated with `string`. Having `?string` is actually only necessary to support the `isNull` function. -
Nikita Hovratov commented on patch set 10 CR 0 01/14/24, 16:44
EnhanceStdWrapEvent.php:38ReplyOkay, I certainly agree this should be more strict. Still don't like this implicit type conversion, hm. Hope this goes well. -
Simon Schaufelberger voted on patch set 10 CR +1 01/14/24, 17:10
-
Stefan Bürk voted on patch set 10 CR +1 V +1 01/16/24, 09:01
-
Benni Mack voted on patch set 10 CR +1 V +1 01/16/24, 11:09
-
Oli Bartsch voted on patch set 10 CR +2 V +2 01/16/24, 15:56
-
Oli Bartsch merged patch set 11 01/16/24, 15:56
Feature-102745-ImproveContentObjectStdWrapHooksRegistration.rst:15