PHPackages                             tourane/codetags - 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. tourane/codetags

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tourane/codetags
================

A simple PHP module for feature toggle.

0.1.2(7y ago)08MITPHPPHP ^5.3.2 || ^7.0

Since Feb 12Pushed 7y ago2 watchersCompare

[ Source](https://github.com/tourane/codetags)[ Packagist](https://packagist.org/packages/tourane/codetags)[ RSS](/packages/tourane-codetags/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

Tourane/Codetags
================

[](#touranecodetags)

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

[](#installation)

Install the latest version with:

```
$ composer require tourane/codetags
```

Basic usage
-----------

[](#basic-usage)

### Requirements

[](#requirements)

- PHP 5.3.2 is required but using the latest version of PHP is highly recommended.

### Default instance

[](#default-instance)

Example source code `examples/default-instance.php`:

```
use Tourane\Codetags\TagManager;

$default = TagManager::instance();

// ...

if ($default->isActive('new-version')) {
  // do somethings
}

if ($default->isActive('mongodb', 'couchdb')) {
  // at least one of 'mongodb' and 'couchdb' is available
}

if ($default->isActive(['foo', 'bar'])) {
  // both 'foo' and 'bar' are available
}
```

### Multiple instances

[](#multiple-instances)

Example source code `examples/multiple-instances.php`:

```
use Tourane\Codetags\TagManager;

$default = TagManager::instance();

$oldFlow = TagManager::getInstance("oldflow");
$newFlow = TagManager::getInstance("current", array(
  "namespace" => "newflow"
));

if ($default->isActive("new-version")) {
  echo sprintf("%s is activated\n", "new-version");
}

if ($default->isActive(["foo", "bar"])) {
  echo sprintf("Both %s are activated\n", implode(",", ["foo", "bar"]));
}

if ($newFlow->isActive("couchdb", "mongodb")) {
  echo sprintf("One of %s is activated\n", implode(",", ["couchdb", "mongodb"]));
}

if ($newFlow->isActive(["couchdb", "mongodb"])) {
  echo sprintf("All of %s are activated\n", implode(",", ["couchdb", "mongodb"]));
}
```

### Setting environment variables

[](#setting-environment-variables)

#### Setting environment variables in php-fpm

[](#setting-environment-variables-in-php-fpm)

Find your `php-fpm` pool config file (usually `/etc/php/7.2/fpm/pool.d/www.conf`, but could be in other place or have a different name - `/etc/php/7.2/fpm/php-fpm.conf` for example).

Find this line and uncomment it (remove the ‘;’):

```
;clear_env = no
```

Add environment variables declaration like this:

```
env[CODETAGS_INCLUDED_TAGS] = 'mongodb,foo,bar'
env[CODETAGS_EXCLUDED_TAGS] = 'couchdb'
```

Restart the `php-fpm` process with:

```
sudo service php7.2-fpm restart
```

License
-------

[](#license)

MIT

See [LICENSE](LICENSE) to see the full text.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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 ~3 days

Total

3

Last Release

2688d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8530525?v=4)[acegik](/maintainers/acegik)[@acegik](https://github.com/acegik)

![](https://avatars.githubusercontent.com/u/15925808?v=4)[Devebot Project](/maintainers/devebot)[@devebot](https://github.com/devebot)

---

Top Contributors

[![pnhung177](https://avatars.githubusercontent.com/u/2126251?v=4)](https://github.com/pnhung177 "pnhung177 (16 commits)")

---

Tags

feature toggletourane

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tourane-codetags/health.svg)

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

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k193.1M3.0k](/packages/composer-composer)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k245.4M24.0k](/packages/friendsofphp-php-cs-fixer)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[symfony/asset-mapper

Maps directories of assets &amp; makes them available in a public directory with versioned filenames.

1668.1M217](/packages/symfony-asset-mapper)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k16.6k1](/packages/phpactor-phpactor)[internal/dload

Downloads binaries.

102187.3k17](/packages/internal-dload)

PHPackages © 2026

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