@@ -52,7 +52,7 @@ class FrameworkExtension extends Extension
5252 */
5353 public function load (array $ configs , ContainerBuilder $ container )
5454 {
55- $ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ . ' /.. /Resources/config ' ));
55+ $ loader = new XmlFileLoader ($ container , new FileLocator (dirname ( __DIR__ ). ' /Resources/config ' ));
5656
5757 $ loader ->load ('web.xml ' );
5858 $ loader ->load ('services.xml ' );
@@ -693,7 +693,7 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
693693 if (class_exists ('Symfony\Component\Security\Core\Exception\AuthenticationException ' )) {
694694 $ r = new \ReflectionClass ('Symfony\Component\Security\Core\Exception\AuthenticationException ' );
695695
696- $ dirs [] = dirname ($ r ->getFileName ()). ' /.. /Resources/translations ' ;
696+ $ dirs [] = dirname (dirname ( $ r ->getFileName ())). ' /Resources/translations ' ;
697697 }
698698 $ rootDir = $ container ->getParameter ('kernel.root_dir ' );
699699 foreach ($ container ->getParameter ('kernel.bundles ' ) as $ bundle => $ class ) {
@@ -824,21 +824,21 @@ private function getValidatorMappingFiles(ContainerBuilder $container)
824824 $ dirname = dirname ($ reflection ->getFileName ());
825825
826826 if (is_file ($ file = $ dirname .'/Resources/config/validation.xml ' )) {
827- $ files [0 ][] = realpath ( $ file) ;
827+ $ files [0 ][] = $ file ;
828828 $ container ->addResource (new FileResource ($ file ));
829829 }
830830
831831 if (is_file ($ file = $ dirname .'/Resources/config/validation.yml ' )) {
832- $ files [1 ][] = realpath ( $ file) ;
832+ $ files [1 ][] = $ file ;
833833 $ container ->addResource (new FileResource ($ file ));
834834 }
835835
836836 if (is_dir ($ dir = $ dirname .'/Resources/config/validation ' )) {
837837 foreach (Finder::create ()->files ()->in ($ dir )->name ('*.xml ' ) as $ file ) {
838- $ files [0 ][] = $ file ->getRealPath ();
838+ $ files [0 ][] = $ file ->getPathname ();
839839 }
840840 foreach (Finder::create ()->files ()->in ($ dir )->name ('*.yml ' ) as $ file ) {
841- $ files [1 ][] = $ file ->getRealPath ();
841+ $ files [1 ][] = $ file ->getPathname ();
842842 }
843843
844844 $ container ->addResource (new DirectoryResource ($ dir ));
@@ -946,15 +946,15 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
946946 $ dirname = dirname ($ reflection ->getFileName ());
947947
948948 if (is_file ($ file = $ dirname .'/Resources/config/serialization.xml ' )) {
949- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array (realpath ( $ file) ));
949+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ));
950950 $ definition ->setPublic (false );
951951
952952 $ serializerLoaders [] = $ definition ;
953953 $ container ->addResource (new FileResource ($ file ));
954954 }
955955
956956 if (is_file ($ file = $ dirname .'/Resources/config/serialization.yml ' )) {
957- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array (realpath ( $ file) ));
957+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ));
958958 $ definition ->setPublic (false );
959959
960960 $ serializerLoaders [] = $ definition ;
@@ -963,13 +963,13 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
963963
964964 if (is_dir ($ dir = $ dirname .'/Resources/config/serialization ' )) {
965965 foreach (Finder::create ()->files ()->in ($ dir )->name ('*.xml ' ) as $ file ) {
966- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ->getRealPath ()));
966+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ->getPathname ()));
967967 $ definition ->setPublic (false );
968968
969969 $ serializerLoaders [] = $ definition ;
970970 }
971971 foreach (Finder::create ()->files ()->in ($ dir )->name ('*.yml ' ) as $ file ) {
972- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ->getRealPath ()));
972+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ->getPathname ()));
973973 $ definition ->setPublic (false );
974974
975975 $ serializerLoaders [] = $ definition ;
@@ -1042,7 +1042,7 @@ private function getKernelRootHash(ContainerBuilder $container)
10421042 */
10431043 public function getXsdValidationBasePath ()
10441044 {
1045- return __DIR__ . ' /.. /Resources/config/schema ' ;
1045+ return dirname ( __DIR__ ). ' /Resources/config/schema ' ;
10461046 }
10471047
10481048 public function getNamespace ()
0 commit comments