From c9cd29a9a4d7ab1fec29f47bf0b46a753792d792 Mon Sep 17 00:00:00 2001 From: Robin Chalas Date: Tue, 15 Dec 2020 22:27:19 +0100 Subject: [PATCH] Fix undefined variable --- Services/JWSProvider/LcobucciJWSProvider.php | 2 +- Tests/DependencyInjection/AutowiringTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Services/JWSProvider/LcobucciJWSProvider.php b/Services/JWSProvider/LcobucciJWSProvider.php index a0a64cc5..33cb1674 100644 --- a/Services/JWSProvider/LcobucciJWSProvider.php +++ b/Services/JWSProvider/LcobucciJWSProvider.php @@ -216,7 +216,7 @@ private function getSignedToken(Builder $jws) if (class_exists(InMemory::class)) { $key = InMemory::plainText($this->keyLoader->loadKey(RawKeyLoader::TYPE_PRIVATE), $this->signer instanceof Hmac ? '' : $this->keyLoader->getPassphrase()); } else { - new Key($this->keyLoader->loadKey(RawKeyLoader::TYPE_PRIVATE), $this->signer instanceof Hmac ? '' : $this->keyLoader->getPassphrase()); + $key = new Key($this->keyLoader->loadKey(RawKeyLoader::TYPE_PRIVATE), $this->signer instanceof Hmac ? '' : $this->keyLoader->getPassphrase()); } if ($this->legacyJWTApi) { diff --git a/Tests/DependencyInjection/AutowiringTest.php b/Tests/DependencyInjection/AutowiringTest.php index 18639bba..cf3bc9f5 100644 --- a/Tests/DependencyInjection/AutowiringTest.php +++ b/Tests/DependencyInjection/AutowiringTest.php @@ -91,6 +91,7 @@ private static function createContainerBuilder(array $configs = []) 'kernel.charset' => 'utf8', 'kernel.runtime_environment' => 'test', 'env(base64:default::SYMFONY_DECRYPTION_SECRET)' => 'dummy', + 'kernel.build_dir' => __DIR__, ])); $container->registerExtension(new SecurityExtension());