You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
note: The reason is a ParameterCircularReferenceException in envLoader when the first Env Variable tried to be loaded is default::SYMFONY_DECRYPTION_SECRET
call to getenv('default::SYMFONY_DECRYPTION_SECRET')
call to getenv('SYMFONY_DECRYPTION_SECRET')
the env variable does not exists
iterate over loaders
tryied to load SodiumVault envLoader
triggers a ParameterCircularReferenceException (because the loaded requires SYMFONY_DECRYPTION_SECRET)
the iterrator loaders stay in an invalid state
EnvVarProcessor fallback to default null => OK
next variable to be loaded (ie. JWT_PASSPHRASE)
call to getenv('JWT_PASSPHRASE')
the env variable does not exists
iterate over loaders
the iterrator loaders is in an invalid state <= issue
… (jderusse)
This PR was merged into the 4.4 branch.
Discussion
----------
[DI] Fix EnvVar not loaded when Loader requires an env var
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #35348
| License | MIT
| Doc PR | NA
When an EnvVarLoader has a dependency on an Env Var tried to be loaded (which is the case for SodiumVault that is configured with `default::SYMFONY_DECRYPTION_SECRET`) the Loader is not usable.
What happens:
- when trying to resolve `SYMFONY_DECRYPTION_SECRET`, the EnvVarProcessor iterates over loaders
- given SodiumVaultLoaders requires the same env variable `SYMFONY_DECRYPTION_SECRET`, it throws a `ParameterCircularReferenceException`
- letting the $loaders generator invalid
This PR, refactor the way loaders are iterated in order to rewind on failure.
Commits
-------
e119aa6 [DI] Fix EnvVar not loaded when Loader requires an env var
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected: tested with 5.0.2 and 4.4.2
Description
Tried to use secrets to store JWT_PASSPHRASE, but symfony wont pass it to environment variable.
How to reproduce
Additional context

The text was updated successfully, but these errors were encountered: