services:
    _defaults:
        bind:
            $metadataFactory: '@validator'

    _instanceof:
        PhpParser\NodeVisitor:
            tags:
                - { name: 'php_translation.visitor', type: 'php' }

    Translation\Extractor\FileExtractor\PHPFileExtractor:
        tags:
            - { name: 'php_translation.extractor', type: 'php' }

    Translation\Extractor\FileExtractor\TwigFileExtractor:
        arguments: ['@twig']
        tags:
            - { name: 'php_translation.extractor', type: 'twig' }

    # PHP Visitors:
    Translation\Extractor\Visitor\Php\Symfony\:
        resource: "%extractor_vendor_dir%/Visitor/Php/Symfony/*"

    Translation\Extractor\Visitor\Php\SourceLocationContainerVisitor: ~

    # Twig Visitors:
    Translation\Extractor\Visitor\Twig\TwigVisitor:
        tags:
            - { name: 'php_translation.visitor', type: 'twig' }

    # To remove in next major release
    php_translation.extractor.php:
        alias: Translation\Extractor\FileExtractor\PHPFileExtractor
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.twig:
        alias: Translation\Extractor\FileExtractor\TwigFileExtractor
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.php.visitor.ContainerAwareTrans:
        alias: Translation\Extractor\Visitor\Php\Symfony\ContainerAwareTrans
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.php.visitor.ContainerAwareTransChoice:
        alias: Translation\Extractor\Visitor\Php\Symfony\ContainerAwareTransChoice
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.php.visitor.FlashMessage:
        alias: Translation\Extractor\Visitor\Php\Symfony\FlashMessage
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.php.visitor.FormTypeChoices:
        alias: Translation\Extractor\Visitor\Php\Symfony\FormTypeChoices
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.php.visitor.FormTypeEmptyValue:
        alias: Translation\Extractor\Visitor\Php\Symfony\FormTypeEmptyValue
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.php.visitor.FormTypeHelp:
        alias: Translation\Extractor\Visitor\Php\Symfony\FormTypeHelp
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.php.visitor.FormTypeInvalidMessage:
        alias: Translation\Extractor\Visitor\Php\Symfony\FormTypeInvalidMessage
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.php.visitor.FormTypeLabelExplicit:
        alias: Translation\Extractor\Visitor\Php\Symfony\FormTypeLabelExplicit
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.php.visitor.FormTypeLabelImplicit:
        alias: Translation\Extractor\Visitor\Php\Symfony\FormTypeLabelImplicit
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.php.visitor.FormTypePlaceholder:
        alias: Translation\Extractor\Visitor\Php\Symfony\FormTypePlaceholder
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.php.visitor.ValidationAnnotation:
        alias: Translation\Extractor\Visitor\Php\Symfony\ValidationAnnotation
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.php.visitor.SourceLocationContainerVisitor:
        alias: Translation\Extractor\Visitor\Php\SourceLocationContainerVisitor
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
    php_translation.extractor.twig.factory.twig:
        alias: Translation\Extractor\Visitor\Twig\TwigVisitor
        deprecated: 'The "%service_id%" service is deprecated. You should use "%alias_id%" instead, as it will be removed in the future.'
