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

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

papi/dotenv
===========

Dotenv Module

00PHP

Since Feb 3Pushed 3mo agoCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

PAPI/Dotenv
===========

[](#papidotenv)

[![](https://camo.githubusercontent.com/322c52e4156d011eede5ed4e37464717373a9fec80eac631d1a703784e1d63ab/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d382e352d6666663f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d666666266c6162656c436f6c6f723d373737424234)](https://camo.githubusercontent.com/322c52e4156d011eede5ed4e37464717373a9fec80eac631d1a703784e1d63ab/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d382e352d6666663f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d666666266c6162656c436f6c6f723d373737424234)[![](https://camo.githubusercontent.com/e63f01afde078f289f0f0c73dc7ec912df6b8176de87f4cf2dfd4642b7d6c760/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d706f7365722d2533453d322d6666663f7374796c653d666c61742d737175617265266c6f676f3d636f6d706f736572266c6f676f436f6c6f723d666666266c6162656c436f6c6f723d383835363330)](https://camo.githubusercontent.com/e63f01afde078f289f0f0c73dc7ec912df6b8176de87f4cf2dfd4642b7d6c760/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d706f7365722d2533453d322d6666663f7374796c653d666c61742d737175617265266c6f676f3d636f6d706f736572266c6f676f436f6c6f723d666666266c6162656c436f6c6f723d383835363330)

#### PACKAGIST | [GITHUB](https://github.com/4uruanna/papi-core)

[](#packagist--github)

Description
-----------

[](#description)

Load environment (`.env`) when building your [PAPI](https://github.com/4uruanna/papi-core). This module uses [gitvlucas/phpdotenv](https://github.com/vlucas/phpdotenv) under the hood.

Configuration
-------------

[](#configuration)

### Constants

[](#constants)

NameRequiredTypeDefaultDescription`DOTENV_PATH`NoString`".env"`Directory where the .env file to load is locatedUsage
-----

[](#usage)

> `DotenvEvent` is called during `BeforeBuild` event. We recommend putting it first to avoid any mistakes.

```
use PAPI\Core\SlimBuilder;
use PAPI\Mod\Dotenv\DotenvEvent;

define("DOTENV_PATH", __DIR__ . DIRECTORY_SEPARATOR . ".env");

$builder = new SlimBuilder();

$builder
    ->addEvent(DotenvEvent::class)
    ->build()
    ->run();
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance54

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity15

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://www.gravatar.com/avatar/22fd4dcec379ce472b56c0f51528fa61ce156e5063756abcce648361770fc839?d=identicon)[4uruanna](/maintainers/4uruanna)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[hashandsalt/kirby3-schema

Kirby 3 - Schema

171.7k1](/packages/hashandsalt-kirby3-schema)

PHPackages © 2026

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