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

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

kuteikin/yii1-dotenv
====================

YIi 1 phpdotenv extension

01PHP

Since Jan 28Pushed 3mo agoCompare

[ Source](https://github.com/kuteikin/yii1-dotenv)[ Packagist](https://packagist.org/packages/kuteikin/yii1-dotenv)[ RSS](/packages/kuteikin-yii1-dotenv/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii 1.1 DotEnv
==============

[](#yii-11-dotenv)

[![Latest Stable Version](https://camo.githubusercontent.com/72be1f1aac7ce30ffd376748ca0d333820b0657399cb9b89bee5476e988de807/68747470733a2f2f706f7365722e707567782e6f72672f666f6f64657474652f796969312d646f74656e762f762f737461626c65)](https://packagist.org/packages/foodette/yii1-dotenv)[![License](https://camo.githubusercontent.com/4e966a9ed7f6748d8a931a69383ceea762f330e0d52c8b49e3a739bc277dba6e/68747470733a2f2f706f7365722e707567782e6f72672f666f6f64657474652f796969312d646f74656e762f6c6963656e7365)](https://packagist.org/packages/foodette/yii1-dotenv)

PHP DotEnv for Yii 1.1 Framework.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist foodette/yii1-dotenv "*"

```

or add

```
"foodette/yii1-dotenv": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use the provided `env()` function in your code :

```
[
    'db' => [
        'password' => env('DB_PASS'),
    ],
]

```

The env function will autoload .env file, it uses the following search mechanism :

```
If there is a Yii class the autoloader will try and detect `vendor` or `root` alias, otherwise
up to the project directory to determine dotenv path.

```

Best is to set the `vendor` or `root` alias before calling `env()` function.

```
Yii::setPathOfAlias('root', 'PATH/TO/PROJECT/ROOT');

```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance54

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% 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/688bbf9428f88d0a3ad77486d7fc54d1c883a43e0692dd2b03ac3bda18a3e4d3?d=identicon)[kuteikin](/maintainers/kuteikin)

---

Top Contributors

[![juliencasanova](https://avatars.githubusercontent.com/u/1027644?v=4)](https://github.com/juliencasanova "juliencasanova (8 commits)")[![kuteikin](https://avatars.githubusercontent.com/u/5311259?v=4)](https://github.com/kuteikin "kuteikin (2 commits)")

### Embed Badge

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

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

###  Alternatives

[calendart/office365-adapter

Office365 Adapter for CalendArt

1213.8k](/packages/calendart-office365-adapter)[balbuf/composer-wp

Manage WordPress core, plugins, and themes with composer.

173.6k](/packages/balbuf-composer-wp)

PHPackages © 2026

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