PHPackages                             linkorb/envoi - 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. linkorb/envoi

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

linkorb/envoi
=============

Environment variables on steroids

v1.8.2(3y ago)24.6k22MITPHPPHP ^7.1 || ^8.0

Since Mar 22Pushed 1y ago2 watchersCompare

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

READMEChangelog (10)Dependencies (4)Versions (14)Used By (2)

envoi
=====

[](#envoi)

Envoi aims to ease the use and documentation of environment variables (env vars) in PHP applications.

Envoi features:

- a Yaml schema to describe the env vars that may be used to configure an application
- tools to validate env vars against a schema
- a tool to assist in the population of a `.env` file
- a tool which converts a schema to markdown

Envoi sports a console command which validates a `.env` file against a schema (by convention, `.env.yaml`). It also provides checkers that, when invoked early in the start-up phase of an application, will halt an application which doesn't have a complete and valid set of env vars.

### Install

[](#install)

```
composer require linkorb/envoi
```

### Use

[](#use)

#### Env Checkers

[](#env-checkers)

A checker should be invoked as early as possible in the life-cycle of an application. The ideal time is immediately after the environment has been populated with env vars. For example, in a Symfony-based app, the checker should be invoked right after the Dotenv component has loaded the env vars from the various `.env*` files:

```
