Download the PHP package alius/config without Composer

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

Build Status

Alius Config

Alius Config is just a simple composer package, all it can do is include php array files.

Never commit any sensitive information into your version control!

Basic usage:

Multiple files, directories

You can include multiple files:

One or more directories (includes the subdirectories and files recursively):

All of the files must use php as extension and they must return array.

Last file wins

If you include two files with the same variable, the last file always wins:

It's a good idea to name your files starting with numbers:

Get the source file of a variable

Including lots of files could be confusing so you can get the source file of a variable:

Required variables

You can mark a variables required, if none of the included files has this variable then an exception will be thrown:

Get the variables in one array

You can get an array with all the variables:

Error thrown, if:

The point is that it should fail fast so you can fix everything before you commit your changes or deploy.

Recommended usage

Never commit any sensitive information into your version control!

You should create a directory for all of your non-sensitive data, and another one for sensitive data (and exclude that one from version control).

For example:

Or you can still use dotenv or similar for sensitive data, for example Laravel’s env function with defaults:

What’s wrong with dotenv?

Nothing, but sometimes it’s just not enough.

With this package you can include files conditionally, override variables, you can use bool, int, float, arrays, constants, Closures, even objects or resources.

Or you can extend it, create your DatabaseConfig class so you can inject it as a dependency.


All versions of config with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
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 alius/config contains the following files

Loading the files please wait ....