@@ -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 ' );
@@ -693,7 +693,7 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
693
693
if (class_exists ('Symfony\Component\Security\Core\Exception\AuthenticationException ' )) {
694
694
$ r = new \ReflectionClass ('Symfony\Component\Security\Core\Exception\AuthenticationException ' );
695
695
696
- $ dirs [] = dirname ($ r ->getFileName ()). ' /.. /Resources/translations ' ;
696
+ $ dirs [] = dirname (dirname ( $ r ->getFileName ())). ' /Resources/translations ' ;
697
697
}
698
698
$ rootDir = $ container ->getParameter ('kernel.root_dir ' );
699
699
foreach ($ container ->getParameter ('kernel.bundles ' ) as $ bundle => $ class ) {
@@ -824,21 +824,21 @@ private function getValidatorMappingFiles(ContainerBuilder $container)
824
824
$ dirname = dirname ($ reflection ->getFileName ());
825
825
826
826
if (is_file ($ file = $ dirname .'/Resources/config/validation.xml ' )) {
827
- $ files [0 ][] = realpath ( $ file) ;
827
+ $ files [0 ][] = $ file ;
828
828
$ container ->addResource (new FileResource ($ file ));
829
829
}
830
830
831
831
if (is_file ($ file = $ dirname .'/Resources/config/validation.yml ' )) {
832
- $ files [1 ][] = realpath ( $ file) ;
832
+ $ files [1 ][] = $ file ;
833
833
$ container ->addResource (new FileResource ($ file ));
834
834
}
835
835
836
836
if (is_dir ($ dir = $ dirname .'/Resources/config/validation ' )) {
837
837
foreach (Finder::create ()->files ()->in ($ dir )->name ('*.xml ' ) as $ file ) {
838
- $ files [0 ][] = $ file ->getRealPath ();
838
+ $ files [0 ][] = $ file ->getPathname ();
839
839
}
840
840
foreach (Finder::create ()->files ()->in ($ dir )->name ('*.yml ' ) as $ file ) {
841
- $ files [1 ][] = $ file ->getRealPath ();
841
+ $ files [1 ][] = $ file ->getPathname ();
842
842
}
843
843
844
844
$ container ->addResource (new DirectoryResource ($ dir ));
@@ -946,15 +946,15 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
946
946
$ dirname = dirname ($ reflection ->getFileName ());
947
947
948
948
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 ));
950
950
$ definition ->setPublic (false );
951
951
952
952
$ serializerLoaders [] = $ definition ;
953
953
$ container ->addResource (new FileResource ($ file ));
954
954
}
955
955
956
956
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 ));
958
958
$ definition ->setPublic (false );
959
959
960
960
$ serializerLoaders [] = $ definition ;
@@ -963,13 +963,13 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
963
963
964
964
if (is_dir ($ dir = $ dirname .'/Resources/config/serialization ' )) {
965
965
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 ()));
967
967
$ definition ->setPublic (false );
968
968
969
969
$ serializerLoaders [] = $ definition ;
970
970
}
971
971
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 ()));
973
973
$ definition ->setPublic (false );
974
974
975
975
$ serializerLoaders [] = $ definition ;
@@ -1042,7 +1042,7 @@ private function getKernelRootHash(ContainerBuilder $container)
1042
1042
*/
1043
1043
public function getXsdValidationBasePath ()
1044
1044
{
1045
- return __DIR__ . ' /.. /Resources/config/schema ' ;
1045
+ return dirname ( __DIR__ ). ' /Resources/config/schema ' ;
1046
1046
}
1047
1047
1048
1048
public function getNamespace ()
0 commit comments