File tree Expand file tree Collapse file tree 2 files changed +40
-34
lines changed Expand file tree Collapse file tree 2 files changed +40
-34
lines changed Original file line number Diff line number Diff line change @@ -206,25 +206,28 @@ function ($class)
206
206
}
207
207
);
208
208
209
- // Symfony Yaml autoloader
210
- spl_autoload_register (
211
- function ($ class ) {
212
- if (0 === strpos (ltrim ($ class , '/ ' ), 'Symfony\Component\Yaml ' )) {
213
- $ file = sprintf (
214
- 'Symfony/Component/Yaml%s.php ' ,
215
-
216
- substr (
217
- str_replace ('\\' , '/ ' , $ class ),
218
- strlen ('Symfony\Component\Yaml ' )
219
- )
220
- );
221
-
222
- if (stream_resolve_include_path ($ file )) {
223
- require_once $ file ;
209
+ if (stream_resolve_include_path ('Symfony/Component/Yaml/autoloader.php ' )) {
210
+ require_once 'Symfony/Component/Yaml/autoloader.php ' ;
211
+ } else {
212
+ spl_autoload_register (
213
+ function ($ class ) {
214
+ if (0 === strpos (ltrim ($ class , '/ ' ), 'Symfony\Component\Yaml ' )) {
215
+ $ file = sprintf (
216
+ 'Symfony/Component/Yaml%s.php ' ,
217
+
218
+ substr (
219
+ str_replace ('\\' , '/ ' , $ class ),
220
+ strlen ('Symfony\Component\Yaml ' )
221
+ )
222
+ );
223
+
224
+ if (stream_resolve_include_path ($ file )) {
225
+ require_once $ file ;
226
+ }
224
227
}
225
228
}
226
- }
227
- );
229
+ );
230
+ }
228
231
229
232
if (stream_resolve_include_path ('PHP/Invoker/Autoload.php ' )) {
230
233
require_once 'PHP/Invoker/Autoload.php ' ;
Original file line number Diff line number Diff line change @@ -89,25 +89,28 @@ spl_autoload_register(
89
89
}
90
90
);
91
91
92
- // Symfony Yaml autoloader
93
- spl_autoload_register(
94
- function ($class) {
95
- if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Yaml')) {
96
- $file = sprintf(
97
- 'Symfony/Component/Yaml%s.php',
98
-
99
- substr(
100
- str_replace('\\', '/', $class),
101
- strlen('Symfony\Component\Yaml')
102
- )
103
- );
104
-
105
- if (stream_resolve_include_path($file)) {
106
- require_once $file;
92
+ if (stream_resolve_include_path('Symfony/Component/Yaml/autoloader.php')) {
93
+ require_once 'Symfony/Component/Yaml/autoloader.php';
94
+ } else {
95
+ spl_autoload_register(
96
+ function ($class) {
97
+ if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Yaml')) {
98
+ $file = sprintf(
99
+ 'Symfony/Component/Yaml%s.php',
100
+
101
+ substr(
102
+ str_replace('\\', '/', $class),
103
+ strlen('Symfony\Component\Yaml')
104
+ )
105
+ );
106
+
107
+ if (stream_resolve_include_path($file)) {
108
+ require_once $file;
109
+ }
107
110
}
108
111
}
109
- }
110
- );
112
+ );
113
+ }
111
114
112
115
if (stream_resolve_include_path('PHP/Invoker/Autoload.php')) {
113
116
require_once 'PHP/Invoker/Autoload.php';
You can’t perform that action at this time.
0 commit comments