Breaking: #97188 - Register element browsers via service configuration

See forge#97188

Description

The element browsers in EXT:backend are now registered via service configuration, see the feature changelog. Therefore the registration via $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers'] has been removed.

Additionally, to be able to use autoconfiguration, the element browser identifier has to be provided by the service directly using the getIdentifier() method, which is now required by the ElementBrowserInterface.

In case a custom element browser extends \TYPO3\CMS\Backend\Browser\AbstractElementBrowser, only the class property $identifier has to be set, e.g. protected string $identifier = 'my_browser';.

Impact

Registration of custom element browsers via $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers'] is not evaluated anymore.

The ElementBrowserInterface is extended for public function getIdentifier(): string.

Affected Installations

All TYPO3 installations using the old registration.

All TYPO3 installations with custom element browsers, not implementing public function getIdentifier().

Migration

Remove $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ElementBrowsers'] from your ext_localconf.php file.

If autoconfigure is not enabled in your Configuration/Services.(yaml|php), add the tag recordlist.elementbrowser manually to your element browser service.

Vendor\Extension\Recordlist\MyBrowser:
  tags:
    - name: recordlist.elementbrowser
Copied!

Additionally, make sure to either implement public function getIdentifier(): string or, in case your element browser extends AbstractElementBrowser, to set the $identifier class property.