@@ -65,7 +65,7 @@ class FrameworkExtension extends Extension
6565 */
6666 public function load (array $ configs , ContainerBuilder $ container )
6767 {
68- $ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ . ' /.. /Resources/config ' ));
68+ $ loader = new XmlFileLoader ($ container , new FileLocator (dirname ( __DIR__ ). ' /Resources/config ' ));
6969
7070 $ loader ->load ('web.xml ' );
7171 $ loader ->load ('services.xml ' );
@@ -805,7 +805,7 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
805805 if (class_exists ('Symfony\Component\Security\Core\Exception\AuthenticationException ' )) {
806806 $ r = new \ReflectionClass ('Symfony\Component\Security\Core\Exception\AuthenticationException ' );
807807
808- $ dirs [] = dirname ($ r ->getFileName ()). ' /.. /Resources/translations ' ;
808+ $ dirs [] = dirname (dirname ( $ r ->getFileName ())). ' /Resources/translations ' ;
809809 }
810810 $ rootDir = $ container ->getParameter ('kernel.root_dir ' );
811811 foreach ($ container ->getParameter ('kernel.bundles ' ) as $ bundle => $ class ) {
@@ -938,21 +938,21 @@ private function getValidatorMappingFiles(ContainerBuilder $container)
938938 $ dirname = dirname ($ reflection ->getFileName ());
939939
940940 if (is_file ($ file = $ dirname .'/Resources/config/validation.xml ' )) {
941- $ files [0 ][] = realpath ( $ file) ;
941+ $ files [0 ][] = $ file ;
942942 $ container ->addResource (new FileResource ($ file ));
943943 }
944944
945945 if (is_file ($ file = $ dirname .'/Resources/config/validation.yml ' )) {
946- $ files [1 ][] = realpath ( $ file) ;
946+ $ files [1 ][] = $ file ;
947947 $ container ->addResource (new FileResource ($ file ));
948948 }
949949
950950 if (is_dir ($ dir = $ dirname .'/Resources/config/validation ' )) {
951951 foreach (Finder::create ()->files ()->in ($ dir )->name ('*.xml ' ) as $ file ) {
952- $ files [0 ][] = $ file ->getRealPath ();
952+ $ files [0 ][] = $ file ->getPathname ();
953953 }
954954 foreach (Finder::create ()->files ()->in ($ dir )->name ('*.yml ' ) as $ file ) {
955- $ files [1 ][] = $ file ->getRealPath ();
955+ $ files [1 ][] = $ file ->getPathname ();
956956 }
957957
958958 $ container ->addResource (new DirectoryResource ($ dir ));
@@ -1115,15 +1115,15 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
11151115 $ dirname = dirname ($ reflection ->getFileName ());
11161116
11171117 if (is_file ($ file = $ dirname .'/Resources/config/serialization.xml ' )) {
1118- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array (realpath ( $ file) ));
1118+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ));
11191119 $ definition ->setPublic (false );
11201120
11211121 $ serializerLoaders [] = $ definition ;
11221122 $ container ->addResource (new FileResource ($ file ));
11231123 }
11241124
11251125 if (is_file ($ file = $ dirname .'/Resources/config/serialization.yml ' )) {
1126- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array (realpath ( $ file) ));
1126+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ));
11271127 $ definition ->setPublic (false );
11281128
11291129 $ serializerLoaders [] = $ definition ;
@@ -1132,13 +1132,13 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
11321132
11331133 if (is_dir ($ dir = $ dirname .'/Resources/config/serialization ' )) {
11341134 foreach (Finder::create ()->files ()->in ($ dir )->name ('*.xml ' ) as $ file ) {
1135- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ->getRealPath ()));
1135+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ->getPathname ()));
11361136 $ definition ->setPublic (false );
11371137
11381138 $ serializerLoaders [] = $ definition ;
11391139 }
11401140 foreach (Finder::create ()->files ()->in ($ dir )->name ('*.yml ' ) as $ file ) {
1141- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ->getRealPath ()));
1141+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ->getPathname ()));
11421142 $ definition ->setPublic (false );
11431143
11441144 $ serializerLoaders [] = $ definition ;
@@ -1265,7 +1265,7 @@ private function getKernelRootHash(ContainerBuilder $container)
12651265 */
12661266 public function getXsdValidationBasePath ()
12671267 {
1268- return __DIR__ . ' /.. /Resources/config/schema ' ;
1268+ return dirname ( __DIR__ ). ' /Resources/config/schema ' ;
12691269 }
12701270
12711271 public function getNamespace ()
0 commit comments