PHPackages                             mim/dotenv - 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. mim/dotenv

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

mim/dotenv
==========

Registers environment variables from a .env file

00PHP

Since Apr 29Pushed 5y ago2 watchersCompare

[ Source](https://github.com/MimProject/Dotenv)[ Packagist](https://packagist.org/packages/mim/dotenv)[ RSS](/packages/mim-dotenv/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Dotenv Component
================

[](#dotenv-component)

Mim Dotenv parses `.env` files to make environment variables stored in them accessible via `$_SERVER` or `$_ENV`.

```
$ composer require mim/dotenv

```

```
use Mim\Component\Dotenv\Dotenv;

$dotenv = new Dotenv();
$dotenv->load(__DIR__.'/.env');

// you can also load several files
$dotenv->load(__DIR__.'/.env', __DIR__.'/.env.dev');

// overwrites existing env variables
$dotenv->overload(__DIR__.'/.env');

// loads .env, .env.local, and .env.$APP_ENV.local or .env.$APP_ENV
$dotenv->loadEnv(__DIR__.'/.env');
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![MimProject](https://avatars.githubusercontent.com/u/83394779?v=4)](https://github.com/MimProject "MimProject (2 commits)")

### Embed Badge

![Health badge](/badges/mim-dotenv/health.svg)

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

PHPackages © 2026

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