@@ -58,7 +58,7 @@ class FrameworkExtension extends Extension
58
58
*/
59
59
public function load (array $ configs , ContainerBuilder $ container )
60
60
{
61
- $ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ . ' /.. /Resources/config ' ));
61
+ $ loader = new XmlFileLoader ($ container , new FileLocator (dirname ( __DIR__ ). ' /Resources/config ' ));
62
62
63
63
$ loader ->load ('web.xml ' );
64
64
$ loader ->load ('services.xml ' );
@@ -686,7 +686,7 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
686
686
if (class_exists ('Symfony\Component\Security\Core\Exception\AuthenticationException ' )) {
687
687
$ r = new \ReflectionClass ('Symfony\Component\Security\Core\Exception\AuthenticationException ' );
688
688
689
- $ dirs [] = dirname ($ r ->getFileName ()). ' /.. /Resources/translations ' ;
689
+ $ dirs [] = dirname (dirname ( $ r ->getFileName ())). ' /Resources/translations ' ;
690
690
}
691
691
$ rootDir = $ container ->getParameter ('kernel.root_dir ' );
692
692
foreach ($ container ->getParameter ('kernel.bundles ' ) as $ bundle => $ class ) {
@@ -811,21 +811,21 @@ private function getValidatorMappingFiles(ContainerBuilder $container)
811
811
$ dirname = dirname ($ reflection ->getFileName ());
812
812
813
813
if (is_file ($ file = $ dirname .'/Resources/config/validation.xml ' )) {
814
- $ files [0 ][] = realpath ( $ file) ;
814
+ $ files [0 ][] = $ file ;
815
815
$ container ->addResource (new FileResource ($ file ));
816
816
}
817
817
818
818
if (is_file ($ file = $ dirname .'/Resources/config/validation.yml ' )) {
819
- $ files [1 ][] = realpath ( $ file) ;
819
+ $ files [1 ][] = $ file ;
820
820
$ container ->addResource (new FileResource ($ file ));
821
821
}
822
822
823
823
if (is_dir ($ dir = $ dirname .'/Resources/config/validation ' )) {
824
824
foreach (Finder::create ()->files ()->in ($ dir )->name ('*.xml ' ) as $ file ) {
825
- $ files [0 ][] = $ file ->getRealPath ();
825
+ $ files [0 ][] = $ file ->getPathname ();
826
826
}
827
827
foreach (Finder::create ()->files ()->in ($ dir )->name ('*.yml ' ) as $ file ) {
828
- $ files [1 ][] = $ file ->getRealPath ();
828
+ $ files [1 ][] = $ file ->getPathname ();
829
829
}
830
830
831
831
$ container ->addResource (new DirectoryResource ($ dir ));
@@ -948,15 +948,15 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
948
948
$ dirname = dirname ($ reflection ->getFileName ());
949
949
950
950
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 ));
952
952
$ definition ->setPublic (false );
953
953
954
954
$ serializerLoaders [] = $ definition ;
955
955
$ container ->addResource (new FileResource ($ file ));
956
956
}
957
957
958
958
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 ));
960
960
$ definition ->setPublic (false );
961
961
962
962
$ serializerLoaders [] = $ definition ;
@@ -965,13 +965,13 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
965
965
966
966
if (is_dir ($ dir = $ dirname .'/Resources/config/serialization ' )) {
967
967
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 ()));
969
969
$ definition ->setPublic (false );
970
970
971
971
$ serializerLoaders [] = $ definition ;
972
972
}
973
973
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 ()));
975
975
$ definition ->setPublic (false );
976
976
977
977
$ serializerLoaders [] = $ definition ;
@@ -1094,7 +1094,7 @@ private function getKernelRootHash(ContainerBuilder $container)
1094
1094
*/
1095
1095
public function getXsdValidationBasePath ()
1096
1096
{
1097
- return __DIR__ . ' /.. /Resources/config/schema ' ;
1097
+ return dirname ( __DIR__ ). ' /Resources/config/schema ' ;
1098
1098
}
1099
1099
1100
1100
public function getNamespace ()
0 commit comments