Breaking: #102229 - Removed FlexFormTools->traverseFlexFormXMLData()
See forge#102229
Description
Class
\TYPO3\ got a series
of cleanup and removal patches.
The following public class properties have been removed:
$reNumber Indexes Of Section Data $flexArray2Xml_ options $callBack Obj $cleanFlex Form XML
The following public methods have been removed:
traverseFlex Form XMLData () traverseFlex Form XMLData_ recurse () cleanFlex Form XML_ call Back Function ()
The following public methods have been marked @internal:
cleanFlex Form XML () flexArray2Xml () migrateFlex Form Tca Recursive ()
The class is now a stateless service and can be injected as shared service without any risk of triggering side effects.
Impact
In general, these changes should have relatively low impact on extensions, if they don't build additional low level functionality on top of the general TYPO3 Core FlexForm related features. Extensions like the TemplaVoila forks may need to have a look for required adaptions, though.
Using the removed methods or properties in TYPO3 v13 will of course trigger PHP fatal errors.
Affected installations
Instances that extend functionality of FlexForm handling may be affected if they
use methods of class
Flex. This is a relatively rare case, most
instances will not be affected when they just provide and use casual FlexForm
definitions in extensions.
The extension scanner will find possible extensions that consume the methods or properties as a weak match.
Migration
If at all, method
traverse is probably the one used in
extensions. The easiest way is to copy the method and it's recursive worker method
to an own class.
Extension developers are however encouraged to refactor their code since
traverse with its callback logic was ugly, hard to follow
and maintain. The Core switched away from the method by implementing own traversers
that match the specific use cases. Method
clean is an
example of such an implementation. Note FlexForms are not recursive since
section containers can not be nested since TYPO3 v8 anymore. The Core thus
uses some nested foreach loops instead of a recursive approach.