refactor(php): 重构平台检测逻辑的调用位置

- 将 detectPlatform 方法调用从 CompilerBase 移至 Translator 类中
- 删除 CompilerBase 中已注释的 no-literal-strings 参数处理代码
- 优化代码结构以提高平台检测的执行时机
pull/1/head
韩天峰 4 months ago
parent 028a83dcb2
commit 2b97cee9e0
  1. 4
      src/Php/CompilerBase.php
  2. 4
      src/Php/Translator.php

@ -300,10 +300,6 @@ class CompilerBase extends \PhpAot\Core\Translator
$this->setBuildDir($rootPath . '/build');
$climate = new CLImate();
$this->climate = $climate;
// $this->noLiteralStrings = $climate->arguments->get('no-literal-strings');
// 检测操作系统、编译器以及 Windows 平台的 PHP lib 文件
$this->detectPlatform();
}
/**

@ -68,6 +68,10 @@ class Translator extends Preprocessor
$this->showVersion();
exit(0);
}
// 检测操作系统、编译器以及 Windows 平台的 PHP lib 文件
$this->detectPlatform();
}
public function showUsage(): void

Loading…
Cancel
Save