tagged_locator example


            ->tag('console.command')

        ->set('console.command.cache_pool_prune', CachePoolPruneCommand::class)
            ->args([
                [],
            ])
            ->tag('console.command')

        ->set('console.command.cache_pool_invalidate_tags', CachePoolInvalidateTagsCommand::class)
            ->args([
                tagged_locator('cache.taggable', 'pool'),
            ])
            ->tag('console.command')

        ->set('console.command.cache_pool_delete', CachePoolDeleteCommand::class)
            ->args([
                service('cache.global_clearer'),
            ])
            ->tag('console.command')

        ->set('console.command.cache_pool_list', CachePoolListCommand::class)
            ->args([
                
->set('container.getenv', \Closure::class)
            ->factory([\Closure::class, 'fromCallable'])
            ->args([
                [service('service_container'), 'getEnv'],
            ])
            ->tag('routing.expression_language_function', ['function' => 'env'])

        ->set('container.get_routing_condition_service', \Closure::class)
            ->public()
            ->factory([\Closure::class, 'fromCallable'])
            ->args([
                [tagged_locator('routing.condition_service', 'alias'), 'get'],
            ])
            ->tag('routing.expression_language_function', ['function' => 'service'])

        // inherit from this service to lazily access env vars         ->set('container.env', LazyString::class)
            ->abstract()
            ->factory([LazyString::class, 'fromCallable'])
            ->args([
                service('container.getenv'),
            ])
        ->set('config_builder.warmer', ConfigBuilderCacheWarmer::class)
            
use Symfony\Component\Notifier\Messenger\MessageHandler;
use Symfony\Component\Notifier\Notifier;
use Symfony\Component\Notifier\NotifierInterface;
use Symfony\Component\Notifier\Texter;
use Symfony\Component\Notifier\TexterInterface;
use Symfony\Component\Notifier\Transport;
use Symfony\Component\Notifier\Transport\Transports;

return static function DContainerConfigurator $container) {
    $container->services()
        ->set('notifier', Notifier::class)
            ->args([tagged_locator('notifier.channel', 'channel')service('notifier.channel_policy')->ignoreOnInvalid()])

        ->alias(NotifierInterface::class, 'notifier')

        ->set('notifier.channel_policy', ChannelPolicy::class)
            ->args([[]])

        ->set('notifier.flash_message_importance_mapper', DefaultFlashMessageImportanceMapper::class)
            ->args([[]])

        ->set('notifier.channel.browser', BrowserChannel::class)
            ->args([service('request_stack')service('notifier.flash_message_importance_mapper')])
            
namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Symfony\Bundle\SecurityBundle\Command\DebugFirewallCommand;

return static function DContainerConfigurator $container) {
    $container->services()
        ->set('security.command.debug_firewall', DebugFirewallCommand::class)
            ->args([
                param('security.firewalls'),
                service('security.firewall.context_locator'),
                tagged_locator('event_dispatcher.dispatcher', 'name'),
                [],
                false,
            ])
            ->tag('console.command', ['command' => 'debug:firewall'])
    ;
};
abstract_arg('cache pool service'),
                abstract_arg('expired login link storage'),
            ])

        ->set('security.authenticator.cache.expired_links')
            ->parent('cache.app')
            ->private()

        ->set('security.authenticator.firewall_aware_login_link_handler', FirewallAwareLoginLinkHandler::class)
            ->args([
                service('security.firewall.map'),
                tagged_locator('security.authenticator.login_linker', 'firewall'),
                service('request_stack'),
            ])
        ->alias(LoginLinkHandlerInterface::class, 'security.authenticator.firewall_aware_login_link_handler')
    ;
};


namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Symfony\Component\Scheduler\Messenger\SchedulerTransportFactory;

return static function DContainerConfigurator $container) {
    $container->services()
        ->set('scheduler.messenger_transport_factory', SchedulerTransportFactory::class)
            ->args([
                tagged_locator('scheduler.schedule_provider', 'name'),
                service('clock'),
            ])
            ->tag('messenger.transport_factory')
    ;
};
->tag('form.type')

        ->set('form.type.color', ColorType::class)
            ->args([service('translator')->ignoreOnInvalid()])
            ->tag('form.type')

        ->set('form.type_extension.form.transformation_failure_handling', TransformationFailureExtension::class)
            ->args([service('translator')->ignoreOnInvalid()])
            ->tag('form.type_extension', ['extended-type' => FormType::class])

        ->set('form.type_extension.form.html_sanitizer', TextTypeHtmlSanitizerExtension::class)
            ->args([tagged_locator('html_sanitizer', 'sanitizer')])
            ->tag('form.type_extension', ['extended-type' => TextType::class])

        ->set('form.type_extension.form.http_foundation', FormTypeHttpFoundationExtension::class)
            ->args([service('form.type_extension.form.request_handler')])
            ->tag('form.type_extension')

        ->set('form.type_extension.form.request_handler', HttpFoundationRequestHandler::class)
            ->args([service('form.server_params')])

        ->set('form.server_params', ServerParams::class)
            ->args([service('request_stack')])

        
service('asset_mapper.public_assets_path_resolver'),
                abstract_arg('importmap.php path'),
                abstract_arg('vendor directory'),
                service('asset_mapper.importmap.resolver'),
                service('http_client'),
            ])
        ->alias(ImportMapManager::class, 'asset_mapper.importmap.manager')

        ->set('asset_mapper.importmap.resolver', PackageResolver::class)
            ->args([
                abstract_arg('provider'),
                tagged_locator('asset_mapper.importmap.resolver'),
            ])

        ->set('asset_mapper.importmap.resolver.jsdelivr_esm', JsDelivrEsmResolver::class)
            ->args([service('http_client')])
            ->tag('asset_mapper.importmap.resolver', ['resolver' => ImportMapManager::PROVIDER_JSDELIVR_ESM])

        ->set('asset_mapper.importmap.resolver.jspm', JspmResolver::class)
            ->args([service('http_client'), ImportMapManager::PROVIDER_JSPM])
            ->tag('asset_mapper.importmap.resolver', ['resolver' => ImportMapManager::PROVIDER_JSPM])

        ->set('asset_mapper.importmap.resolver.jspm_system', JspmResolver::class)
            


namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Symfony\Component\RemoteEvent\Messenger\ConsumeRemoteEventHandler;

return static function DContainerConfigurator $container) {
    $container->services()
        ->set('remote_event.messenger.handler', ConsumeRemoteEventHandler::class)
            ->args([
                tagged_locator('remote_event.consumer', 'consumer'),
            ])
            ->tag('messenger.message_handler')
    ;
};
->set('twig.extension.routing', RoutingExtension::class)
            ->args([service('router')])

        ->set('twig.extension.yaml', YamlExtension::class)

        ->set('twig.extension.debug.stopwatch', StopwatchExtension::class)
            ->args([service('debug.stopwatch')->ignoreOnInvalid()param('kernel.debug')])

        ->set('twig.extension.expression', ExpressionExtension::class)

        ->set('twig.extension.htmlsanitizer', HtmlSanitizerExtension::class)
            ->args([tagged_locator('html_sanitizer', 'sanitizer')])

        ->set('twig.extension.httpkernel', HttpKernelExtension::class)

        ->set('twig.runtime.httpkernel', HttpKernelRuntime::class)
            ->args([service('fragment.handler')service('fragment.uri_generator')->ignoreOnInvalid()])

        ->set('twig.extension.httpfoundation', HttpFoundationExtension::class)
            ->args([service('url_helper')])

        ->set('twig.extension.debug', DebugExtension::class)

        
abstract_arg('user provider'),
                service('request_stack'),
                abstract_arg('options'),
                service('logger')->nullOnInvalid(),
                abstract_arg('token verifier'),
            ])
            ->tag('monolog.logger', ['channel' => 'security'])

        ->set('security.authenticator.firewall_aware_remember_me_handler', FirewallAwareRememberMeHandler::class)
            ->args([
                service('security.firewall.map'),
                tagged_locator('security.remember_me_handler', 'firewall'),
                service('request_stack'),
            ])
        ->alias(RememberMeHandlerInterface::class, 'security.authenticator.firewall_aware_remember_me_handler')

        ->set('security.listener.check_remember_me_conditions', CheckRememberMeConditionsListener::class)
            ->abstract()
            ->args([
                abstract_arg('options'),
                service('logger')->nullOnInvalid(),
            ])

        
->tag('routing.loader')

        ->set('routing.loader.directory', DirectoryLoader::class)
            ->args([
                service('file_locator'),
                '%kernel.environment%',
            ])
            ->tag('routing.loader')

        ->set('routing.loader.container', ContainerLoader::class)
            ->args([
                tagged_locator('routing.route_loader'),
                '%kernel.environment%',
            ])
            ->tag('routing.loader')

        ->set('routing.loader.annotation', AnnotatedRouteControllerLoader::class)
            ->args([
                '%kernel.environment%',
            ])
            ->tag('routing.loader', ['priority' => -10])

        ->set('routing.loader.annotation.directory', AnnotationDirectoryLoader::class)
            
Home | Imprint | This part of the site doesn't use cookies.