Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.
/ tier Public archive

Simple class to handle application tier definitions

License

Notifications You must be signed in to change notification settings

pachico/tier

Repository files navigation

Pachico\Tier

Travis Scrutinizer Code Quality codecov

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

Via Composer

$ composer require pachico/tier

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

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

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

License

The MIT License (MIT). Please see License File for more information.