Skip to content

gaming-engine/dotenv-writer

Repository files navigation

DotEnv Writer

Latest Version on Packagist Total Downloads GitHub Actions

A quick and easy way to modify your .env files programmatically.

Installation

You can install the package via composer:

composer require gaming-engine/dotenv-writer

Usage

use GamingEngine\DotEnv\Writer;

(new Writer())
    ->load(__DIR__.'./.env') // Loads an existing file
    ->setValue('config', 'hello') // Overrides the value
    ->write(__DIR__.'./.env'); // Writes it back out to disk

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email andrew@judd.dev instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

No description or website provided.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages