@@ -642,6 +642,14 @@ public function load(array $configs, ContainerBuilder $container): void
642642 $ loader ->load ('mime_type.php ' );
643643 }
644644
645+ if (ContainerBuilder::willBeAvailable ('symfony/object-mapper ' , ObjectMapperInterface::class, ['symfony/framework-bundle ' ])) {
646+ $ loader ->load ('object_mapper.php ' );
647+ $ container ->registerForAutoconfiguration (TransformCallableInterface::class)
648+ ->addTag ('object_mapper.transform_callable ' );
649+ $ container ->registerForAutoconfiguration (ConditionCallableInterface::class)
650+ ->addTag ('object_mapper.condition_callable ' );
651+ }
652+
645653 $ container ->registerForAutoconfiguration (PackageInterface::class)
646654 ->addTag ('assets.package ' );
647655 $ container ->registerForAutoconfiguration (AssetCompilerInterface::class)
@@ -880,14 +888,6 @@ private function registerFormConfiguration(array $config, ContainerBuilder $cont
880888 if (!ContainerBuilder::willBeAvailable ('symfony/translation ' , Translator::class, ['symfony/framework-bundle ' , 'symfony/form ' ])) {
881889 $ container ->removeDefinition ('form.type_extension.upload.validator ' );
882890 }
883-
884- if (ContainerBuilder::willBeAvailable ('symfony/object-mapper ' , ObjectMapperInterface::class, ['symfony/framework-bundle ' ])) {
885- $ loader ->load ('object_mapper.php ' );
886- $ container ->registerForAutoconfiguration (TransformCallableInterface::class)
887- ->addTag ('object_mapper.transform_callable ' );
888- $ container ->registerForAutoconfiguration (ConditionCallableInterface::class)
889- ->addTag ('object_mapper.condition_callable ' );
890- }
891891 }
892892
893893 private function registerHttpCacheConfiguration (array $ config , ContainerBuilder $ container , bool $ httpMethodOverride ): void
0 commit comments