arun-skg/envdoctor

Local-first consistency checker for environment variables (native PHP port)

Maintainers

Package info

github.com/arun-skg/envdoctor-php

Homepage

pkg:composer/arun-skg/envdoctor

Transparency log

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.1 2026-08-22 11:21 UTC

This package is auto-updated.

Last update: 2026-08-22 11:47:07 UTC


README

Native PHP port of envdoctor — a local-first environment-variable consistency checker, installable via Composer.

composer require --dev arun-skg/envdoctor
vendor/bin/envdoctor scan --dir .

What it does

Reconciles variables used in PHP source (getenv("X"), $_ENV["X"], $_SERVER["X"]) against those defined in .env files:

Rule Severity Meaning
undefined-in-source error Used in code but not defined in any .env file
unused warning Defined in .env but never referenced in source

Line (//, #) and block (/* */) comments are stripped before scanning. scan exits 1 on errors (or warnings with --strict). Values are never printed.

Development

cd php
php tests/ScannerTest.php   # dependency-free test runner
composer validate --strict

Publishing

Packagist needs composer.json at a repo root, so this package is mirrored to a read-only split repo, arun-skg/envdoctor-php, where the php/ subtree sits at the root. Register that repo on packagist.org; its webhook publishes on each push/tag. The split is kept current automatically by the PHP Split workflow (needs a SPLIT_REPO_TOKEN secret). Do not edit the split repo directly — edit php/ here.

One of several native, per-ecosystem ports; the reference implementation lives in the main repository.