gacela-project / gacela

Build modular PHP applications.

Home Page:http://gacela-project.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve config reading values

Chemaclass opened this issue · comments

Current behavior

Currently, the config values are getting read from the config/*.php files.

Acceptance Criteria

I want to allow the user to define where are their config values stored and in which format file.

Ideas:

  • Create a gacela.json.dist to be able to store interesting information as the config.path
  • Be able to define the path where the config files are stored
  • Read config from .env

Something like this

{ "config": {"type": "env", "path": ".env"}}
{ "config": {"type": "env", "path": "config/.env"}}

Or

{ "config": {"type": "php", "path": "config.php"}}
{ "config": {"type": "php", "path": "config/*.php"}}