PHPackages                             frdl/environment - 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. frdl/environment

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

frdl/environment
================

Simple PHP environment manager.

v1.4.3.2(5y ago)258MITPHP

Since Dec 4Pushed 5y agoCompare

[ Source](https://github.com/frdl/environment)[ Packagist](https://packagist.org/packages/frdl/environment)[ RSS](/packages/frdl-environment/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (4)Dependencies (1)Versions (8)Used By (0)

Environment
===========

[](#environment)

This is a environment library for quick environment setup. [Forked from ahirarge/environment](https://github.com/ahirarge/environment)

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

[](#installation)

To install through composer, simply put the following in your `composer.json` file:

```
{
    "require": {
        "frdl/environment": "*",
    }
}
```

Usage
-----

[](#usage)

`index.php`

```
$environment = new Frdlweb\Environment\Environment;
$environment->path('/')
            ->detectEnvironment([
                'local' =>[
                    'required' => true,
                    'hosts' => ['your-machine-name']
                ]
            ]);
```

`index.php`

```
$environment = new Frdlweb\Environment\Environment;
$environment->dir('/home/')
            ->detectEnvironment([
                'local' =>[
                    'required' => false,
                    'hosts' => ['your-machine-name']
                ]
            ]);
```

> You can check your machine name with `hostname` command.

`.env.local.php`

```
return [

        'secret-password' => 'secret-password-value'

    ];
```

`.env.local.json`

```
{
    "environment": "development"
}
```

```
$secret = getenv('secret-password');
```

Facades
-------

[](#facades)

If you wish, you can use environment library with facade connector. Please visit for guideline. [ahir/facades](https://github.com/ahirarge/facades)

License
-------

[](#license)

MIT

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 67.9% 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 ~341 days

Recently: every ~475 days

Total

7

Last Release

2136d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/831c50002c08bb751b698844c98cd6b36897678268b47f1f872a30f4e192ac22?d=identicon)[webfan](/maintainers/webfan)

---

Top Contributors

[![wehowski](https://avatars.githubusercontent.com/u/2658030?v=4)](https://github.com/wehowski "wehowski (19 commits)")[![ozziest](https://avatars.githubusercontent.com/u/2325140?v=4)](https://github.com/ozziest "ozziest (9 commits)")

---

Tags

phpconfigenvironment

### Embed Badge

![Health badge](/badges/frdl-environment/health.svg)

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

PHPackages © 2026

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