Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixes #860

 * Relax version requirements for `symfony/yaml`.
  • Loading branch information...
commit 50d64e4021b8dee9b6ca67674a0ba70553872e36 1 parent 2c67e52
Jeff Welch whatthejeff authored
26 PHPUnit/Autoload.php
View
@@ -66,7 +66,6 @@
require_once 'PHP/Timer/Autoload.php';
require_once 'PHPUnit/Framework/MockObject/Autoload.php';
require_once 'Text/Template/Autoload.php';
-require_once 'Symfony/Component/Yaml/autoloader.php';
spl_autoload_register(
function ($class)
@@ -207,6 +206,31 @@ 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';
}
26 PHPUnit/Autoload.php.in
View
@@ -66,7 +66,6 @@ require_once 'PHP/CodeCoverage/Autoload.php';
require_once 'PHP/Timer/Autoload.php';
require_once 'PHPUnit/Framework/MockObject/Autoload.php';
require_once 'Text/Template/Autoload.php';
-require_once 'Symfony/Component/Yaml/autoloader.php';
spl_autoload_register(
function ($class)
@@ -90,6 +89,31 @@ 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';
}
2  composer.json
View
@@ -27,7 +27,7 @@
"phpunit/php-code-coverage": ">=1.2.1,<1.3.0",
"phpunit/php-timer": ">=1.0.2,<1.1.0",
"phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0",
- "symfony/yaml": ">=2.2.0",
+ "symfony/yaml": ">=2.0.0,<2.3.0",
"ext-dom": "*",
"ext-pcre": "*",
"ext-reflection": "*",
3  package.xml
View
@@ -245,7 +245,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>
<extension>
<name>dom</name>
Please sign in to comment.
Something went wrong with that request. Please try again.