Download the PHP package backdevs/dotenv-sniffer without Composer
On this page you can find all versions of the php package backdevs/dotenv-sniffer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package dotenv-sniffer
# Laravel Dotenv Sniffer
A code sniffer for environment variables **not** declared in `.env` files
[](https://github.com/backdevs/laravel-dotenv-sniffer/actions/workflows/test.yml)
[](https://github.com/backdevs/laravel-dotenv-sniffer/releases/latest)
While working on large projects we've noticed that `.env.example` files would often get outdated. \
This tool provides a fast and simple way of constantly checking your code against `.env` files either as a step in your CI/CD pipeline, a Git hook or whatever works best for your project.
Requirements
- PHP
^8.1
- Tokenizer extension
Usage
Docker (recommended)
Inside your app's root directory, run: `
Composer dependency
PHAR
Options and Arguments
Options
--no-fail
- Don't fail if errors are found (exit code = 0)-w | --warn-with-default
- Treat variables with default values in Laravel\'senv()
calls as warnings-c | --fail-code
- The exit code to use when failing (default: 1), useful in CI/CD pipelines
Arguments
env-file
- The .env file to check against (e.g.:.env
,.env.example
,.env.dev
)paths
- One or more files and/or directories to check
Simple Example
The .env.example
file:
The config.php
file:
Output for vendor/bin/desniff -w .env.example config.php
All versions of dotenv-sniffer with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.1
ext-tokenizer Version *
symfony/console Version ^6.0|^7.0
symfony/validator Version ^6.0|^7.0
vlucas/phpdotenv Version ^5.0
symfony/stopwatch Version ^6.0|^7.0
ext-tokenizer Version *
symfony/console Version ^6.0|^7.0
symfony/validator Version ^6.0|^7.0
vlucas/phpdotenv Version ^5.0
symfony/stopwatch Version ^6.0|^7.0
The package backdevs/dotenv-sniffer contains the following files
Loading the files please wait ....