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
Over the last years I did see a lot of people run into issue that symfony serve overwrites the DATABASE_URL depending on the things configured in the docker compose file.
I think It would be great to output the overwrites when starting the symfony serve or server:start webserver.
Currently we have the following output where we could also add a Info boxor inside the green box more information:
[WARNING] The local web server is optimized for local development and MUST never be used in a production setup.
[OK] Web server listening
The Web server is using PHP FPM 8.1.31
https://127.0.0.1:8000
https://int3grate.wip
[Info] Docker Integration Environment Variables
DATABASE_URL=....
KAFA_...=....
We already provide the information that the Docker or SymfonyCloud Integration is enabled in the WDT.
But showing this information when starting the server might be more easy for users to catch the info.
I don't believe we should show every variables though because a lot of them would be shown (I currently have 56 variable on a small project...).
But we can show that the integration is enabled with a link to the documentation or a hint that var:export can be used to introspect them.
WDYT?
@tucksaun I understand that showing all is not good and sure not what we should do. Best outcome would be shown only the one which were overwritten by Symfony CLI.
So if its defined in the .env, .env.local, ... (or similar) files and the one Set doesn't match that one it should be shown. Overwrites DATABASE_URL=....
But we can show that the integration is enabled with a link to the documentation or a hint that var:export can be used to introspect them.
I think sadly that nobody really will run that command as for most its unclear that Variables are overwritten.
We would require to make it pretty clear with common examples if we can not do a diff between .env files and docker env variables with something like:
Warning
Docker Integration enabled: Environment variables like DATABASE_URL, ... are overwritten run symfony var:export --multiline to show the new values.
Uh oh!
There was an error while loading. Please reload this page.
Over the last years I did see a lot of people run into issue that
symfony serve
overwrites theDATABASE_URL
depending on the things configured in thedocker compose file
.I think It would be great to output the overwrites when starting the
symfony serve
orserver:start
webserver.Currently we have the following output where we could also add a Info boxor inside the green box more information:
Currently the behaviour is only documented in https://symfony.com/doc/current/setup/symfony_server.html#docker-integration but sure most don't stumble over it and its unclear for endusers why there
.env
or.env.local
ENVs aren't used.The text was updated successfully, but these errors were encountered: