Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Replace var_export with VarExporter to use array short syntax in secrets list files#41795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| "symfony/finder":"^3.4|^4.0|^5.0", | ||
| "symfony/routing":"^4.4.12|^5.1.4" | ||
| "symfony/routing":"^4.4.12|^5.1.4", | ||
| "symfony/var-exporter":"^4.4|^5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
can be removed actually: var-exporter is already a transitive dep via symfony/cache and that won't change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Removed, thanks for the info!
5fbf84a to7f1c762Comparederrabus commentedJun 22, 2021
Thank you@alexandre-daubois. |
I've been using secrets a lot lately. Unfortunately, command exports the
{env}.list.phpwith the "old" array syntax usingarray(), and writingnullin uppercase.This results in tedious situations with PHP CS Fixer (for example) rewriting the whole file to restore the modern syntax, each time we add a secret.
The Sodium vault currently uses
var_export. I suggest using Symfony VarExporter, which does the work just fine. It adds a dependency to the FrameworkBundle, but it is a cleaner way to do it rather than usingthis type of hack IMO.