Download the PHP package guenbakku/cakeenv without Composer
On this page you can find all versions of the php package guenbakku/cakeenv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download guenbakku/cakeenv
More information about guenbakku/cakeenv
Files in guenbakku/cakeenv
Download guenbakku/cakeenv
More information about guenbakku/cakeenv
Files in guenbakku/cakeenv
Vendor guenbakku
Package cakeenv
Short Description Environment switch plugin for CakePHP
License MIT
Package cakeenv
Short Description Environment switch plugin for CakePHP
License MIT
Please rate this library. Is it a good library?
Informations about the package cakeenv
Cakeenv
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
Usage
1/ Load plugin into CakePHP
Open and modify file config/bootstrap.php
like following:
Before:
try {
Configure::config('default', new PhpConfig());
Configure::load('app', 'default', false);
} catch (\Exception $e) {
exit($e->getMessage() . "\n");
}
After:
try {
Configure::config('default', new PhpConfig());
Plugin::load('Guenbakku/Cakeenv', ['bootstrap' => false, 'routes' => false]);
Guenbakku\Cakeenv\Environment::load('app', 'default', false);
} catch (\Exception $e) {
exit($e->getMessage() . "\n");
}
2/ Create directory for containing each environment's app.php
Note:
Name of each environment directory can be set to anything you want.
config
|--- environments
|--- development
|--- app.php
|--- production
|--- app.php
|--- stagging
|--- app.php
|--- env
3/ Switch to environment you want
Open file config/environments/env
, set environment name you want in the first line and save it. That's all.
Example:
development
Development
Note:
Following is the memo for developing this plugin. End-user can skip this section.
# 1. Build docker image for developing (first time only)
$ docker-compose build
# 2. Composer installing (first time only)
$ docker-compose run --rm php composer install
# 3. Execute phpunit
$ docker-compose run --rm php vendor/bin/phpunit
All versions of cakeenv with dependencies
PHP Build Version
Package Version
The package guenbakku/cakeenv contains the following files
Loading the files please wait ....