Skip to content

[FEATURE] Add MigrateFlexFormParsingHooksToEventListenersRector#4832

Draft
kitzberger wants to merge 1 commit intosabbelasichon:mainfrom
kitzberger:MigrateFlexFormParsingHooksToEventListenersRector
Draft

[FEATURE] Add MigrateFlexFormParsingHooksToEventListenersRector#4832
kitzberger wants to merge 1 commit intosabbelasichon:mainfrom
kitzberger:MigrateFlexFormParsingHooksToEventListenersRector

Conversation

@kitzberger
Copy link
Copy Markdown
Contributor

Migrates FlexForm parsing hooks to PSR-14 event listeners:

  • parseDataStructureByIdentifierPreProcess -> BeforeFlexFormDataStructureParsedEvent
  • parseDataStructureByIdentifierPostProcess -> AfterFlexFormDataStructureParsedEvent
  • getDataStructureIdentifierPreProcess -> BeforeFlexFormDataStructureIdentifierInitializedEvent
  • getDataStructureIdentifierPostProcess -> AfterFlexFormDataStructureIdentifierInitializedEvent

See https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-97449-PSR-14EventsForModifyingFlexFormParsing.html

Migrates FlexForm parsing hooks to PSR-14 event listeners:
- parseDataStructureByIdentifierPreProcess -> BeforeFlexFormDataStructureParsedEvent
- parseDataStructureByIdentifierPostProcess -> AfterFlexFormDataStructureParsedEvent
- getDataStructureIdentifierPreProcess -> BeforeFlexFormDataStructureIdentifierInitializedEvent
- getDataStructureIdentifierPostProcess -> AfterFlexFormDataStructureIdentifierInitializedEvent

See https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Feature-97449-PSR-14EventsForModifyingFlexFormParsing.html
@simonschaufi
Copy link
Copy Markdown
Collaborator

There is a reason why we don't have any hooks to Event listener migration because it is just way too complex. I don't see this rule as a rule that fully migrates everything but more like a "the code is half migrated" rule and you still need to make your hands dirty.

I'm not sure if I should accept such "broken" rules that only migrate half of the code. The only thing I can imagine is to move the new folder for "half migrations" (similar like code quality). Then I would put that into an own rule set and activate it only as a helper set but I would never put that into a full TYPO3 version set.

Specifically for this migration: The namespace must also be adjusted which I would expect to be correct at least.

What do you think?

@kitzberger
Copy link
Copy Markdown
Contributor Author

That's what I was wondering too. For me as a user of rector it would be super helpful to be pushed into the right direction when running the full set migrations. basically like this: look at this old piece of code, it needs to be changed from this hook to an eventlistener, we've kickstarted a skeleton class for you, but now you need to do some thinking of your own, mate.

@simonschaufi
Copy link
Copy Markdown
Collaborator

For me it is important that all the rules under the TYPO3 namespace are stable and don't produce half broken code. That event listener is currently not working.

@simonschaufi simonschaufi marked this pull request as draft February 22, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants