mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
move zend extension check into config
This commit is contained in:
parent
ed35b65390
commit
4ce7374ac9
@ -455,7 +455,8 @@
|
|||||||
},
|
},
|
||||||
"opcache": {
|
"opcache": {
|
||||||
"type": "builtin",
|
"type": "builtin",
|
||||||
"arg-type-unix": "custom"
|
"arg-type-unix": "custom",
|
||||||
|
"zend-extension": true
|
||||||
},
|
},
|
||||||
"openssl": {
|
"openssl": {
|
||||||
"notes": true,
|
"notes": true,
|
||||||
@ -952,7 +953,8 @@
|
|||||||
"Darwin": "partial",
|
"Darwin": "partial",
|
||||||
"Linux": "partial"
|
"Linux": "partial"
|
||||||
},
|
},
|
||||||
"notes": true
|
"notes": true,
|
||||||
|
"zend-extension": true
|
||||||
},
|
},
|
||||||
"xhprof": {
|
"xhprof": {
|
||||||
"support": {
|
"support": {
|
||||||
|
|||||||
@ -226,7 +226,7 @@ class Extension
|
|||||||
$ret = '';
|
$ret = '';
|
||||||
foreach ($order as $ext) {
|
foreach ($order as $ext) {
|
||||||
if ($ext instanceof Extension && $ext->isBuildShared()) {
|
if ($ext instanceof Extension && $ext->isBuildShared()) {
|
||||||
if ($ext->isZendExtension()) {
|
if (Config::getExt($ext->getName(), 'zend_extension', false) === true) {
|
||||||
$ret .= " -d \"zend_extension={$ext->getName()}\"";
|
$ret .= " -d \"zend_extension={$ext->getName()}\"";
|
||||||
} else {
|
} else {
|
||||||
$ret .= " -d \"extension={$ext->getName()}\"";
|
$ret .= " -d \"extension={$ext->getName()}\"";
|
||||||
@ -448,11 +448,6 @@ class Extension
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function isZendExtension(): bool
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getLibraryDependencies(bool $recursive = false): array
|
private function getLibraryDependencies(bool $recursive = false): array
|
||||||
{
|
{
|
||||||
$ret = array_filter($this->dependencies, fn ($x) => $x instanceof LibraryBase);
|
$ret = array_filter($this->dependencies, fn ($x) => $x instanceof LibraryBase);
|
||||||
|
|||||||
@ -51,9 +51,4 @@ class opcache extends Extension
|
|||||||
{
|
{
|
||||||
return 'Zend Opcache';
|
return 'Zend Opcache';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function isZendExtension(): bool
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,17 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace SPC\builder\extension;
|
|
||||||
|
|
||||||
use SPC\builder\Extension;
|
|
||||||
use SPC\util\CustomExt;
|
|
||||||
|
|
||||||
#[CustomExt('xdebug')]
|
|
||||||
class xdebug extends Extension
|
|
||||||
{
|
|
||||||
protected function isZendExtension(): bool
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user