Skip to content

Commit a09a260

Browse files
Revert "Use Use Symfony YAML PEAR autoloader when available"
This reverts commit f35bf18.
1 parent f35bf18 commit a09a260

File tree

2 files changed

+34
-40
lines changed

2 files changed

+34
-40
lines changed

PHPUnit/Autoload.php

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -206,28 +206,25 @@ function ($class)
206206
}
207207
);
208208

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-
}
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;
227224
}
228225
}
229-
);
230-
}
226+
}
227+
);
231228

232229
if (stream_resolve_include_path('PHP/Invoker/Autoload.php')) {
233230
require_once 'PHP/Invoker/Autoload.php';

PHPUnit/Autoload.php.in

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,28 +89,25 @@ spl_autoload_register(
8989
}
9090
);
9191

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-
}
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;
110107
}
111108
}
112-
);
113-
}
109+
}
110+
);
114111

115112
if (stream_resolve_include_path('PHP/Invoker/Autoload.php')) {
116113
require_once 'PHP/Invoker/Autoload.php';

0 commit comments

Comments
 (0)