Download the PHP package apollo11/env-analyzer without Composer
On this page you can find all versions of the php package apollo11/env-analyzer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download apollo11/env-analyzer
More information about apollo11/env-analyzer
Files in apollo11/env-analyzer
Package env-analyzer
Short Description Analyzes environment files
License
Homepage https://github.com/apolloeleven/env-analyzer
Informations about the package env-analyzer
Env / PHP analyzer
Analyzes env dist file and allows to insert missing variables to env file through the console
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file and run php composer.phar update
command.
The package offers:
- Env class which can store
.env
and.env.dist
file path, as well as, getting the difference between those files. - Php class which can store
env.php
andenv.dist.php
file path, as well as, getting the difference between those files. Note: bothphp
files should return Associative array either strings or integers. - Analyzer class which is used for getting the difference of files through the console
Basic Usage
Generally, the best use case is to call Analyzer from console, because it gives the ability to insert the value of the missing data, as well.
Add the following code to your console command
or add
Usage from Composer
You can also run Analyzer on Composer Scripts
Add the following code to the extra
in project's composer.json
file
You should also call the analyzer method from composer script. In this example, I call it from post-install-cmd
, which is triggered after composer install
is finished. Just add the following code to script in composer.json
file