k-adam / env-editor
.env editor library
Installs: 5 419
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 3
Open Issues: 0
Requires
- php: >=8.0
Requires (Dev)
- phpunit/phpunit: 9.5
This package is auto-updated.
Last update: 2025-03-09 22:21:01 UTC
README
A .env
file editor library for PHP.
Installation
Using Composer:
composer require k-adam/env-editor
Usage example
$envFile = \EnvEditor\EnvFile::loadFrom(__DIR__."/.env.example"); $envFile->setValue("exampleKey", "exampleValue"); $envFile->setValue("LOG_DIR", __DIR__."/logs"); // ... $envFile->saveTo(__DIR__."/.env");