Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Env Normalizer Laravel Package

romanzipp/laravel-env-normalizer

A Laravel package that normalizes your .env file, tidying key ordering and formatting so environment configs stay consistent across projects and teams. Useful for keeping diffs clean and avoiding merge conflicts in shared .env files.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Configuration surface as a product artifact. Every KEY=value line in .env.example is effectively a configuration knob you've shipped. This package makes the knobs explicit by diffing real .env files against the canonical example, which supports decisions like "how many settings do we actually expose?", "which flags are vestigial?", and "what's the default a self-hoster will land on?"
  • Deprecation and flag cleanup. Because it flags variables present in .env but absent from .env.example (and vice versa), it gives you evidence for removing dead feature flags, retired integrations, and orphaned credentials — a prerequisite for reducing secret sprawl and audit scope.
  • Onboarding as a supported path. New engineers, contractors, and support engineers provisioning a local or staging environment get a deterministic .env layout instead of a hand-rolled one. That's a measurable reduction in "it works on my machine" triage and in setup tickets to platform/DevOps.
  • Environment parity reviews. Comparing staging vs. production vs. local env structure surfaces drift before it becomes an incident — particularly useful before a release cut or a migration that depends on a specific setting being present in all environments.
  • Upgrade safety for downstream consumers. If you ship a Laravel app or starter kit, keeping .env.example authoritative means upgrade notes ("add QUEUE_BATCH_SIZE to your env") are mechanically verifiable rather than prose-only. This supports build-vs-buy calls on internal tooling: a small script vs. a dependency.
  • CI-gated hygiene. Normalization is scriptable, so ".env.example is out of sync with usage" can become a failing check rather than a code-review nit. That converts a soft convention into an enforceable policy, which is a governance decision worth making explicitly.

When to Consider This Package

Adopt it when:

  • You run Laravel with three or more environments and a .env.example that has visibly rotted.
  • You have more than a couple of engineers touching configuration, or frequent contributor churn (contractors, open-source contributors) where env setup is a recurring support cost.
  • You already treat .env.example as documentation and want that documentation validated in CI.
  • You need a cheap audit input for secret/config inventory work — even a one-off run is useful for a cleanup sprint.

Look elsewhere, or don't adopt, when:

  • Maintenance risk dominates. Last release 2021-10-14, one star, zero dependents, single maintainer. There is no community validation and no evident ongoing support. Verify PHP/Laravel version compatibility against your runtime before committing; expect to fork or vendor it.
  • You don't manage .env files by hand. If configuration lives in Vault, AWS SSM, Doppler, Kubernetes ConfigMaps/Secrets, Laravel Vapor, or Forge's env editor, the file-normalization premise mostly evaporates. You'd want drift detection at the config provider layer instead.
  • The pain isn't real yet. With a solo developer and one environment, this is ceremony. A 50-line Artisan command or a make env-check script covers the same ground with zero dependency risk.
  • You need policy enforcement, not formatting. The package formats and reports; it doesn't validate that required keys are non-empty, that secrets aren't committed, or that values are well-typed. Pair with (or replace by) a config-validation approach if that's your actual requirement.
  • You're standardized on a monorepo config service where env keys are generated, in which case normalization is a downstream symptom rather than the fix.

Given the score and staleness, the realistic PM position is "borrow the idea, not necessarily the dependency" — evaluate it inside a spike, and be prepared to reimplement the diff as an internal command.

How to Pitch It (Stakeholders)

To executives: This is a small hygiene tool, not a platform bet. It keeps our environment configuration files consistent and tells us which settings are actually used versus dead, which shortens new-engineer setup and shrinks the surface area we have to audit for secrets and stale credentials. Cost is negligible and it never runs in production. The caveat: the upstream project is effectively unmaintained (last release 2021, no adoption), so treat it as a pattern we may adopt internally rather than a long-term vendor.

To engineering: The package reformats .env to match .env.example's key order and grouping, and reports keys that exist in one but not the other. That gives us a mechanical answer to "did this PR add a setting without documenting it?" and "is this flag still live?" — ideal as a CI check or a pre-release step. It's a dev-only dependency, MIT-licensed, and small enough to fork or reimplement as an Artisan command if compatibility or maintenance becomes a problem. Recommend a time-boxed trial: one environment, one CI job, measure whether the drift reports surface real cleanup work before we standardize on it.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib