Skip to content

Commit

Permalink
Merge branch '3.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 19, 2013
2 parents 940a463 + a09a260 commit 6df0e3d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 38 deletions.
33 changes: 15 additions & 18 deletions PHPUnit/Autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,28 +215,25 @@ function ($class)
}
);

if (stream_resolve_include_path('Symfony/Component/Yaml/autoloader.php')) {
require_once 'Symfony/Component/Yaml/autoloader.php';
} else {
spl_autoload_register(
function ($class) {
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Yaml')) {
$file = sprintf(
'Symfony/Component/Yaml%s.php',
// Symfony Yaml autoloader
spl_autoload_register(
function ($class) {
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Yaml')) {
$file = sprintf(
'Symfony/Component/Yaml%s.php',

substr(
str_replace('\\', '/', $class),
strlen('Symfony\Component\Yaml')
)
);
substr(
str_replace('\\', '/', $class),
strlen('Symfony\Component\Yaml')
)
);

if (stream_resolve_include_path($file)) {
require_once $file;
}
if (stream_resolve_include_path($file)) {
require_once $file;
}
}
);
}
}
);

if (stream_resolve_include_path('PHP/Invoker/Autoload.php')) {
require_once 'PHP/Invoker/Autoload.php';
Expand Down
37 changes: 17 additions & 20 deletions PHPUnit/Autoload.php.in
Original file line number Diff line number Diff line change
Expand Up @@ -92,28 +92,25 @@ spl_autoload_register(
}
);

if (stream_resolve_include_path('Symfony/Component/Yaml/autoloader.php')) {
require_once 'Symfony/Component/Yaml/autoloader.php';
} else {
spl_autoload_register(
function ($class) {
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Yaml')) {
$file = sprintf(
'Symfony/Component/Yaml%s.php',

substr(
str_replace('\\', '/', $class),
strlen('Symfony\Component\Yaml')
)
);

if (stream_resolve_include_path($file)) {
require_once $file;
}
// Symfony Yaml autoloader
spl_autoload_register(
function ($class) {
if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Yaml')) {
$file = sprintf(
'Symfony/Component/Yaml%s.php',

substr(
str_replace('\\', '/', $class),
strlen('Symfony\Component\Yaml')
)
);

if (stream_resolve_include_path($file)) {
require_once $file;
}
}
);
}
}
);

if (stream_resolve_include_path('PHP/Invoker/Autoload.php')) {
require_once 'PHP/Invoker/Autoload.php';
Expand Down

0 comments on commit 6df0e3d

Please sign in to comment.