mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 00:35:41 +08:00
Refactor, supports shared extension build now !
This commit is contained in:
@@ -5,7 +5,17 @@ declare(strict_types=1);
|
||||
namespace SPC\builder\extension;
|
||||
|
||||
use SPC\builder\Extension;
|
||||
use SPC\util\DynamicExt;
|
||||
use SPC\exception\RuntimeException;
|
||||
use SPC\util\CustomExt;
|
||||
|
||||
#[DynamicExt]
|
||||
class xdebug extends Extension {}
|
||||
#[CustomExt('xdebug')]
|
||||
class xdebug extends Extension
|
||||
{
|
||||
public function runSharedExtensionCheckUnix(): void
|
||||
{
|
||||
[$ret] = shell()->execWithResult(BUILD_BIN_PATH . '/php -n -d "zend_extension=' . BUILD_LIB_PATH . '/xdebug.so" --ri xdebug');
|
||||
if ($ret !== 0) {
|
||||
throw new RuntimeException('xdebug.so not found');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user