diff --git a/src/main/php/module.xp b/src/main/php/module.xp index 409bfef3..82f404aa 100755 --- a/src/main/php/module.xp +++ b/src/main/php/module.xp @@ -7,7 +7,7 @@ module xp-framework/compiler { /** @return void */ public function initialize() { - ClassLoader::registerLoader(CompilingClassloader::instanceFor('php:'.PHP_VERSION)); + ClassLoader::registerLoader(CompilingClassloader::instanceFor('php:'.PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'.'.PHP_RELEASE_VERSION)); if (!interface_exists(\IDisposable::class, false)) { eval('interface IDisposable { public function __dispose(); }'); diff --git a/src/main/php/xp/compiler/AstRunner.class.php b/src/main/php/xp/compiler/AstRunner.class.php index 223389ae..5a5bccfa 100755 --- a/src/main/php/xp/compiler/AstRunner.class.php +++ b/src/main/php/xp/compiler/AstRunner.class.php @@ -72,7 +72,7 @@ public static function main(array $args) { } $lang= Language::named('PHP'); - $emit= Emitter::forRuntime('php:'.PHP_VERSION)->newInstance(); + $emit= Emitter::forRuntime('php:'.PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'.'.PHP_RELEASE_VERSION)->newInstance(); foreach ($lang->extensions() as $extension) { $extension->setup($lang, $emit); } diff --git a/src/main/php/xp/compiler/CompileRunner.class.php b/src/main/php/xp/compiler/CompileRunner.class.php index e549f651..d311e920 100755 --- a/src/main/php/xp/compiler/CompileRunner.class.php +++ b/src/main/php/xp/compiler/CompileRunner.class.php @@ -65,7 +65,7 @@ private static function emitter(string $name): XPClass { public static function main(array $args) { if (empty($args)) return Usage::main($args); - $target= 'php:'.PHP_VERSION; + $target= 'php:'.PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'.'.PHP_RELEASE_VERSION; $in= $out= '-'; $quiet= false; $augment= []; diff --git a/src/main/php/xp/compiler/Usage.class.php b/src/main/php/xp/compiler/Usage.class.php index 7b3d232c..874ac47f 100755 --- a/src/main/php/xp/compiler/Usage.class.php +++ b/src/main/php/xp/compiler/Usage.class.php @@ -6,7 +6,7 @@ /** @codeCoverageIgnore */ class Usage { - const RUNTIME = 'PHP'; + const RUNTIME = 'php'; /** @return int */ public static function main(array $args) { @@ -20,7 +20,7 @@ public function add($t, $active= false) { } }; - $emitter= Emitter::forRuntime(self::RUNTIME.'.'.PHP_VERSION); + $emitter= Emitter::forRuntime(self::RUNTIME.':'.PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'.'.PHP_RELEASE_VERSION); foreach (Package::forName('lang.ast.emit')->getClasses() as $class) { if ($class->isSubclassOf(Emitter::class) && !(MODIFIER_ABSTRACT & $class->getModifiers())) { $impl->add($class, $class->equals($emitter)); diff --git a/src/test/php/lang/ast/unittest/loader/CompilingClassLoaderTest.class.php b/src/test/php/lang/ast/unittest/loader/CompilingClassLoaderTest.class.php index 1ed682f0..9132a223 100755 --- a/src/test/php/lang/ast/unittest/loader/CompilingClassLoaderTest.class.php +++ b/src/test/php/lang/ast/unittest/loader/CompilingClassLoaderTest.class.php @@ -10,7 +10,7 @@ class CompilingClassLoaderTest { private static $runtime; static function __static() { - self::$runtime= 'php:'.PHP_VERSION; + self::$runtime= 'php:'.PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION.'.'.PHP_RELEASE_VERSION; } /**