Download the PHP package selfphp/env-schema without Composer
On this page you can find all versions of the php package selfphp/env-schema. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download selfphp/env-schema
More information about selfphp/env-schema
Files in selfphp/env-schema
Download selfphp/env-schema
More information about selfphp/env-schema
Files in selfphp/env-schema
Vendor selfphp
Package env-schema
Short Description Validate .env environment variables in PHP using a declarative schema.
License MIT
Package env-schema
Short Description Validate .env environment variables in PHP using a declarative schema.
License MIT
Please rate this library. Is it a good library?
Informations about the package env-schema
env-schema
env-schema is a lightweight PHP library for validating .env files using a declarative schema.
โ Features
- Validate environment variables at runtime
- Supports types:
string,int,bool,float - Optional fields with
default - Required fields with
required - Allowed values (
allowed) and regex (pattern) checks - Fully tested (PHPUnit 12)
- No dependencies
๐ฆ Installation
๐งช Usage
.env
schema.php
๐ Example Files
.envโ runtime environment.env.exampleโ template for others.gitignoreโ excludes secrets
๐ License
MIT License ยฉ2025 SELFPHP - Damir Enseleit
๐ฅ๏ธ Run CLI Example
You can quickly test your .env file and schema using the provided example script:
This script:
- Loads a predefined schema
- Parses your
.envfile - Outputs all validated values or detailed error messages
Example Output
If validation fails, you'll see helpful errors like:
โน๏ธ Make sure to install dependencies first via
composer install.
All versions of env-schema with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
The package selfphp/env-schema contains the following files
Loading the files please wait ...