Skip to content

Commit 0529352

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: Avoid stale-if-error if kernel.debug = true, because it hides errors [Console] Fix SymfonyQuestionHelper tests sometimes failing on AppVeyor [SecurityBundle] Fix collecting traceable listeners info using anonymous: lazy [Filesystem][FilesystemCommonTrait] Use a dedicated directory when there are no namespace [Workflow] Fix configuration node reference for "initial_marking" expand listener in place [DI] deferred exceptions in ResolveParameterPlaceHoldersPass Do not throw exception on valut generate key
2 parents 3d57e8d + d6d905b commit 0529352

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

HttpCache/HttpCache.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ public function __construct(KernelInterface $kernel, string $cacheDir = null)
3636
$this->kernel = $kernel;
3737
$this->cacheDir = $cacheDir;
3838

39-
parent::__construct($kernel, $this->createStore(), $this->createSurrogate(), array_merge(['debug' => $kernel->isDebug()], $this->getOptions()));
39+
$isDebug = $kernel->isDebug();
40+
$options = ['debug' => $isDebug];
41+
42+
if ($isDebug) {
43+
$options['stale_if_error'] = 0;
44+
}
45+
46+
parent::__construct($kernel, $this->createStore(), $this->createSurrogate(), array_merge($options, $this->getOptions()));
4047
}
4148

4249
/**

Secrets/SodiumVault.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public function generateKeys(bool $override = false): bool
4747
$this->lastMessage = null;
4848

4949
if (null === $this->encryptionKey && '' !== $this->decryptionKey = (string) $this->decryptionKey) {
50-
throw new \LogicException('Cannot generate keys when a decryption key has been provided while instantiating the vault.');
50+
$this->lastMessage = 'Cannot generate keys when a decryption key has been provided while instantiating the vault.';
51+
52+
return false;
5153
}
5254

5355
try {

0 commit comments

Comments
 (0)