/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslationUpdateCommandPass.php
31 строка
1006 B
Christian Flothmann
require the writer to implement getFormats() in the translation:extract
16 дек 2024, 18:13
16 дек 2024, 18:13
8448227
Код
Авторство
О чём код?
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; class TranslationUpdateCommandPass implements CompilerPassInterface { public function process(ContainerBuilder $container): void { if (!$container->hasDefinition('console.command.translation_extract')) { return; } $translationWriterClass = $container->getParameterBag()->resolveValue($container->findDefinition('translation.writer')->getClass()); if (!method_exists($translationWriterClass, 'getFormats')) { $container->removeDefinition('console.command.translation_extract'); } } }