PHPackages                             wearesho-team/yii2-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. wearesho-team/yii2-dotenv

ActiveLibrary

wearesho-team/yii2-dotenv
=========================

Yii2 DotEnv File Support

1.3.5(5y ago)142[1 issues](https://github.com/wearesho-team/yii2-dotenv/issues)[1 PRs](https://github.com/wearesho-team/yii2-dotenv/pulls)MITPHPPHP &gt;=7.4

Since Nov 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/wearesho-team/yii2-dotenv)[ Packagist](https://packagist.org/packages/wearesho-team/yii2-dotenv)[ RSS](/packages/wearesho-team-yii2-dotenv/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (14)Used By (0)

Yii2 DotEnv
===========

[](#yii2-dotenv)

[![Build Status](https://camo.githubusercontent.com/c9f5dd3483e69105e958e0444c957e72ed9ca83d6931b7fbfe0d70f2cf30bd1e/68747470733a2f2f7472617669732d63692e6f72672f776561726573686f2d7465616d2f796969322d646f74656e762e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/wearesho-team/yii2-dotenv)[![codecov](https://camo.githubusercontent.com/da261e1fbe5a14b22cafc355174e4e4da835104c802fe2e86bf1371d866bc236/68747470733a2f2f636f6465636f762e696f2f67682f776561726573686f2d7465616d2f796969322d646f74656e762f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/wearesho-team/yii2-dotenv)

Yii2 Support for loading environment variables from DotEnv files using [vlucas/phpdotenv](https://github.com/vlucas/phpdotenv). Required PHP &gt;=7.4.

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

[](#installation)

```
composer require wearesho-team/yii2-dotenv:^1.2
```

Usage
-----

[](#usage)

This package includes [Bootstrap](./src/Bootsrap.php).
You need to prepend it to application bootstrap list:

```
