Search code examples
phpmongodbsymfonyapp-configconfiguration-files

Best way to store app settings that are configurable from administrator interface?


In the admin interface of my application, the administrators can change global application settings that effect every user of the application.

But what is the best way to store/read those settings.

  • Is writing a config yaml file from php a solution? (And how about caching?)
  • Is storing it in a database (MongoDB) the best way to go? (Every request a query? Or serialize on login?)
  • Is there a bundle especially for this? (Couldn't find one)

Solution

  • There's CraueConfigBundle that adds a controller and a service giving access to a list of settings. It seems like it's tightly coupled to Doctrine ORM though: https://github.com/craue/CraueConfigBundle