PHP Classes
elePHPant
Icontem

Laravel Env Testing: Check if variables in a .env file are outdated

Recommend this page to a friend!
  Info   View files Documentation   View files View files (15)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-01-08 (13 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 18 This week: 2All time: 9,464 This week: 197Up
Version License PHP version Categories
envchecker 1.0MIT/X Consortium ...5PHP 5, Files and Folders, Libraries
Description Author

This package can check if variables in a .env file are outdated.

It can take the name of a given file with environment variable values and check if the current environment values and the same or there were some changes.

The package can exclude optional variables from the checking process.

  Performance   Level  
Name: Arnel Labarda <contact>
Classes: 6 packages by
Country: Philippines Philippines
Age: 32
All time rank: 260323 in Philippines Philippines
Week rank: 103 Up2 in Philippines Philippines Up
Innovation award
Innovation award
Nominee: 3x

Details

Build Status

Introduction

Simple Laravel 5 package that checks if your .env file is outdated.

Installation

Add Envchecker to your composer.json file:



Add the service provider to your Laravel application config:

EnvChecker\EnvCheckerServiceProvider::class


Configuration
-------------

php artisan vendor:publish --provider="EnvChecker\EnvCheckerServiceProvider"


Update `config/envchecker.php`

return [

// template env file path
'example' => base_path('.env.example'),
// local env file
'local' => base_path('.env'),
// optional env vars
'optional' => []

];


Usage
-----

php artisan env:check


Sample Output

template file contains new values. +------------------+---------------+ | New Keys | Default Value | +------------------+---------------+ | MAIL_PORT | 2525 | | MAIL_ENCRYPTION2 | null | +------------------+---------------+


Test
----

PHPSpec

./bin/phpspec run


Todo PHPUnit
  Files folder image Files  
File Role Description
Files folder imagespec (1 directory)
Files folder imagesrc (1 directory)
Files folder imagetests (2 files)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file phpspec.yml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  spec  
File Role Description
Files folder imageEnvChecker (2 files)

  Files folder image Files  /  spec  /  EnvChecker  
File Role Description
  Plain text file EnvCheckerSpec.php Class Class source
  Plain text file EnvSpec.php Class Class source

  Files folder image Files  /  src  
File Role Description
Files folder imageEnvChecker (3 files, 3 directories)

  Files folder image Files  /  src  /  EnvChecker  
File Role Description
Files folder imageCommands (1 file)
Files folder imageConfig (1 file)
Files folder imageException (1 file)
  Plain text file Env.php Class Class source
  Plain text file EnvChecker.php Class Class source
  Plain text file EnvCheckerServiceProvider.php Class Class source

  Files folder image Files  /  src  /  EnvChecker  /  Commands  
File Role Description
  Plain text file CheckCommand.php Class Class source

  Files folder image Files  /  src  /  EnvChecker  /  Config  
File Role Description
  Accessible without login Plain text file envchecker.php Aux. Auxiliary script

  Files folder image Files  /  src  /  EnvChecker  /  Exception  
File Role Description
  Plain text file MissingFile.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Accessible without login Plain text file .env Data Auxiliary data
  Accessible without login Plain text file .env.example Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:18
This week:2
All time:9,464
This week:197Up