PHPackages                             hrodic/tier - 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. hrodic/tier

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

hrodic/tier
===========

Helper class for application tiers definitions

1.0.0(8y ago)015MITPHPPHP ~5.4|~7.0

Since Jan 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/hrodic/tier)[ Packagist](https://packagist.org/packages/hrodic/tier)[ Docs](https://github.com/pachico/tier)[ RSS](/packages/hrodic-tier/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Pachico\\Tier
=============

[](#pachicotier)

[![Travis](https://camo.githubusercontent.com/0ce1db36f6f00569372e528707b9c6590b693bf31b638c16f525877cc5edd52d/68747470733a2f2f7472617669732d63692e6f72672f7061636869636f2f746965722e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/0ce1db36f6f00569372e528707b9c6590b693bf31b638c16f525877cc5edd52d/68747470733a2f2f7472617669732d63692e6f72672f7061636869636f2f746965722e7376673f6272616e63683d6d6173746572) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/876525979187a06bf7bbf987608f82dec4983c0a47c765a5ab9fbfe28ddee2bd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7061636869636f2f746965722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/pachico/tier/?branch=master) [![codecov](https://camo.githubusercontent.com/b2c84859789e5e4a0cbbe62eb52ba6046e655a9e9a3c32bf02a8c640cf57627d/68747470733a2f2f636f6465636f762e696f2f67682f7061636869636f2f746965722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/pachico/tier)

Tier is a simple class with no dependencies that handles the definition of application tiers. This is to avoid the usage of non standard strings that usually define the tier an application is running in.

This becomes handly when dealing with frameworks and the required tier configuration files.

Install
-------

[](#install)

Via Composer

```
$ composer require pachico/tier
```

Usage
-----

[](#usage)

```
use Pachico\Tier\Tier;
$tier = new Tier(Tier::DEVELOPMENT, [
    Tier::DEVELOPMENT,
    Tier::STAGING,
    Tier::PRODUCTION
    ]
);
echo $tier . PHP_EOL; // development
echo json_encode($tier, JSON_PRETTY_PRINT) . PHP_EOL;
/**
{
    "tier": "development",
    "applicationTiers": [
        "development",
        "staging",
        "production"
    ]
}
*/
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3241d ago

Major Versions

0.1.0 → 1.0.02017-06-24

### Community

Maintainers

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

---

Top Contributors

[![hrodic](https://avatars.githubusercontent.com/u/1694951?v=4)](https://github.com/hrodic "hrodic (1 commits)")

---

Tags

environmenttierpachico

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/hrodic-tier/health.svg)

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

###  Alternatives

[vlucas/phpdotenv

Loads environment variables from `.env` to `getenv()`, `$\_ENV` and `$\_SERVER` automagically.

13.5k602.4M5.4k](/packages/vlucas-phpdotenv)[symfony/dotenv

Registers environment variables from a .env file

3.8k226.7M2.2k](/packages/symfony-dotenv)[foroco/php-browser-detection

Ultra fast PHP library to detect browser, OS, platform and device type by User-Agent parsing

1554.7M7](/packages/foroco-php-browser-detection)[wolfcast/browser-detection

The Wolfcast BrowserDetection PHP class facilitates the identification of the user's environment such as Web browser, version, platform family, platform version or if it's a mobile device or not.

1391.0M7](/packages/wolfcast-browser-detection)[imliam/laravel-env-set-command

Set a .env file variable from the command line

118352.4k10](/packages/imliam-laravel-env-set-command)[silverstripe/environmentcheck

Provides an API for building environment tests

35503.8k13](/packages/silverstripe-environmentcheck)

PHPackages © 2026

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