Should the configs for a PHP app be placed in OS environment or configuration files? [closed]

Different PHP frameworks handle the configurations in different ways. Laravel for example has a .env file whereas Symfony has a file per environment. Both, however, are capable of loading the config from the OS environment variables.

In a multi-environment, CI/CD, what is the best place to put the configs? In the OS environment via the pipeline or create files and let the framework load them based on an env flag (staging, production, etc)?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *