sabbelasichon / typo3-rector

Rector for TYPO3
MIT License
223 stars 62 forks source link

Deprecation: #95037 - rootUid related setting of trees #2634

Closed sabbelasichon closed 6 months ago

sabbelasichon commented 2 years ago

Deprecation: #95037 - rootUid related setting of trees

https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/11.4/Deprecation-95037-RootUidRelatedSettingOfTrees.html .. include:: ../../Includes.txt

====================================================== Deprecation: #95037 - rootUid related setting of trees

See :issue:95037

Description

The setting :php:rootUid used in FormEngine's :php:treeConfig is superseded by :php:startingPoints and has been marked as deprecated.

In :php:TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeDataProvider the following methods have been marked as deprecated:

Impact

Using treeConfig/rootUid in TCA will trigger a TCA migration to treeConfig/startingPoints and raise a PHP :php:E_USER_DEPRECATED error.

The same applies to the according page TSconfig option.

The extension scanner detects any call to :php:setRootUid() or :php:getRootUid() as weak match.

Affected Installations

All extensions defining rootUid in their TCA or TSconfig are affected. Furthermore all extensions directly calling one of the mentioned methods in :php:TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeDataProvider.

Migration

The setting treeConfig/rootUid can be migrated to treeConfig/startingPoints passing the value as string, since treeConfig/startingPoints takes a comma-separated value. The methods :php:setRootUid() and :php:getRootUid() can be replaced by their successors :php:setStartingPoints() and :php:getStartingPoints().

.. index:: Backend, PartiallyScanned, ext:backend

sabbelasichon commented 2 years ago

Rarely used in the wild. Feel free to reopen

helsner commented 1 year ago

I had this with different use cases One was that we had a multi tree instance which is not that rare as setup There the categories had to be different per tree Another use case was the different usage between blog and normal categories

We should add a PHP (TCA) and TypoScript rule to change this Also a mention via output styles would be nice as someone might uses those overrides via BE field (either in sys_template config or pages PageTSConfig) For those an Upgradewizard is necessary we could hint to

simonschaufi commented 10 months ago

This is how to migrate: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70819/11/typo3/sysext/core/Classes/Migrations/TcaMigration.php