2025-03-23 15:35:25 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC\builder\extension;
|
|
|
|
|
|
|
|
|
|
use SPC\builder\Extension;
|
2025-03-24 23:50:12 +08:00
|
|
|
use SPC\exception\RuntimeException;
|
|
|
|
|
use SPC\util\CustomExt;
|
2025-03-23 15:35:25 +07:00
|
|
|
|
2025-03-24 23:50:12 +08:00
|
|
|
#[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) {
|
2025-03-27 11:12:19 +07:00
|
|
|
throw new RuntimeException('xdebug.so failed to load.');
|
2025-03-24 23:50:12 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|