Download the PHP package dragon-code/env-sync without Composer
On this page you can find all versions of the php package dragon-code/env-sync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dragon-code/env-sync
More information about dragon-code/env-sync
Files in dragon-code/env-sync
Package env-sync
Short Description Keeping your .env.example is up-to-date
License MIT
Informations about the package env-sync
Environment Synchronization
Installation
If you are using the Laravel framework, then install the dragon-code/env-sync-laravel package instead.
To get the latest version of Environment Synchronization
, simply require the project using Composer:
Or manually update require-dev
block of composer.json
and run composer update
.
How to use
This package scans files with
*.php
,*.json
,*.yml
,*.yaml
and*.twig
extensions in the specified folder, receiving from them calls to theenv
andgetenv
functions. Based on the received values, the package creates a key-value array. When saving, the keys are split into blocks by the first word before the_
character.Also, all keys are sorted alphabetically.
Frameworks
- Laravel / Lumen Frameworks - See the documentation in this repository.
Native using
To call a command in your application, you need to do the following:
If you want to define default values or specify which key values should be stored, you need to pass an array to the constructor of the Config
class:
You can also suggest your implementation by sending a PR. We will be glad 😊
License
This package is licensed under the MIT License.
All versions of env-sync with dependencies
dragon-code/support Version ^6.0
symfony/finder Version ^4.0 || ^5.0 || ^6.0 || ^7.0
vlucas/phpdotenv Version ^4.0 || ^5.0