dep: package update
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ class ConsoleEvent extends Event
|
||||
private $input;
|
||||
private $output;
|
||||
|
||||
public function __construct(Command $command = null, InputInterface $input, OutputInterface $output)
|
||||
public function __construct(?Command $command, InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->command = $command;
|
||||
$this->input = $input;
|
||||
|
||||
+3
-3
@@ -42,7 +42,7 @@ abstract class Helper implements HelperInterface
|
||||
/**
|
||||
* Returns the length of a string, using mb_strwidth if it is available.
|
||||
*
|
||||
* @deprecated since 5.3
|
||||
* @deprecated since Symfony 5.3
|
||||
*
|
||||
* @return int The length of the string
|
||||
*/
|
||||
@@ -154,7 +154,7 @@ abstract class Helper implements HelperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 5.3
|
||||
* @deprecated since Symfony 5.3
|
||||
*/
|
||||
public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, ?string $string)
|
||||
{
|
||||
@@ -170,7 +170,7 @@ abstract class Helper implements HelperInterface
|
||||
// remove <...> formatting
|
||||
$string = $formatter->format($string ?? '');
|
||||
// remove already formatted characters
|
||||
$string = preg_replace("/\033\[[^m]*m/", '', $string);
|
||||
$string = preg_replace("/\033\[[^m]*m/", '', $string ?? '');
|
||||
$formatter->setDecorated($isDecorated);
|
||||
|
||||
return $string;
|
||||
|
||||
+2
-1
@@ -89,8 +89,9 @@ class HelperSet implements \IteratorAggregate
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Helper[]
|
||||
* @return \Traversable<Helper>
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function getIterator()
|
||||
{
|
||||
return new \ArrayIterator($this->helpers);
|
||||
|
||||
+4
-2
@@ -482,8 +482,10 @@ final class ProgressBar
|
||||
}
|
||||
$this->output->clear($lineCount);
|
||||
} else {
|
||||
if ($this->formatLineCount > 0) {
|
||||
$this->cursor->moveUp($this->formatLineCount);
|
||||
for ($i = 0; $i < $this->formatLineCount; ++$i) {
|
||||
$this->cursor->moveToColumn(1);
|
||||
$this->cursor->clearLine();
|
||||
$this->cursor->moveUp();
|
||||
}
|
||||
|
||||
$this->cursor->moveToColumn(1);
|
||||
|
||||
+1
-1
@@ -205,7 +205,7 @@ class QuestionHelper extends Helper
|
||||
{
|
||||
$messages = [];
|
||||
|
||||
$maxWidth = max(array_map('self::width', array_keys($choices = $question->getChoices())));
|
||||
$maxWidth = max(array_map([__CLASS__, 'width'], array_keys($choices = $question->getChoices())));
|
||||
|
||||
foreach ($choices as $key => $value) {
|
||||
$padding = str_repeat(' ', $maxWidth - self::width($key));
|
||||
|
||||
Reference in New Issue
Block a user