🔧
This commit is contained in:
12
vendor/symfony/console/Application.php
vendored
12
vendor/symfony/console/Application.php
vendored
@@ -143,7 +143,7 @@ class Application implements ResetInterface
|
||||
*
|
||||
* @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}.
|
||||
*/
|
||||
public function run(InputInterface $input = null, OutputInterface $output = null): int
|
||||
public function run(?InputInterface $input = null, ?OutputInterface $output = null): int
|
||||
{
|
||||
if (\function_exists('putenv')) {
|
||||
@putenv('LINES='.$this->terminal->getHeight());
|
||||
@@ -169,9 +169,9 @@ class Application implements ResetInterface
|
||||
}
|
||||
}
|
||||
|
||||
$this->configureIO($input, $output);
|
||||
|
||||
try {
|
||||
$this->configureIO($input, $output);
|
||||
|
||||
$exitCode = $this->doRun($input, $output);
|
||||
} catch (\Throwable $e) {
|
||||
if ($e instanceof \Exception && !$this->catchExceptions) {
|
||||
@@ -795,7 +795,7 @@ class Application implements ResetInterface
|
||||
*
|
||||
* @return Command[]
|
||||
*/
|
||||
public function all(string $namespace = null)
|
||||
public function all(?string $namespace = null)
|
||||
{
|
||||
$this->init();
|
||||
|
||||
@@ -875,7 +875,7 @@ class Application implements ResetInterface
|
||||
}
|
||||
|
||||
if (str_contains($message, "@anonymous\0")) {
|
||||
$message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $message);
|
||||
$message = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)?[0-9a-fA-F]++/', fn ($m) => class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0], $message);
|
||||
}
|
||||
|
||||
$width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : \PHP_INT_MAX;
|
||||
@@ -1177,7 +1177,7 @@ class Application implements ResetInterface
|
||||
*
|
||||
* This method is not part of public API and should not be used directly.
|
||||
*/
|
||||
public function extractNamespace(string $name, int $limit = null): string
|
||||
public function extractNamespace(string $name, ?int $limit = null): string
|
||||
{
|
||||
$parts = explode(':', $name, -1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user