修复登陆日志入库错误,升级部分composer依赖项;

临时修复登陆通知邮件不能多发的问题;
This commit is contained in:
2025-07-13 19:37:43 +08:00
parent 037f274ec5
commit 45bc700e8f
93 changed files with 6405 additions and 6804 deletions
+3 -1
View File
@@ -140,9 +140,11 @@ abstract class Command extends BaseCommand
$default = '';
}
$name = $argument->getName();
$pad = \str_pad('', $max - \strlen($name));
$description = \str_replace("\n", "\n".\str_pad('', $max + 2, ' '), $argument->getDescription());
$messages[] = \sprintf(" <info>%-{$max}s</info> %s%s", $argument->getName(), $description, $default);
$messages[] = \sprintf(' <info>%s</info>%s %s%s', $name, $pad, $description, $default);
}
$messages[] = '';
+10 -4
View File
@@ -1023,7 +1023,11 @@ class Configuration
*/
public function setErrorLoggingLevel($errorLoggingLevel)
{
$this->errorLoggingLevel = (\E_ALL | \E_STRICT) & $errorLoggingLevel;
if (\PHP_VERSION_ID < 80400) {
$this->errorLoggingLevel = (\E_ALL | \E_STRICT) & $errorLoggingLevel;
} else {
$this->errorLoggingLevel = \E_ALL & $errorLoggingLevel;
}
}
/**
@@ -1263,9 +1267,11 @@ class Configuration
// let's not use it by default.
//
// See https://github.com/bobthecow/psysh/issues/778
$link = @\readlink($less);
if ($link !== false && \strpos($link, 'busybox') !== false) {
return false;
if (@\is_link($less)) {
$link = @\readlink($less);
if ($link !== false && \strpos($link, 'busybox') !== false) {
return false;
}
}
$this->pager = $less.' -R -F -X';
+4 -4
View File
@@ -37,10 +37,6 @@ class ErrorException extends \ErrorException implements Exception
}
switch ($severity) {
case \E_STRICT:
$type = 'Strict error';
break;
case \E_NOTICE:
case \E_USER_NOTICE:
$type = 'Notice';
@@ -63,6 +59,10 @@ class ErrorException extends \ErrorException implements Exception
break;
default:
if (\PHP_VERSION_ID < 80400 && $severity === \E_STRICT) {
$type = 'Strict error';
break;
}
$type = 'Error';
break;
}
+53 -9
View File
@@ -919,17 +919,58 @@ class Shell extends Application
$input = new ShellInput(\str_replace('\\', '\\\\', \rtrim($input, " \t\n\r\0\x0B;")));
if ($input->hasParameterOption(['--help', '-h'])) {
$helpCommand = $this->get('help');
if (!$helpCommand instanceof Command\HelpCommand) {
throw new RuntimeException('Invalid help command instance');
}
$helpCommand->setCommand($command);
if (!$input->hasParameterOption(['--help', '-h'])) {
try {
return $command->run($input, $this->output);
} catch (\Exception $e) {
if (!self::needsInputHelp($e)) {
throw $e;
}
return $helpCommand->run(new StringInput(''), $this->output);
$this->writeException($e);
$this->output->writeln('--');
if (!$this->config->theme()->compact()) {
$this->output->writeln('');
}
}
}
return $command->run($input, $this->output);
$helpCommand = $this->get('help');
if (!$helpCommand instanceof Command\HelpCommand) {
throw new RuntimeException('Invalid help command instance');
}
$helpCommand->setCommand($command);
return $helpCommand->run(new StringInput(''), $this->output);
}
/**
* Check whether a given input error would benefit from --help.
*
* @return bool
*/
private static function needsInputHelp(\Exception $e): bool
{
if (!($e instanceof \RuntimeException || $e instanceof SymfonyConsoleException)) {
return false;
}
$inputErrors = [
'Not enough arguments',
'option does not accept a value',
'option does not exist',
'option requires a value',
];
$msg = $e->getMessage();
foreach ($inputErrors as $errorMsg) {
if (\strpos($msg, $errorMsg) !== false) {
return true;
}
}
return false;
}
/**
@@ -1261,10 +1302,13 @@ class Shell extends Application
case \E_USER_NOTICE:
case \E_USER_DEPRECATED:
case \E_DEPRECATED:
case \E_STRICT:
return 'warning';
default:
if ((\PHP_VERSION_ID < 80400) && $severity === \E_STRICT) {
return 'warning';
}
return 'error';
}
} else {
+1 -1
View File
@@ -74,7 +74,7 @@ class AutoCompleter
$matches = [];
foreach ($this->matchers as $matcher) {
if ($matcher->hasMatched($tokens)) {
$matches = \array_merge($matcher->getMatches($tokens), $matches);
$matches = \array_merge($matcher->getMatches($tokens, $info), $matches);
}
}