Skip to content

Commit

Permalink
Hotfix: suppress error about key not exists; suppress psalm errors
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed May 22, 2024
1 parent 6d7e9cf commit fb10b25
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Boot/src/AbstractKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ final public static function create(
$container->bind(BootloadManagerInterface::class, $bootloadManager);

if (!$container->has(BootloaderRegistryInterface::class)) {
/** @psalm-suppress InvalidArgument */
$container->bindSingleton(BootloaderRegistryInterface::class, [self::class, 'initBootloaderRegistry']);
}

Expand Down
1 change: 1 addition & 0 deletions src/Framework/Bootloader/CommandBootloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function init(ConsoleBootloader $console, ContainerInterface $container):
$console->addCommand(Console\Command\ConfigureCommand::class);
$console->addCommand(Console\Command\UpdateCommand::class);

/** @psalm-suppress InvalidArgument */
$console->addConfigureSequence(
[RuntimeDirectory::class, 'ensure'],
'<fg=magenta>[runtime]</fg=magenta> <fg=cyan>verify `runtime` directory access</fg=cyan>'
Expand Down
5 changes: 1 addition & 4 deletions src/Logger/src/LoggerInjector.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ public function createInjection(
*/
private function extractChannelAttribute(\ReflectionParameter $parameter): ?string
{
/** @var \ReflectionAttribute<LoggerChannel>[] $attributes */
$attributes = $parameter->getAttributes(LoggerChannel::class);

return $attributes[0]?->newInstance()->name;
return ($parameter->getAttributes(LoggerChannel::class)[0] ?? null)?->newInstance()->name;
}
}

0 comments on commit fb10b25

Please sign in to comment.