Skip to content

Commit 2d4ce52

Browse files
authored
Merge pull request #48 from fuzqing/main
修复 BuildPharCommand::$defaultName 未声明导致的 Fatal error
2 parents 709b47b + 66c2783 commit 2d4ce52

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Commands/BuildPharCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
use Symfony\Component\Console\Input\InputInterface;
1010
use Symfony\Component\Console\Output\OutputInterface;
1111

12-
//暂时保留 phar:pack 命令,下一个版本再取消
13-
#[AsCommand('build:phar', 'Can be easily packaged a project into phar files. Easy to distribute and use.', ['phar:pack'])]
12+
#[AsCommand('build:phar', 'Can be easily packaged a project into phar files. Easy to distribute and use.')]
1413
class BuildPharCommand extends Command
1514
{
1615
protected $buildDir = '';
@@ -126,7 +125,7 @@ public function checkEnv(): void
126125
}
127126

128127
if (ini_get('phar.readonly')) {
129-
$command = static::$defaultName;
128+
$command = $this->getName();
130129
throw new RuntimeException(
131130
"The 'phar.readonly' is 'On', build phar must setting it 'Off' or exec with 'php -d phar.readonly=0 ./webman $command'"
132131
);

0 commit comments

Comments
 (0)