Skip to content

Generate APP_SECRET on create-project #1574

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
Closed

Conversation

rosier
Copy link
Contributor

@rosier rosier commented May 21, 2025

The current demo v2.7.0 doesn't work out-of-the-box anymore for new installs since the value for APP_SECRET was removed from .env (74d38a5).

Running the following commands results in the error: "A non-empty secret is required."

symfony new --demo sfdemo
cd sfdemo
bin/console doctrine:schema:validate

I propose to generate APP_SECRET on composer create-project to improve the UX for new installs.

I opted to create a .env.local file because it works for both the production and the development environment.

Also .env.local is ignored by git by default and prevents contributors from accidentally committing a value for APP_SECRET to this repository.

@javiereguiluz
Copy link
Member

Thanks Jan. This is technically correct and I appreciate the effort to fix this bug. But, as explained in #1577, I think this solution could fail when running Composer with the --no-scripts option. So, I propose to close this PR in favor of the other one. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants