mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 08:15:39 +08:00
remove runSharedExtensionCheckUnix
This commit is contained in:
@@ -24,17 +24,6 @@ class opcache extends Extension
|
||||
}
|
||||
}
|
||||
|
||||
public function runSharedExtensionCheckUnix(): void
|
||||
{
|
||||
[$ret, $out] = shell()->execWithResult(BUILD_BIN_PATH . '/php -n -d "zend_extension=' . BUILD_MODULES_PATH . '/opcache.so" -v');
|
||||
if ($ret !== 0) {
|
||||
throw new RuntimeException('opcache.so failed to load.');
|
||||
}
|
||||
if (!str_contains(join($out), 'with Zend OPcache')) {
|
||||
throw new RuntimeException('opcache.so failed to load.');
|
||||
}
|
||||
}
|
||||
|
||||
public function patchBeforeBuildconf(): bool
|
||||
{
|
||||
if (file_exists(SOURCE_PATH . '/php-src/.opcache_patched')) {
|
||||
@@ -62,4 +51,9 @@ class opcache extends Extension
|
||||
{
|
||||
return 'Zend Opcache';
|
||||
}
|
||||
|
||||
protected function isZendExtension(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,10 +29,5 @@ class pdo_sqlsrv extends Extension
|
||||
->execWithEnv('make clean')
|
||||
->execWithEnv('make -j' . $this->builder->concurrency)
|
||||
->execWithEnv('make install');
|
||||
|
||||
// check shared extension with php-cli
|
||||
if (file_exists(BUILD_BIN_PATH . '/php')) {
|
||||
$this->runSharedExtensionCheckUnix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,10 +60,5 @@ class sqlsrv extends Extension
|
||||
->execWithEnv('make clean')
|
||||
->execWithEnv('make -j' . $this->builder->concurrency)
|
||||
->execWithEnv('make install');
|
||||
|
||||
// check shared extension with php-cli
|
||||
if (file_exists(BUILD_BIN_PATH . '/php')) {
|
||||
$this->runSharedExtensionCheckUnix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,20 +5,13 @@ declare(strict_types=1);
|
||||
namespace SPC\builder\extension;
|
||||
|
||||
use SPC\builder\Extension;
|
||||
use SPC\exception\RuntimeException;
|
||||
use SPC\util\CustomExt;
|
||||
|
||||
#[CustomExt('xdebug')]
|
||||
class xdebug extends Extension
|
||||
{
|
||||
public function runSharedExtensionCheckUnix(): void
|
||||
protected function isZendExtension(): bool
|
||||
{
|
||||
[$ret, $out] = shell()->execWithResult(BUILD_BIN_PATH . '/php -n -d "zend_extension=' . BUILD_MODULES_PATH . '/xdebug.so" -v');
|
||||
if ($ret !== 0) {
|
||||
throw new RuntimeException('xdebug.so failed to load.');
|
||||
}
|
||||
if (!str_contains(join($out), 'with Xdebug')) {
|
||||
throw new RuntimeException('xdebug.so failed to load.');
|
||||
}
|
||||
return str_contains($this->builder->getExt('zend')->getName(), 'xdebug');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,10 +56,5 @@ class xhprof extends Extension
|
||||
->execWithEnv('make clean')
|
||||
->execWithEnv('make -j' . $this->builder->concurrency)
|
||||
->execWithEnv('make install');
|
||||
|
||||
// check shared extension with php-cli
|
||||
if (file_exists(BUILD_BIN_PATH . '/php')) {
|
||||
$this->runSharedExtensionCheckUnix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user