Skip to content
Browse files

Merge branch '3.7'

  • Loading branch information...
2 parents 940a463 + a09a260 commit 6df0e3dd27eab9d9a69d7d88deb9a6c9b325d16f @sebastianbergmann committed
Showing with 32 additions and 38 deletions.
  1. +15 −18 PHPUnit/Autoload.php
  2. +17 −20 PHPUnit/Autoload.php.in
View
33 PHPUnit/Autoload.php
@@ -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';
View
37 PHPUnit/Autoload.php.in
@@ -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';

0 comments on commit 6df0e3d

Please sign in to comment.
Something went wrong with that request. Please try again.