Download the PHP package kmarques/composer-parameter-handler without Composer

On this page you can find all versions of the php package kmarques/composer-parameter-handler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package composer-parameter-handler

Managing your ignored parameters with Composer

This tool allows you to manage your ignored parameters when running a composer install or update. It works when storing the parameters in a Yaml file under a single top-level key (named parameters by default). Other keys are copied without change.

Build Status Latest Stable Version Latest Unstable Version

Usage

Add the following in your root composer.json file:

The app/config/parameters.yml will then be created or updated by the composer script, to match the structure of the dist file app/config/parameters.yml.dist by asking you the missing parameters.

By default, the dist file is assumed to be in the same place than the parameters file, suffixed by .dist. This can be changed in the configuration:

The script handler will ask you interactively for parameters which are missing in the parameters file, using the value of the dist file as default value. All prompted values are parsed as inline Yaml, to allow you to define true, false, null or numbers easily. If composer is run in a non-interactive mode, the values of the dist file will be used for missing parameters.

Warning: This parameters handler will overwrite any comments or spaces into your parameters.yml file so handle with care. If you want to give format and comments to your parameter's file you should do it on your dist version.

Keeping outdated parameters

Warning: This script removes outdated params from parameters.yml which are not in parameters.yml.dist If you need to keep outdated params you can use keep-outdated param in the configuration:

Using a different top-level key

The script handler looks for a parameters key in your dist file. You can change this by using the parameter-key param in the configuration:

Using environment variables to set the parameters

For your prod environment, using an interactive prompt may not be possible when deploying. In this case, you can rely on environment variables to provide the parameters. This is achieved by providing a map between environment variables and the parameters they should fill:

If an environment variable is set, its value will always replace the value set in the existing parameters file.

As environment variables can only be strings, they are also parsed as inline Yaml values to allows specifying null, false, true or numbers easily.

Renaming parameters

If you are renaming a parameter, the new key will be set according to the usual routine (prompt if possible, use environment variables, use default). To have the parameters handler use the value of an (obsolete) parameter, specify a rename-map:

This will create the new parameters new_param_1 and new_param_2 while using the values from old_param_1 and old_param_2, respectively. It will not remove the old parameters unless you've also removed them from the dist version.

If the old parameter is no longer present (maybe because it has been renamed and removed already), no parameters are overwritten. You don't need to remove obsolete parameters from the rename map once they have been renamed.

Managing multiple ignored files

The parameter handler can manage multiple ignored files. To use this feature, the incenteev-parameters extra should contain a JSON array with multiple configurations inside it instead of a configuration object:


All versions of composer-parameter-handler with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
symfony/yaml Version ~2.3|~3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kmarques/composer-parameter-handler contains the following files

Loading the files please wait ....