romanzipp / laravel-env-diff
Create a visual Diff of .env and .env.example files
Fund package maintenance!
romanzipp
Installs: 21 091
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 3
Open Issues: 0
Requires
- php: ^7.2|^8.0
- illuminate/console: ^5.5|^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/support: ^5.5|^6.0|^7.0|^8.0|^9.0|^10.0
- symfony/console: ^4.0|^5.0
- vlucas/phpdotenv: ^4.0|^5.0
- wujunze/php-cli-color: ^2.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- illuminate/testing: ^5.5|^6.0|^7.0|^8.0|^9.0|^10.0
- mockery/mockery: ^1.3.2
- orchestra/testbench: >=3.8
- phpstan/phpstan: ^0.12.99|^1.0
- phpunit/phpunit: ^8.0|^9.0
- romanzipp/php-cs-fixer-config: ^3.0
README
Create a visual Diff of .env and .env.example files
Installation
composer require romanzipp/laravel-env-diff
If you use Laravel 5.5+ you are already done, otherwise continue.
Add Service Provider to your app.php
configuration file:
romanzipp\EnvDiff\Providers\EnvDiffProvider::class,
Configuration
Copy configuration to config folder:
$ php artisan vendor:publish --provider="romanzipp\EnvDiff\Providers\EnvDiffProvider"
return [ /* * Specify all environment files that should be compared. */ 'files' => [ '.env', '.env.example', ], /* * The base path to look for environment files. */ 'path' => base_path(), /* * User colors when printing console output. */ 'use_colors' => true, /* * Hide variables that exist in all .env files. */ 'hide_existing' => true, /* * Show existing env values instead of y/n. */ 'show_values' => false, ];
Usage
$ php artisan env:diff
{files? : Specify environment files, overriding config}
{--values : Display existing environment values}';
Example
$ php artisan env:diff .env,.env.second
$ php artisan env:diff .env,.env.second --values
Testing
./vendor/bin/phpunit