Skip to content

Commit 0a4c499

Browse files
committed
fix: plugin activation error when secrets disabled
1 parent a582ee6 commit 0a4c499

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "frosh/tools",
3-
"version": "2.4.5",
3+
"version": "2.4.6",
44
"description": "Provides some basic things for managing the Shopware Installation",
55
"type": "shopware-platform-plugin",
66
"license": "MIT",

src/Components/Health/Checker/PerformanceChecker/DisableSymfonySecretsChecker.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct(
1616
#[Autowire(param: 'framework.secrets.enabled')]
1717
private readonly bool $secretsEnabled,
1818
#[Autowire(service: 'secrets.vault')]
19-
private readonly AbstractVault $vault,
19+
private readonly ?AbstractVault $vault = null,
2020
#[Autowire(service: 'secrets.local_vault')]
2121
private readonly ?AbstractVault $localVault = null,
2222
) {}
@@ -38,6 +38,10 @@ public function collect(HealthCollection $collection): void
3838

3939
private function areSecretsInUse(): bool
4040
{
41+
if ($this->vault === null) {
42+
return false;
43+
}
44+
4145
return count($this->vault->list()) > 0 || ($this->localVault instanceof AbstractVault && count($this->localVault->list()) > 0);
4246
}
4347
}

0 commit comments

Comments
 (0)