@@ -58,7 +58,7 @@ class FrameworkExtension extends Extension
5858 */
5959 public function load (array $ configs , ContainerBuilder $ container )
6060 {
61- $ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ . ' /.. /Resources/config ' ));
61+ $ loader = new XmlFileLoader ($ container , new FileLocator (dirname ( __DIR__ ). ' /Resources/config ' ));
6262
6363 $ loader ->load ('web.xml ' );
6464 $ loader ->load ('services.xml ' );
@@ -686,7 +686,7 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
686686 if (class_exists ('Symfony\Component\Security\Core\Exception\AuthenticationException ' )) {
687687 $ r = new \ReflectionClass ('Symfony\Component\Security\Core\Exception\AuthenticationException ' );
688688
689- $ dirs [] = dirname ($ r ->getFileName ()). ' /.. /Resources/translations ' ;
689+ $ dirs [] = dirname (dirname ( $ r ->getFileName ())). ' /Resources/translations ' ;
690690 }
691691 $ rootDir = $ container ->getParameter ('kernel.root_dir ' );
692692 foreach ($ container ->getParameter ('kernel.bundles ' ) as $ bundle => $ class ) {
@@ -811,21 +811,21 @@ private function getValidatorMappingFiles(ContainerBuilder $container)
811811 $ dirname = dirname ($ reflection ->getFileName ());
812812
813813 if (is_file ($ file = $ dirname .'/Resources/config/validation.xml ' )) {
814- $ files [0 ][] = realpath ( $ file) ;
814+ $ files [0 ][] = $ file ;
815815 $ container ->addResource (new FileResource ($ file ));
816816 }
817817
818818 if (is_file ($ file = $ dirname .'/Resources/config/validation.yml ' )) {
819- $ files [1 ][] = realpath ( $ file) ;
819+ $ files [1 ][] = $ file ;
820820 $ container ->addResource (new FileResource ($ file ));
821821 }
822822
823823 if (is_dir ($ dir = $ dirname .'/Resources/config/validation ' )) {
824824 foreach (Finder::create ()->files ()->in ($ dir )->name ('*.xml ' ) as $ file ) {
825- $ files [0 ][] = $ file ->getRealPath ();
825+ $ files [0 ][] = $ file ->getPathname ();
826826 }
827827 foreach (Finder::create ()->files ()->in ($ dir )->name ('*.yml ' ) as $ file ) {
828- $ files [1 ][] = $ file ->getRealPath ();
828+ $ files [1 ][] = $ file ->getPathname ();
829829 }
830830
831831 $ container ->addResource (new DirectoryResource ($ dir ));
@@ -948,15 +948,15 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
948948 $ dirname = dirname ($ reflection ->getFileName ());
949949
950950 if (is_file ($ file = $ dirname .'/Resources/config/serialization.xml ' )) {
951- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array (realpath ( $ file) ));
951+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ));
952952 $ definition ->setPublic (false );
953953
954954 $ serializerLoaders [] = $ definition ;
955955 $ container ->addResource (new FileResource ($ file ));
956956 }
957957
958958 if (is_file ($ file = $ dirname .'/Resources/config/serialization.yml ' )) {
959- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array (realpath ( $ file) ));
959+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ));
960960 $ definition ->setPublic (false );
961961
962962 $ serializerLoaders [] = $ definition ;
@@ -965,13 +965,13 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
965965
966966 if (is_dir ($ dir = $ dirname .'/Resources/config/serialization ' )) {
967967 foreach (Finder::create ()->files ()->in ($ dir )->name ('*.xml ' ) as $ file ) {
968- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ->getRealPath ()));
968+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ->getPathname ()));
969969 $ definition ->setPublic (false );
970970
971971 $ serializerLoaders [] = $ definition ;
972972 }
973973 foreach (Finder::create ()->files ()->in ($ dir )->name ('*.yml ' ) as $ file ) {
974- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ->getRealPath ()));
974+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ->getPathname ()));
975975 $ definition ->setPublic (false );
976976
977977 $ serializerLoaders [] = $ definition ;
@@ -1094,7 +1094,7 @@ private function getKernelRootHash(ContainerBuilder $container)
10941094 */
10951095 public function getXsdValidationBasePath ()
10961096 {
1097- return __DIR__ . ' /.. /Resources/config/schema ' ;
1097+ return dirname ( __DIR__ ). ' /Resources/config/schema ' ;
10981098 }
10991099
11001100 public function getNamespace ()
0 commit comments