diff --git a/composer.json b/composer.json index 5504bde1..52eb1eba 100644 --- a/composer.json +++ b/composer.json @@ -56,7 +56,7 @@ "laminas/laminas-mvc-console": "*" }, "require-dev": { - "boundwize/structarmed": "^0.15", + "boundwize/structarmed": "^0.16", "doctrine/dbal": "^3.10.4", "doctrine/doctrine-orm-module": "^6.3.0", "guzzlehttp/promises": "^2.3", diff --git a/rector.php b/rector.php index 3ebba6c1..f306aa1b 100644 --- a/rector.php +++ b/rector.php @@ -3,6 +3,7 @@ declare(strict_types=1); use Rector\Config\RectorConfig; +use Rector\DeadCode\Rector\Property\RemoveDefaultValueFromAssignedPropertyRector; use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector; return RectorConfig::configure() @@ -23,4 +24,7 @@ __DIR__ . '/src/Command/Preview', __DIR__ . '/src/Middleware/Routed/Preview', ArrayToFirstClassCallableRector::class, + RemoveDefaultValueFromAssignedPropertyRector::class => [ + __DIR__ . '/src/Handler/Logging.php', + ], ]); diff --git a/src/Compat/Logger.php b/src/Compat/Logger.php index 31533275..ac898af1 100644 --- a/src/Compat/Logger.php +++ b/src/Compat/Logger.php @@ -465,7 +465,9 @@ public function log($priority, $message, $extra = []): static throw new InvalidArgumentException( '$extra must be an array or implement Traversable' ); - } elseif ($extra instanceof Traversable) { + } + + if ($extra instanceof Traversable) { $extra = ArrayUtils::iteratorToArray($extra); }