|
70 | 70 | use PHPStan\PhpDocParser\Parser\PhpDocParser; |
71 | 71 | use Ramsey\Uuid\Uuid; |
72 | 72 | use Symfony\AI\McpBundle\McpBundle; |
73 | | -use Symfony\Bundle\FrameworkBundle\Command\TranslationExtractCommand as FrameworkTranslationExtractCommand; |
74 | 73 | use Symfony\Bundle\FrameworkBundle\Controller\ControllerHelper; |
75 | 74 | use Symfony\Component\Config\FileLocator; |
76 | 75 | use Symfony\Component\Config\Resource\DirectoryResource; |
|
89 | 88 | use Symfony\Component\ObjectMapper\ObjectMapperInterface; |
90 | 89 | use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter; |
91 | 90 | use Symfony\Component\Serializer\Normalizer\NumberNormalizer; |
92 | | -use Symfony\Component\Translation\Command\TranslationExtractCommand; |
93 | 91 | use Symfony\Component\Uid\AbstractUid; |
94 | 92 | use Symfony\Component\Validator\Validator\ValidatorInterface; |
95 | 93 | use Symfony\Component\Yaml\Yaml; |
@@ -210,10 +208,9 @@ public function load(array $configs, ContainerBuilder $container): void |
210 | 208 | $this->registerLinkSecurityConfiguration($loader, $config); |
211 | 209 | $this->registerJsonStreamerConfiguration($container, $loader, $formats, $config); |
212 | 210 |
|
213 | | - // TranslationExtractCommand was introduced in framework-bundle/7.3 with the object mapper service. |
214 | 211 | // willBeAvailable mirrors FrameworkBundle's own gate: when symfony/object-mapper is in dev-only, |
215 | 212 | // FrameworkBundle skips object_mapper.php and the "object_mapper" service we alias to does not exist. |
216 | | - if (class_exists(ObjectMapper::class) && (class_exists(TranslationExtractCommand::class) || class_exists(FrameworkTranslationExtractCommand::class)) && ContainerBuilder::willBeAvailable('symfony/object-mapper', ObjectMapperInterface::class, ['symfony/framework-bundle'])) { |
| 213 | + if (class_exists(ObjectMapper::class) && ContainerBuilder::willBeAvailable('symfony/object-mapper', ObjectMapperInterface::class, ['symfony/framework-bundle'])) { |
217 | 214 | $loader->load('state/object_mapper.php'); |
218 | 215 | $loader->load($config['use_symfony_listeners'] ? 'symfony/object_mapper.php' : 'state/object_mapper_processor.php'); |
219 | 216 | } |
|
0 commit comments