PHPackages                             guenbakku/cakeenv - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. guenbakku/cakeenv

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

guenbakku/cakeenv
=================

Environment switch plugin for CakePHP

0.1.3(6y ago)016.6k[1 issues](https://github.com/guenbakku/cakeenv/issues)MITPHPPHP &gt;=7.0CI failing

Since Jun 25Pushed 6y ago1 watchersCompare

[ Source](https://github.com/guenbakku/cakeenv)[ Packagist](https://packagist.org/packages/guenbakku/cakeenv)[ RSS](/packages/guenbakku-cakeenv/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Cakeenv
=======

[](#cakeenv)

Installation
------------

[](#installation)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer require guenbakku/cakeenv

```

Usage
-----

[](#usage)

### 1/ Load plugin into CakePHP

[](#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`

[](#2-create-directory-for-containing-each-environments-appphp)

> 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

[](#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
-----------

[](#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
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~229 days

Total

5

Last Release

2323d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c39d9138d3c4fbd30f8f6a5ccd0f077c0b2a616968c316f55a21f177f4e9ad70?d=identicon)[guenbakku](/maintainers/guenbakku)

---

Top Contributors

[![guenbakku](https://avatars.githubusercontent.com/u/15353516?v=4)](https://github.com/guenbakku "guenbakku (23 commits)")

---

Tags

cakephp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/guenbakku-cakeenv/health.svg)

```
[![Health](https://phpackages.com/badges/guenbakku-cakeenv/health.svg)](https://phpackages.com/packages/guenbakku-cakeenv)
```

###  Alternatives

[markstory/asset_compress

An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.

3761.0M11](/packages/markstory-asset-compress)[cakedc/cakephp-phpstan

CakePHP plugin extension for PHPStan.

40676.6k31](/packages/cakedc-cakephp-phpstan)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

2988.9k3](/packages/dereuromark-cakephp-dto)[dereuromark/cakephp-geo

A CakePHP plugin around geocoding tools and helpers.

51174.9k4](/packages/dereuromark-cakephp-geo)[cakedc/enum

Enumeration list Plugin for CakePHP 5

30222.5k2](/packages/cakedc-enum)[josegonzalez/cakephp-environments

CakePHP plugin to handle environments-level configuration

4785.9k](/packages/josegonzalez-cakephp-environments)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
