1616use Symfony \Component \Config \FileLocator ;
1717use Symfony \Component \Config \Loader \LoaderInterface ;
1818use Symfony \Component \DependencyInjection \ContainerBuilder ;
19- use Symfony \Component \DependencyInjection \Loader \XmlFileLoader ;
19+ use Symfony \Component \DependencyInjection \Loader \PhpFileLoader ;
2020use Symfony \Component \DependencyInjection \Reference ;
2121use Symfony \Component \HttpKernel \DependencyInjection \Extension ;
2222
@@ -30,7 +30,7 @@ final class CmfRoutingExtension extends Extension
3030 public function load (array $ configs , ContainerBuilder $ container ): void
3131 {
3232 $ config = $ this ->processConfiguration (new Configuration (), $ configs );
33- $ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ .'/../Resources/config ' ));
33+ $ loader = new PhpFileLoader ($ container , new FileLocator (__DIR__ .'/../Resources/config ' ));
3434
3535 if ($ this ->isConfigEnabled ($ container , $ config ['dynamic ' ])) {
3636 $ this ->setupDynamicRouter ($ config ['dynamic ' ], $ container , $ loader );
@@ -39,12 +39,12 @@ public function load(array $configs, ContainerBuilder $container): void
3939 $ this ->setupChainRouter ($ config , $ container , $ loader );
4040 $ this ->setupFormTypes ($ config , $ container , $ loader );
4141
42- $ loader ->load ('validators.xml ' );
42+ $ loader ->load ('validators.php ' );
4343 }
4444
4545 private function setupChainRouter (array $ config , ContainerBuilder $ container , LoaderInterface $ loader ): void
4646 {
47- $ loader ->load ('routing-chain.xml ' );
47+ $ loader ->load ('routing-chain.php ' );
4848
4949 $ container ->setParameter ('cmf_routing.replace_symfony_router ' , $ config ['chain ' ]['replace_symfony_router ' ]);
5050
@@ -57,7 +57,7 @@ private function setupChainRouter(array $config, ContainerBuilder $container, Lo
5757
5858 private function setupFormTypes (array $ config , ContainerBuilder $ container , LoaderInterface $ loader ): void
5959 {
60- $ loader ->load ('form-type.xml ' );
60+ $ loader ->load ('form-type.php ' );
6161
6262 if (\array_key_exists ('dynamic ' , $ config )) {
6363 $ routeTypeTypeDefinition = $ container ->getDefinition ('cmf_routing.route_type_form_type ' );
@@ -73,7 +73,7 @@ private function setupFormTypes(array $config, ContainerBuilder $container, Load
7373 */
7474 private function setupDynamicRouter (array $ config , ContainerBuilder $ container , LoaderInterface $ loader ): void
7575 {
76- $ loader ->load ('routing-dynamic.xml ' );
76+ $ loader ->load ('routing-dynamic.php ' );
7777
7878 $ container ->setParameter ('cmf_routing.redirectable_url_matcher ' , $ config ['redirectable_url_matcher ' ]);
7979
@@ -205,7 +205,7 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
205205
206206 private function loadPhpcrProvider (array $ config , LoaderInterface $ loader , ContainerBuilder $ container , array $ locales , $ matchImplicitLocale ): void
207207 {
208- $ loader ->load ('provider-phpcr.xml ' );
208+ $ loader ->load ('provider-phpcr.php ' );
209209
210210 $ container ->setParameter ('cmf_routing.backend_type_phpcr ' , true );
211211 $ container ->setParameter ('cmf_routing.dynamic.persistence.phpcr.route_basepaths ' , array_values (array_unique ($ config ['route_basepaths ' ])));
@@ -234,12 +234,12 @@ private function loadInitializer(LoaderInterface $loader, ContainerBuilder $cont
234234 $ initializedBasepaths
235235 );
236236
237- $ loader ->load ('initializer-phpcr.xml ' );
237+ $ loader ->load ('initializer-phpcr.php ' );
238238 }
239239
240240 private function loadOrmProvider (array $ config , LoaderInterface $ loader , ContainerBuilder $ container , $ matchImplicitLocale ): void
241241 {
242- $ loader ->load ('provider-orm.xml ' );
242+ $ loader ->load ('provider-orm.php ' );
243243
244244 $ container ->setParameter ('cmf_routing.backend_type_orm ' , true );
245245 $ container ->setParameter ('cmf_routing.dynamic.persistence.orm.manager_name ' , $ config ['manager_name ' ]);
0 commit comments