Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Use Symfony's Dotenv so Symfony Server is more convenient #2841
Pull request description
The main disadvantage here was how Fork handles environments and debugging. In Docker, a virtual machine would be booted containing some environment variables:
Using Symfony's Dotenv we can set environment variables for each project or even environment or machine individually.
A perfect example might be something like this: By default, Fork ships in production mode without debugging. If you'd like to run in dev mode with debugging on, simply create a
jeroendesloovere left a comment •
I don't like the way we push env variables into $_SERVER variables.
We should use environment variables in the application (and not server variables)
@jeroendesloovere I've just implemented environment variables in exactly the same way Symfony does, see https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/4.2/config/bootstrap.php
The code I added to autoload.php is basically the same.
Also, here's an excerpt from https://symfony.com/doc/current/components/dotenv.html:
@StijnVrolijk could you update the docs as well? https://docs.fork-cms.com/documentation/detail/installation/docker#phpstorm-configuration