[ClassLoader] Fixed version compare

This commit is contained in:
Martin Hasoň 2012-03-09 08:17:46 +01:00
parent 8fb529c798
commit 1ec075d7c9
2 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ class ClassMapGenerator
{
$contents = file_get_contents($path);
$tokens = token_get_all($contents);
$T_TRAIT = version_compare(PHP_VERSION, '5.4.0RC1', '<') ? -1 : T_TRAIT;
$T_TRAIT = version_compare(PHP_VERSION, '5.4', '<') ? -1 : T_TRAIT;
$classes = array();

View File

@ -56,7 +56,7 @@ class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase
)),
);
if (version_compare(PHP_VERSION, '5.4.0RC1', '>=')) {
if (version_compare(PHP_VERSION, '5.4', '>=')) {
$data[] = array(__DIR__.'/Fixtures/php5.4', array(
'TFoo' => __DIR__.'/Fixtures/php5.4/traits.php',
'CFoo' => __DIR__.'/Fixtures/php5.4/traits.php',