Skip to content
Browse files

Merge branch '3.7'

  • Loading branch information...
2 parents cb66925 + f35bf18 commit 940a463ce535751beda2faa4b1db08b9fe2e196d @sebastianbergmann committed Mar 19, 2013
Showing with 49 additions and 4 deletions.
  1. +23 −1 PHPUnit/Autoload.php
  2. +23 −1 PHPUnit/Autoload.php.in
  3. +1 −1 composer.json
  4. +2 −1 package.xml
View
24 PHPUnit/Autoload.php
@@ -69,7 +69,6 @@
require_once 'SebastianBergmann/Diff/autoload.php';
require_once 'SebastianBergmann/Exporter/autoload.php';
require_once 'SebastianBergmann/Version/autoload.php';
-require_once 'Symfony/Component/Yaml/autoloader.php';
spl_autoload_register(
function ($class)
@@ -216,6 +215,29 @@ 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',
+
+ 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';
}
View
24 PHPUnit/Autoload.php.in
@@ -69,7 +69,6 @@ require_once 'Text/Template/Autoload.php';
require_once 'SebastianBergmann/Diff/autoload.php';
require_once 'SebastianBergmann/Exporter/autoload.php';
require_once 'SebastianBergmann/Version/autoload.php';
-require_once 'Symfony/Component/Yaml/autoloader.php';
spl_autoload_register(
function ($class)
@@ -93,6 +92,29 @@ 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;
+ }
+ }
+ }
+ );
+}
+
if (stream_resolve_include_path('PHP/Invoker/Autoload.php')) {
require_once 'PHP/Invoker/Autoload.php';
}
View
2 composer.json
@@ -28,7 +28,7 @@
"phpunit/php-code-coverage": "1.3.*@dev",
"phpunit/php-timer": ">=1.1.0",
"phpunit/phpunit-mock-objects": "1.3.*@dev",
- "symfony/yaml": ">=2.2.0",
+ "symfony/yaml": ">=2.0.0,<2.3.0",
"sebastian/diff": ">=1.0.0",
"sebastian/exporter": ">=1.0.0",
"sebastian/version": ">=1.0.0",
View
3 package.xml
@@ -257,7 +257,8 @@
<package>
<name>Yaml</name>
<channel>pear.symfony.com</channel>
- <min>2.2.0</min>
+ <min>2.0.0</min>
+ <max>2.2.99</max>
</package>
<package>
<name>Version</name>

0 comments on commit 940a463

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