File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,12 @@ public function initialize(ExtensionManager $extensionManager)
5151 public function load (ContainerBuilder $ container , array $ config )
5252 {
5353 $ loader = new XmlFileLoader ($ container , new FileLocator ($ this ->configFolder ));
54+
55+ $ servicesFile = 'services.xml ' ;
5456 if (true === method_exists ('Symfony\Component\DependencyInjection\Definition ' , 'setFactoryClass ' )) {
55- // symfony 2.x
56- $ loader ->load ('services-2.3.xml ' );
57- } else {
58- // symfony 3.0+
59- $ loader ->load ('services.xml ' );
57+ $ servicesFile = 'services-2.3.xml ' ;
6058 }
59+ $ loader ->load ($ servicesFile );
6160
6261 if (! isset ($ config ['auth ' ]['user ' ]) || ! isset ($ config ['auth ' ]['password ' ])) {
6362 $ config ['auth ' ] = null ;
Original file line number Diff line number Diff line change @@ -27,8 +27,13 @@ public function testLoad($expected, $config)
2727 {
2828 $ vfsRoot = vfsStream::setup ('configDir ' );
2929 $ configDir = vfsStream::url ('configDir ' );
30+ $ servicesFile = 'services.xml ' ;
31+ if (true === method_exists ('Symfony\Component\DependencyInjection\Definition ' , 'setFactoryClass ' )) {
32+ $ servicesFile = 'services-2.3.xml ' ;
33+ }
34+
3035 file_put_contents (
31- $ configDir . '/services.xml ' ,
36+ $ configDir . '/ ' . $ servicesFile ,
3237 <<<END_OF_CONFIG
3338<?xml version="1.0" ?>
3439<container xmlns="http://symfony.com/schema/dic/services"
You can’t perform that action at this time.
0 commit comments