2017 © Pedro Peláez
 

yii-extension copyconf

Composer script handling your ignored parameter file

image

gregurco/copyconf

Composer script handling your ignored parameter file

  • Thursday, October 23, 2014
  • by gregurco
  • Repository
  • 2 Watchers
  • 3 Stars
  • 216 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

CopyConf

CopyConf - extension for copying config files., (*1)

Usage

Add the following in your root composer.json file:, (*2)

{
    "require": {
        "gregurco/copyconf": "v1.1"
    },
    "scripts": {
        "post-install-cmd": [
            "Gregurco\\ParameterHandler\\ScriptHandler::buildParameters"
        ],
        "post-update-cmd": [
            "Gregurco\\ParameterHandler\\ScriptHandler::buildParameters"
        ]
    },
    "extra": {
        "copyconf-parameters" : {
            "files": {
                "main_config": "protected/config/config.php"
            }
        }
    }
}

Configuration

List of copyconf parameters: - files - array - array of files, that should be processed - dist_ext - string - extension of files that should be processed (.dist - default) - reg_exp - string - regular expression used in searching of placeholders - backup_mode - string - by default "false" - not backup overwritten files. Can be set value of "ask" or "true" to ask on overwriting files or not overwrite in silent mode. - backup_dir - string - directory where to write backups (backup/ - default), (*3)

Example of placeholders: - {{hostname}} - simple placeholder - {{hostname|localhost}} - placeholder with default value 'localhost', (*4)

Examples

Example of "extra" with backup:, (*5)

{
    ...
    "extra": {
        "copyconf-parameters" : {
            "files": {
                "main_config": "protected/config/config.php"
            },
            "backup_mode": "ask",
            "backup_dir" : "backup/"
        }
    }
}

The Versions

23/10 2014

dev-master

9999999-dev https://github.com/gregurco/copyconf

Composer script handling your ignored parameter file

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

config yii parameters management

22/10 2014

v1.1

1.1.0.0 https://github.com/gregurco/copyconf

Composer script handling your ignored parameter file

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

config yii parameters management

04/10 2014

v1.0

1.0.0.0 https://github.com/gregurco/copyconf

Composer script handling your ignored parameter file

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

config yii parameters management