@@ -52,7 +52,7 @@ class FrameworkExtension extends Extension
52
52
*/
53
53
public function load (array $ configs , ContainerBuilder $ container )
54
54
{
55
- $ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ . ' /.. /Resources/config ' ));
55
+ $ loader = new XmlFileLoader ($ container , new FileLocator (dirname ( __DIR__ ). ' /Resources/config ' ));
56
56
57
57
$ loader ->load ('web.xml ' );
58
58
$ loader ->load ('services.xml ' );
@@ -689,7 +689,7 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
689
689
if (class_exists ('Symfony\Component\Security\Core\Exception\AuthenticationException ' )) {
690
690
$ r = new \ReflectionClass ('Symfony\Component\Security\Core\Exception\AuthenticationException ' );
691
691
692
- $ dirs [] = dirname ($ r ->getFileName ()). ' /.. /Resources/translations ' ;
692
+ $ dirs [] = dirname (dirname ( $ r ->getFileName ())). ' /Resources/translations ' ;
693
693
}
694
694
$ rootDir = $ container ->getParameter ('kernel.root_dir ' );
695
695
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 ));
@@ -926,15 +926,15 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
926
926
$ dirname = dirname ($ reflection ->getFileName ());
927
927
928
928
if (is_file ($ file = $ dirname .'/Resources/config/serialization.xml ' )) {
929
- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array (realpath ( $ file) ));
929
+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ));
930
930
$ definition ->setPublic (false );
931
931
932
932
$ serializerLoaders [] = $ definition ;
933
933
$ container ->addResource (new FileResource ($ file ));
934
934
}
935
935
936
936
if (is_file ($ file = $ dirname .'/Resources/config/serialization.yml ' )) {
937
- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array (realpath ( $ file) ));
937
+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ));
938
938
$ definition ->setPublic (false );
939
939
940
940
$ serializerLoaders [] = $ definition ;
@@ -943,13 +943,13 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
943
943
944
944
if (is_dir ($ dir = $ dirname .'/Resources/config/serialization ' )) {
945
945
foreach (Finder::create ()->files ()->in ($ dir )->name ('*.xml ' ) as $ file ) {
946
- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ->getRealPath ()));
946
+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ->getPathname ()));
947
947
$ definition ->setPublic (false );
948
948
949
949
$ serializerLoaders [] = $ definition ;
950
950
}
951
951
foreach (Finder::create ()->files ()->in ($ dir )->name ('*.yml ' ) as $ file ) {
952
- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ->getRealPath ()));
952
+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ->getPathname ()));
953
953
$ definition ->setPublic (false );
954
954
955
955
$ serializerLoaders [] = $ definition ;
@@ -996,7 +996,7 @@ private function getKernelRootHash(ContainerBuilder $container)
996
996
*/
997
997
public function getXsdValidationBasePath ()
998
998
{
999
- return __DIR__ . ' /.. /Resources/config/schema ' ;
999
+ return dirname ( __DIR__ ). ' /Resources/config/schema ' ;
1000
1000
}
1001
1001
1002
1002
public function getNamespace ()
0 commit comments