dgfip-si1/application

Provides a container to command line applications.


README

Latest Stable Version Latest Unstable Version Packagist PHP Version Packagist Downloads

PHPCS   PHPStan   Tests status   Infection  

Injecting configuration data

default configuration : ./config.yml

if it does not exists, no configuration data - but default values may be generated by schema.

Option --config : replace default configuration file

Option --ad-config : adds a configuration file. (multiple values allowed)

Finding configuration files :

by populating values in dgfip-si1/Application internal configuration. .application-config.yml :

dgfip-si1: 
  configuration:
    root_dir : /path/to/config    # default to application root dir
    path_patterns:                # default : []
      - [Cc]onfiguration
      - config-data
    name_patterns:                # default : ['config.yml']
      - '*.yml'
    sort_by_name:                 # default : false 
                                  # true: sort by filename instead of by full path
    recurse:                      # default false (true = recurse sub directories)

Programaticaly

by using $app->config() methods add-file(), add-array(), findConfigFiles() or set() see dgfip-si1/config-helper