Multiple Configfiles

Hey there, i am working on different modules in phalcon. For example one "auth" module which has all the autentification logic or a "Grid" module which can create a dynamic CRUD from an entity, and so on

So the goal is that these packages are available over packigst and composer. that everyone can just require one of my packages and can use it with a simple require line.

But now to my problem, eache of the modules has different config files. how to solve this in phalcon?

In my head there is at the moment this solution: 1) every module has a config file "auth.config.dist" 2) the user has to copy this file in his config directory and rename the .dist into .php. 3) i create a Service which reads all files in the config folder and merge it. the result will be saved in the di->config ( and all my models are requiring this config service)

is there maybe a simpler solution or anyone already did something like this? Thank you pat



30.0k

Hi,

is it really problematic that each module has its own config file ?