Merge branch 'crazywhalecc:refactor' into refactor

This commit is contained in:
javalaw 2023-05-17 15:40:13 +08:00 committed by GitHub
commit 0b3aefaefe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace SPC\builder\extension;
use SPC\builder\Extension;
use SPC\util\CustomExt;
#[CustomExt('opcache')]
class opcache extends Extension
{
public function getDistName(): string
{
return 'Zend Opcache';
}
}

View File

@ -72,7 +72,7 @@ trait UnixBuilderTrait
}
foreach ($this->exts as $ext) {
logger()->debug('testing ext: ' . $ext->getName());
[$ret] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php --ri ' . $ext->getDistName(), false);
[$ret] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php --ri "' . $ext->getDistName() . '"', false);
if ($ret !== 0) {
throw new RuntimeException('extension ' . $ext->getName() . ' failed compile check');
}