Feature: #107871 - Autoconfigure backend avatar providers
See forge#107871
Description
Backend avatar providers must either use the PHP attribute
# or be manually tagged in the service container with
backend..
When autoconfiguration is enabled in Services. or
Services., applying
# will automatically add
the
backend. tag; otherwise, the tag needs to be
configured manually.
Example:
use TYPO3\CMS\Backend\Attribute\AsAvatarProvider;
use TYPO3\CMS\Backend\Backend\Avatar\AvatarProviderInterface;
#[AsAvatarProvider('my_provider', before: ['provider-1'], after: ['provider-2'])]
final class MyAvatarProvider implements AvatarProviderInterface
{
// ...
}
Impact
Backend avatar providers are now automatically registered using the PHP
attribute
#. This improves the developer experience and
reduces configuration overhead. The previous registration method via
$GLOBALS
can no longer be used.
To support multiple TYPO3 Core versions simultaneously, extensions may still implement the legacy array-based registration alongside the new autoconfiguration-based approach.