@@ -65,7 +65,7 @@ class FrameworkExtension extends Extension
65
65
*/
66
66
public function load (array $ configs , ContainerBuilder $ container )
67
67
{
68
- $ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ . ' /.. /Resources/config ' ));
68
+ $ loader = new XmlFileLoader ($ container , new FileLocator (dirname ( __DIR__ ). ' /Resources/config ' ));
69
69
70
70
$ loader ->load ('web.xml ' );
71
71
$ loader ->load ('services.xml ' );
@@ -805,7 +805,7 @@ private function registerTranslatorConfiguration(array $config, ContainerBuilder
805
805
if (class_exists ('Symfony\Component\Security\Core\Exception\AuthenticationException ' )) {
806
806
$ r = new \ReflectionClass ('Symfony\Component\Security\Core\Exception\AuthenticationException ' );
807
807
808
- $ dirs [] = dirname ($ r ->getFileName ()). ' /.. /Resources/translations ' ;
808
+ $ dirs [] = dirname (dirname ( $ r ->getFileName ())). ' /Resources/translations ' ;
809
809
}
810
810
$ rootDir = $ container ->getParameter ('kernel.root_dir ' );
811
811
foreach ($ container ->getParameter ('kernel.bundles ' ) as $ bundle => $ class ) {
@@ -938,21 +938,21 @@ private function getValidatorMappingFiles(ContainerBuilder $container)
938
938
$ dirname = dirname ($ reflection ->getFileName ());
939
939
940
940
if (is_file ($ file = $ dirname .'/Resources/config/validation.xml ' )) {
941
- $ files [0 ][] = realpath ( $ file) ;
941
+ $ files [0 ][] = $ file ;
942
942
$ container ->addResource (new FileResource ($ file ));
943
943
}
944
944
945
945
if (is_file ($ file = $ dirname .'/Resources/config/validation.yml ' )) {
946
- $ files [1 ][] = realpath ( $ file) ;
946
+ $ files [1 ][] = $ file ;
947
947
$ container ->addResource (new FileResource ($ file ));
948
948
}
949
949
950
950
if (is_dir ($ dir = $ dirname .'/Resources/config/validation ' )) {
951
951
foreach (Finder::create ()->files ()->in ($ dir )->name ('*.xml ' ) as $ file ) {
952
- $ files [0 ][] = $ file ->getRealPath ();
952
+ $ files [0 ][] = $ file ->getPathname ();
953
953
}
954
954
foreach (Finder::create ()->files ()->in ($ dir )->name ('*.yml ' ) as $ file ) {
955
- $ files [1 ][] = $ file ->getRealPath ();
955
+ $ files [1 ][] = $ file ->getPathname ();
956
956
}
957
957
958
958
$ container ->addResource (new DirectoryResource ($ dir ));
@@ -1115,15 +1115,15 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
1115
1115
$ dirname = dirname ($ reflection ->getFileName ());
1116
1116
1117
1117
if (is_file ($ file = $ dirname .'/Resources/config/serialization.xml ' )) {
1118
- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array (realpath ( $ file) ));
1118
+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ));
1119
1119
$ definition ->setPublic (false );
1120
1120
1121
1121
$ serializerLoaders [] = $ definition ;
1122
1122
$ container ->addResource (new FileResource ($ file ));
1123
1123
}
1124
1124
1125
1125
if (is_file ($ file = $ dirname .'/Resources/config/serialization.yml ' )) {
1126
- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array (realpath ( $ file) ));
1126
+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ));
1127
1127
$ definition ->setPublic (false );
1128
1128
1129
1129
$ serializerLoaders [] = $ definition ;
@@ -1132,13 +1132,13 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
1132
1132
1133
1133
if (is_dir ($ dir = $ dirname .'/Resources/config/serialization ' )) {
1134
1134
foreach (Finder::create ()->files ()->in ($ dir )->name ('*.xml ' ) as $ file ) {
1135
- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ->getRealPath ()));
1135
+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader ' , array ($ file ->getPathname ()));
1136
1136
$ definition ->setPublic (false );
1137
1137
1138
1138
$ serializerLoaders [] = $ definition ;
1139
1139
}
1140
1140
foreach (Finder::create ()->files ()->in ($ dir )->name ('*.yml ' ) as $ file ) {
1141
- $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ->getRealPath ()));
1141
+ $ definition = new Definition ('Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader ' , array ($ file ->getPathname ()));
1142
1142
$ definition ->setPublic (false );
1143
1143
1144
1144
$ serializerLoaders [] = $ definition ;
@@ -1265,7 +1265,7 @@ private function getKernelRootHash(ContainerBuilder $container)
1265
1265
*/
1266
1266
public function getXsdValidationBasePath ()
1267
1267
{
1268
- return __DIR__ . ' /.. /Resources/config/schema ' ;
1268
+ return dirname ( __DIR__ ). ' /Resources/config/schema ' ;
1269
1269
}
1270
1270
1271
1271
public function getNamespace ()
0 commit comments