Refactor re2c fix-item

This commit is contained in:
crazywhalecc 2025-12-08 12:45:12 +08:00
parent 127c935106
commit a1cadecc54
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -7,6 +7,7 @@ namespace StaticPHP\Doctor\Item;
use StaticPHP\Attribute\Doctor\CheckItem;
use StaticPHP\Attribute\Doctor\FixItem;
use StaticPHP\Doctor\CheckResult;
use StaticPHP\Package\PackageInstaller;
class Re2cVersionCheck
{
@ -29,7 +30,9 @@ class Re2cVersionCheck
#[FixItem('build-re2c')]
public function buildRe2c(): bool
{
// TODO: implement re2c build process
return false;
$installer = new PackageInstaller();
$installer->addInstallPackage('re2c');
$installer->run(false);
return true;
}
}