Skip to content

Commit

Permalink
feature #47445 [FrameworkBundle] Allow secrets vaults to be used dire…
Browse files Browse the repository at this point in the history
…ctly outside Symfony (AndreasA)

This PR was squashed before being merged into the 6.2 branch.

Discussion
----------

[FrameworkBundle] Allow secrets vaults to be used directly outside Symfony

| Q             | A
| ------------- | ---
| Branch?       | 6.2
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

This PR removes the internal tag from the secrets vaults.

This allows developers to use them directly without the need to use Symfony config etc. They still have to install the whole framework bundle but that just means an overhead during download, they are still able to directly instantiate the vault using `new SodiumVault(....)` for instance.

Furthermore, by removing internal from the AbstractVault, it is possible to add a custom vault and specify it replacing the `secrets.vault` service for instance.

See ticket: #44151
and previous PR: #45571

Commits
-------

df953f0 [FrameworkBundle] Allow secrets vaults to be used directly outside Symfony
  • Loading branch information
nicolas-grekas committed Sep 12, 2022
2 parents 01d089f + df953f0 commit 022b58f
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Expand Up @@ -17,6 +17,7 @@ CHANGELOG
tagged with `workflow.workflow`, and those with type=state_machine with
`workflow.state_machine`
* Add `rate_limiter` configuration option to `messenger.transport` to allow rate limited transports using the RateLimiter component
* Remove `@internal` tag from secret vaults to allow them to be used directly outside the framework bundle and custom vaults to be added

6.1
---
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Bundle/FrameworkBundle/Secrets/AbstractVault.php
Expand Up @@ -13,8 +13,6 @@

/**
* @author Nicolas Grekas <p@tchwork.com>
*
* @internal
*/
abstract class AbstractVault
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Bundle/FrameworkBundle/Secrets/DotenvVault.php
Expand Up @@ -13,8 +13,6 @@

/**
* @author Nicolas Grekas <p@tchwork.com>
*
* @internal
*/
class DotenvVault extends AbstractVault
{
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Bundle/FrameworkBundle/Secrets/SodiumVault.php
Expand Up @@ -18,8 +18,6 @@
* @author Tobias Schultze <http://tobion.de>
* @author Jérémy Derussé <jeremy@derusse.com>
* @author Nicolas Grekas <p@tchwork.com>
*
* @internal
*/
class SodiumVault extends AbstractVault implements EnvVarLoaderInterface
{
Expand Down

0 comments on commit 022b58f

Please sign in to comment.