mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
Refactor package stage handling and update class structures for improved flexibility
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Package\Extension;
|
||||
|
||||
use Package\Target\php;
|
||||
use StaticPHP\Attribute\Package\AfterStage;
|
||||
use StaticPHP\Attribute\Package\BeforeStage;
|
||||
use StaticPHP\Attribute\Package\Extension;
|
||||
@@ -15,7 +16,7 @@ use StaticPHP\Util\SourcePatcher;
|
||||
#[Extension('readline')]
|
||||
class readline
|
||||
{
|
||||
#[BeforeStage('php', 'unix-make-cli', 'ext-readline')]
|
||||
#[BeforeStage('php', [php::class, 'makeCliForUnix'], 'ext-readline')]
|
||||
#[PatchDescription('Fix readline static build with musl')]
|
||||
public function beforeMakeLinuxCli(PackageInstaller $installer, ToolchainInterface $toolchain): void
|
||||
{
|
||||
@@ -25,7 +26,7 @@ class readline
|
||||
}
|
||||
}
|
||||
|
||||
#[AfterStage('php', 'unix-make-cli', 'ext-readline')]
|
||||
#[AfterStage('php', [php::class, 'makeCliForUnix'], 'ext-readline')]
|
||||
public function afterMakeLinuxCli(PackageInstaller $installer, ToolchainInterface $toolchain): void
|
||||
{
|
||||
if ($toolchain->isStatic()) {
|
||||
|
||||
Reference in New Issue
Block a user