Download the PHP package jimchen/composer-config-plugin without Composer

On this page you can find all versions of the php package jimchen/composer-config-plugin. 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-config-plugin

Composer Config Plugin


Composer plugin for config assembling. Fork from https://github.com/hiqdev/composer-config-plugin

Latest Stable Version Build Status Scrutinizer Code Coverage Scrutinizer Code Quality

This Composer plugin provides assembling of configurations distributed with composer packages. It allows putting configuration needed to use a package right inside of the package thus implementing a plugin system. The package becomes a plugin holding both the code and its configuration.

How it works?

Read more about the general idea behind this plugin in English or Russian.

Requirement

Notice: If your php version is larger than or equal to 7.0, please use hiqdev/composer-config-plugin instead.

Installation

Out of the box this plugin supports configs in PHP and JSON formats.

To enable additional formats require:

Usage

List your config files in composer.json like the following:

? marks optional files. Absence of files not marked with it will cause exception.

$common is inclusion - common config will be merged into web.

Define your configs like the following:

To load assembled configs in your application use require:

Refreshing config

Plugin uses composer POST_AUTOLOAD_DUMP event i.e. composer runs this plugin on install, update and dump-autoload commands. As the result configs are ready to be used right after package installation or update.

When you make changes to any of configs you may want to reassemble configs manually. In order to do it run:

Above can be shortened to composer du.

If you need to force config rebuildign from your application, you can do it like the following:

File processing order

Config files are processed in proper order to achieve naturally expected behavior:

Debugging

There are several ways to debug config building internals.

Above can be shortened to composer du -v.

Known issues

This plugin treats configs as simple PHP arrays. No specific structure or semantics are expected and handled. It is simple and straightforward, but I'm in doubt... What about errors and typos? I think about adding config validation rules provided together with plugins. Will it solve all the problems?

Anonymous functions must be used in multiline form only:

License

This project is released under the terms of the BSD-3-Clause license. Read more here.

Copyright © 2016-2018, Jim Chen


All versions of composer-config-plugin with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
composer-plugin-api Version ^1.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 jimchen/composer-config-plugin contains the following files

Loading the files please wait ....