-
-
Notifications
You must be signed in to change notification settings - Fork 395
Expand file tree
/
Copy pathxdebug.php
More file actions
24 lines (20 loc) · 657 Bytes
/
Copy pathxdebug.php
File metadata and controls
24 lines (20 loc) · 657 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
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
{
[$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.');
}
}
}