PHPackages                             imunhatep/checkenv - 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. imunhatep/checkenv

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

imunhatep/checkenv
==================

General-Purpose Library for PHP

v1.0.3(5y ago)025.6k↓33.9%1GPL-3.0-or-laterPHPPHP &gt;=7.1.0

Since Oct 8Pushed 5y ago1 watchersCompare

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

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

Checks that provided environment contains all variables defined in dotenv file
------------------------------------------------------------------------------

[](#checks-that-provided-environment-contains-all-variables-defined-in-dotenv-file)

Compares application environment variables against `.env` file. It could be useful on `InitContainer` stage to validate cluster settings for PHP application deployment. Based on [Symfony/Console](https://github.com/symfony/console) component,

##### Installation:

[](#installation)

```
composer require imunhatep/checkenv
```

##### Usage example:

[](#usage-example)

```
cd ./bin
ln -s ../vendor/imunhatep/checkenv/bin/check-env
cd ..

./bin/check-env c:c:e --dot-env=".env.dist"
```

**Note**: by default Symfony4 loads `.env` on every application invoke, check your project `config/bootstrap.php`:

Fix for `config/bootstrap.php`, to skip loading `.env` in case `APP_ENV` variable is defined.

```
#...

// Load cached env vars if the .env.local.php file exists
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
if (is_array($env = @include dirname(__DIR__).'/.env.local.php')) {
    foreach ($env as $k => $v) {
        $_ENV[$k] = $_ENV[$k] ?? (isset($_SERVER[$k]) && 0 !== strpos($k, 'HTTP_') ? $_SERVER[$k] : $v);
    }
} elseif (!class_exists(Dotenv::class)) {
    throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
} elseif (getenv('APP_ENV') === false) {
    // load all the .env files
    (new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env');
}

#...
```

Added check: `} elseif (getenv('APP_ENV') === false) {`

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

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

Total

4

Last Release

1972d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/699c96d324c69946967303fd47f2fb3fc2a11589efa7031298539924e57159a8?d=identicon)[Imunhatep](/maintainers/Imunhatep)

---

Top Contributors

[![imunhatep](https://avatars.githubusercontent.com/u/432393?v=4)](https://github.com/imunhatep "imunhatep (5 commits)")

---

Tags

symfonydotenv

### Embed Badge

![Health badge](/badges/imunhatep-checkenv/health.svg)

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

###  Alternatives

[sroze/companienv

Companion for .env files

245418.8k1](/packages/sroze-companienv)[maba/webpack-bundle

Bundle to Integrate Webpack to Symfony

123268.2k4](/packages/maba-webpack-bundle)

PHPackages © 2026

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