Skip to content

[DependencyInjection] feat(env processor): add doc/help on APP_SECRET env var not found exception #57422

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

94noni
Copy link
Contributor

@94noni 94noni commented Jun 17, 2024

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix inconsisteny that may occur when installing a deployment that needs APP_SECRET env var that now may be undefined
License MIT

Hey, I've followed recently the work on this topic, ref one of my try on related issue

I tend to agree that, just throwing an ex here can be problematic/inappropriate, mostly for newcomers that never have read a thing related to this Symfony .env APP_SECRET

Here is one attempt to fill the comment #56985 (comment)

Friendly ping @javiereguiluz @nicolas-grekas do you have a better wording/phrasing and is it the best place?


For documentation inside the doc repo, I have no idea where to define such message, any idea ?
in the env config part? or in the vault part? elsewhere?
ref symfony/symfony-docs#19916

@carsonbot carsonbot added this to the 7.2 milestone Jun 17, 2024
@94noni 94noni changed the title feat(env processor): add doc/help on env var missing exception feat(env processor): add doc/help on APP_SECRET env var missing exception Jun 17, 2024
@94noni 94noni changed the title feat(env processor): add doc/help on APP_SECRET env var missing exception feat(env processor): add doc/help on APP_SECRET env var not found exception Jun 17, 2024
@carsonbot carsonbot changed the title feat(env processor): add doc/help on APP_SECRET env var not found exception [DependencyInjection] feat(env processor): add doc/help on APP_SECRET env var not found exception Jun 17, 2024
@nicolas-grekas
Copy link
Member

👎 on my side, that's way too specific. I mentioned an approach that could work in symfony/recipes#1314 (comment), but we first need to be sure this needs to be improved. At the moment, the env var is needed only when activating one of the features listed in my comment there. A better place to tell about the feature could be in the documentation of those features.
Note that file_put_contents(".env", [...]) is putting a secret in a committed file. No-go :)

@94noni
Copy link
Contributor Author

94noni commented Jun 17, 2024

thx for stopping here and commenting
indeed .env.local is more appropriate 😬

for the doc part, I tend to agree as well even if now I dont know were to document this specific use case
lets wait other ideas thanks :)

@nicolas-grekas
Copy link
Member

Closing as this approach is not the one we'll want to merge.
Thanks fur submitting.

@94noni 94noni deleted the env-app-secret branch June 21, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants