Skip to content

Commit

Permalink
Raise hard deprecation error
Browse files Browse the repository at this point in the history
  • Loading branch information
juniwalk committed Apr 12, 2024
1 parent 18750ae commit 08191d9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/Console/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ protected function interact(InputInterface $input, OutputInterface $output): voi
}


protected function uninitialize(InputInterface $input, OutputInterface $output, Throwable $error = null): void
{
}
protected function uninitialize(InputInterface $input, OutputInterface $output, Throwable $error = null): void { }


/**
Expand Down Expand Up @@ -142,9 +140,7 @@ protected function createProcess(string $command, int $timeout = null): Process
protected function execShell(string ...$command): int
{
$process = $this->createProcess(implode(' ', $command));
return $process->run(function($type, $buffer) {
$this->output->write($buffer);
});
return $process->run(fn($type, $buffer) => $this->output->write($buffer));
}


Expand Down Expand Up @@ -193,15 +189,15 @@ protected function selectMultiple(string $message, array $choices, mixed $defaul
/** @deprecated */
protected function choose(string $message, array $choices, mixed $default = null): mixed
{
// trigger_error('Choose is deprecated, use Select instead', E_USER_DEPRECATED);
trigger_error('Method "choose" is deprecated, use "select" instead', E_USER_DEPRECATED);
return $this->select($message, $choices, $default);
}


/** @deprecated */
protected function chooseMultiple(string $message, array $choices, mixed $default = null): array
{
// trigger_error('ChooseMultiple is deprecated, use SelectMultiple instead', E_USER_DEPRECATED);
trigger_error('Method "chooseMultiple" is deprecated, use "selectMultiple" instead', E_USER_DEPRECATED);
return $this->selectMultiple($message, $choices, $default);
}

Expand Down

0 comments on commit 08191d9

Please sign in to comment.