1919use Symfony \Component \DependencyInjection \ContainerBuilder ;
2020use Symfony \Component \DependencyInjection \Definition ;
2121use Symfony \Component \DependencyInjection \Exception \InvalidArgumentException ;
22- use Symfony \Component \DependencyInjection \Loader \XmlFileLoader ;
22+ use Symfony \Component \DependencyInjection \Loader \PhpFileLoader ;
2323use Symfony \Component \DependencyInjection \Reference ;
2424
2525/**
@@ -35,7 +35,7 @@ final class DoctrinePHPCRExtension extends AbstractDoctrineExtension
3535 */
3636 private array $ sessions = [];
3737
38- private XmlFileLoader $ loader ;
38+ private PhpFileLoader $ loader ;
3939
4040 private bool $ disableProxyWarmer = false ;
4141
@@ -51,15 +51,15 @@ public function load(array $configs, ContainerBuilder $container): void
5151 $ processor = new Processor ();
5252 $ configuration = new Configuration ();
5353 $ config = $ processor ->processConfiguration ($ configuration , $ configs );
54- $ this ->loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ .'/../Resources/config ' ));
54+ $ this ->loader = new PhpFileLoader ($ container , new FileLocator (__DIR__ .'/../Resources/config ' ));
5555
56- $ this ->loader ->load ('phpcr.xml ' );
57- $ this ->loader ->load ('commands.xml ' );
56+ $ this ->loader ->load ('phpcr.php ' );
57+ $ this ->loader ->load ('commands.php ' );
5858 if (class_exists (BaseJackrabbitCommand::class)) {
59- $ this ->loader ->load ('jackrabbit-commands.xml ' );
59+ $ this ->loader ->load ('jackrabbit-commands.php ' );
6060 }
6161 if (class_exists (BaseInitDoctrineDbalCommand::class)) {
62- $ this ->loader ->load ('jackalope_doctrine_dbal-commands.xml ' );
62+ $ this ->loader ->load ('jackalope_doctrine_dbal-commands.php ' );
6363 }
6464
6565 // default values in case no odm is configured. the manager registry needs these variables to be defined.
@@ -126,11 +126,10 @@ private function sessionLoad(array $config, ContainerBuilder $container): void
126126
127127 $ type = $ session ['backend ' ]['type ' ];
128128 switch ($ type ) {
129- case 'prismic ' :
130129 case 'doctrinedbal ' :
131130 case 'jackrabbit ' :
132131 if (empty ($ loaded ['jackalope ' ])) {
133- $ this ->loader ->load ('jackalope.xml ' );
132+ $ this ->loader ->load ('jackalope.php ' );
134133 $ loaded ['jackalope ' ] = true ;
135134 }
136135 $ this ->loadJackalopeSession ($ session , $ container , $ type );
@@ -173,7 +172,7 @@ private function loadJackalopeSession(array $session, ContainerBuilder $containe
173172 ;
174173
175174 if (!$ this ->dbalSchemaListenerLoaded ) {
176- $ this ->loader ->load ('jackalope_doctrine_dbal.xml ' );
175+ $ this ->loader ->load ('jackalope_doctrine_dbal.php ' );
177176 $ this ->dbalSchemaListenerLoaded = true ;
178177 }
179178
@@ -210,10 +209,6 @@ private function loadJackalopeSession(array $session, ContainerBuilder $containe
210209 }
211210 }
212211
213- break ;
214- case 'prismic ' :
215- $ backendParameters ['jackalope.prismic_uri ' ] = $ session ['backend ' ]['url ' ];
216-
217212 break ;
218213 case 'jackrabbit ' :
219214 $ backendParameters ['jackalope.jackrabbit_uri ' ] = $ session ['backend ' ]['url ' ];
@@ -352,7 +347,7 @@ private function buildCredentials(ContainerBuilder $container, string $serviceNa
352347
353348 private function loadOdm (array $ config , ContainerBuilder $ container ): void
354349 {
355- $ this ->loader ->load ('odm.xml ' );
350+ $ this ->loader ->load ('odm.php ' );
356351 $ this ->loadOdmLocales ($ config , $ container );
357352 $ config ['document_managers ' ] = $ this ->fixManagersAutoMappings ($ config ['document_managers ' ], $ container ->getParameter ('kernel.bundles ' ));
358353
@@ -401,7 +396,7 @@ private function loadOdmLocales(array $config, ContainerBuilder $container): voi
401396 }
402397
403398 if (!empty ($ config ['locales ' ])) {
404- $ this ->loader ->load ('odm_multilang.xml ' );
399+ $ this ->loader ->load ('odm_multilang.php ' );
405400
406401 foreach ($ config ['locales ' ] as $ locale => $ fallbacks ) {
407402 if (\in_array ($ locale , $ fallbacks )) {
0 commit comments