8000 bug #43627 [Framework][Secrets] Fix service definition when local vau… · symfony/symfony@68537b2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 68537b2

Browse files
committed
bug #43627 [Framework][Secrets] Fix service definition when local vault is disabled (GromNaN)
This PR was merged into the 5.3 branch. Discussion ---------- [Framework][Secrets] Fix service definition when local vault is disabled | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Local vault can be disabled with the following configuration: ``` framework: secrets: local_dotenv_file: ~ ``` This removes the service `secrets.local_vault` ([code](https://github.com/symfony/symfony/blob/5.3/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L1669)). The `secrets:...` commands support this by having `$localVault` argument nullable. When configuration was moved from XML to PHP in #37216, the attribute `on-invalid="ignore"` of some services was left. Commits ------- 0e11f5a Fix commands when local vault is disabled
2 parents 97c32a1 + 0e11f5a commit 68537b2

File tree

1 file changed

+2
-2
lines changed
  • src/Symfony/Bundle/FrameworkBundle/Resources/config

1 file changed

+2
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/console.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@
298298
->set('console.command.secrets_list', SecretsListCommand::class)
299299
->args([
300300
service('secrets.vault'),
301-
service('secrets.local_vault'),
301+
service('secrets.local_vault')->ignoreOnInvalid(),
302302
])
303303
->tag('console.command')
304304

@@ -312,7 +312,7 @@
312312
->set('console.command.secrets_encrypt_from_local', SecretsEncryptFromLocalCommand::class)
313313
->args([
314314
service('secrets.vault'),
315-
service('secrets.local_vault'),
315+
service('secrets.local_vault')->ignoreOnInvalid(),
316316
])
317317
->tag('console.command')
318318
;

0 commit comments

Comments
 (0)
0