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

Envclient Laravel Package

lionix/envclient

Laravel package for working with .env files programmatically: read, update, and manage environment variables from your app or an admin panel, so configuration changes can be made without manual file editing or redeploys.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package still sits on the same seam — the .env file and the env()/config() boundary — but 2.2.0 widens that seam in two directions that matter. Additive surface grows substantially (env:diff, env:sync, env:unset, env:restore, --file, encrypted-file support, boot-time validation, six rule sets, two events). Additive command surface is low-risk; additive runtime surface is not.
  • The one genuinely architectural change is validate_on_boot (log or exception). That moves the package from a CLI developer tool into the web request path on every request. This is a category change, not a feature. It is defensible in log mode as a canary; exception mode in production makes an invalid env key a total outage rather than a startup failure — strictly worse than failing at boot.
  • The second structural change is that "saving the file updates the runtime environment, so env() returns the new value." This narrows one divergence (file vs. env()) but does not fix the config-cache trap: once Laravel's config repository is populated, config() values are already materialized and a post-save env() mutation does not propagate to them. The most dangerous variant of the original trap survives.
  • New behavior "when config is cached (and .env is not loaded) or another file is targeted, values are read from the file itself" introduces environment-dependent read semantics: the same EnvClient::get() returns a different source depending on config-cache state and --file. Deterministic within a process, but a debugging hazard and a real source of "it behaved differently in staging" incidents.
  • Differentiation is materially better than 1.x. The rule-set library plus encrypted-file support plus masking-by-default is a coherent bundle that phpdotenv + Rule::in does not replicate in an afternoon. But imliam/laravel-env-set-command and georgehanson/laravel-env-editor now overlap more, not less, because this package has moved toward their feature set.

Integration feasibility

  • Install remains a standard composer require. 2.2.0 adds illuminate/encryption as a direct dependency — small, first-party, low risk, but it enlarges the installed footprint and means the encrypted-env path is now on our dependency graph whether or not we use it.
  • Breaking change to plan for: env:get masks secrets by default. Any existing script, Makefile, or CI step that captures env:get output to consume a value will silently receive ********. It will not error — it will produce a wrong value. This is the highest-priority regression to hunt for, and it argues for pinning rather than floating.
  • Second output-format risk: env:generate now prints masked values next to each variable. Anything parsing that output for key names needs a re-check.
  • Original blocking unknowns are partly resolved: secret masking (yes, default-on, with --reveal), config-cache handling (documented, though the answer is "behavior changes"), encrypted files (supported). Still unresolved: atomicity (temp file + rename) and locking are not claimed by the release notes. env:restore and the backup option are recovery, not atomicity — a torn write still happens, you just have a file to restore from. And the backup is a single <file>.backup, so a second bad write overwrites the last known-good copy.
  • --file on all commands is powerful and expands blast radius: it makes it trivially easy to point write commands at a file outside the intended environment. Path handling and any containment/sandboxing is now an explicit review item.
  • Adoption signals are unchanged and still dominant: 16 stars, 0 dependents, no production evidence base. The 2.2.0 feature list is evidence of an active maintainer, which is the single best signal in this release, but activity is not the same as adoption.

Technical risk

  • File mutation remains the sharpest edge, and the surface just grew. env:sync, env:unset, env:restore, --file, and encrypted writes all mutate artifacts the application cannot boot without. The category risk is unchanged; the number of commands that can trigger it roughly doubled.
  • Boot-time validation is the new top risk. validate_on_boot = exception converts a misconfiguration into a fleet-wide 500 loop with no deploy to roll back. Even log mode adds per-request overhead and log volume. This should be treated as opt-in-for-canary-only, never a default.
  • Config-cache trap partially mitigated, not closed. Post-save env() mutation does not update config(). Operators will still see stale framework behavior after a successful-looking write.
  • Secret exposure materially improved. Masking by default in env:get and env:generate, with --reveal as an explicit opt-in, is the right design. Residual risk: --reveal in CI logs, exception messages from InvalidEnvironmentException (does it interpolate values?), and the EnvironmentFileUpdated/EnvironmentVariablesGenerated event payloads — do the events carry values, and are they masked? That is an unaudited leak channel introduced by this release.
  • Encrypted-file handling is welcome and is also a new failure surface. Writing back an encrypted file means re-encryption; a wrong --key/--cipher on a write is a destructive operation on a file whose plaintext you may not have. Test the round-trip, including failure and rollback.
  • Supply chain / metadata anomaly is unresolved. The 2026-09-26 last-release date is still inconsistent with a sane timeline, and this release does not clear it. Do not pin an unverifiable tag; record the commit SHA.
  • Governance improved measurably. PHPStan/Larastan level 8, Pint, Dependabot, .gitattributes exclusions — this answers the static-analysis and hygiene questions that were previously open. Still unknown: security disclosure process, test coverage figure, CI matrix breadth (Laravel/PHP versions actually exercised), and maintainer/bus factor.

Key questions

  1. Are writes atomic (temp file + rename) and lock-protected? The release adds backup/restore but does not claim either. Is .backup rotated, or is the previous good copy overwritten on each write?
  2. What exactly does validate_on_boot do under exception — throw on every request, cache the result, or throttle? Does it run before or after config load, and does it mask values in InvalidEnvironmentException messages?
  3. Do the EnvironmentFileUpdated / EnvironmentVariablesGenerated event payloads contain raw secret values, and are they masked?
  4. Does --file accept arbitrary paths (absolute, ../)? Is there containment, confirmation, or a protected-path guard?
  5. After a save that mutates env(), what is the documented behavior for already-resolved config() values, and does the package recommend or automate config:clear?
  6. For encrypted files: what happens on wrong key/cipher, is the original preserved, and does backup apply before or after decrypt?
  7. What are the CI-tested Laravel and PHP version ranges (i.e., does the matrix back the composer constraints)?
  8. Who maintains it, what is the bus factor, and is there a security disclosure channel?
  9. Is env:get's masking change documented as breaking, and is there a migration note for scripts?

Integration Approach

Stack fit

  • Still Laravel-only, still concentrated in teams running multiple Laravel apps with heterogeneous .env shapes. env:diff/env:sync against .env.example is a genuine, if modest, ergonomic win for onboarding and drift checks — the best-fit use case remains CI preflight and developer onboarding.
  • validate_on_boot pulls against that fit. It invites production runtime use of a package with zero dependents. Keep the boundary explicit: validation belongs in a deploy preflight step, not in the request lifecycle. If validate_on_boot is used at all, log mode only, on one canary service.
  • Encrypted-env support is the most interesting new fit: it partially answers the "don't put this near production secrets" objection by keeping ciphertext on disk. Still not a substitute for SSM/Vault/Kubernetes Secrets — it's a better local-dev story, not a secret-management story.

Migration path

  • Additive from 1.x, but not behavior-compatible: env:get masking is a breaking change for consumers. Treat 2.2.0 as a minor-version-numbered breaking release and do a consumer audit before bumping.
  • The internal-interface recommendation stands and is now more valuable, not less: wrap EnvReader/EnvValidator/EnvWriter behind our own thin interfaces, because the package's read semantics now vary by config-cache state and --file, and because EnvForgetterInterface (new) signals the vendor is refactoring its own contracts.
  • Do not route production secret provisioning through this package. env:sync and --file make that mistake easier to make than it was in 1.x — write the prohibition down.

Compatibility

  • Require a verified support matrix before approval. The PHPStan level 8 + Dependabot signals raise confidence in code quality; they do not substitute for a published Laravel/PHP CI matrix, and the composer constraints must be checked against our LTS and next major.
  • Extend the adversarial round-trip harness to cover the new surface: env:sync against a fixture .env.example, env:unset on a key with a quoted value, env:restore after a deliberate corruption, encrypted write/read/rewrite with the correct and an incorrect key, and --file against a path outside the project root.
  • Add a masking regression test: a script that consumes env:get for a secret-bearing key must now fail loudly (detect ***) rather than pass a masked string downstream. Verify event payloads are masked.

Sequencing

  1. Spike: install 2.2.0 in a sandbox, enumerate commands, review source for atomicity, locking, --file path handling, event payload contents, and exception message masking.
  2. Resolve the release-metadata anomaly; pin an exact version and record the commit SHA. Confirm the CI matrix behind the composer constraints.
  3. Run the extended adversarial harness, including the encrypted-file round-trip and the env:get masking consumer audit.
  4. Pilot phase 1 — validation rules and rule sets only, wired into a deploy preflight for one non-critical service. Zero blast radius.
  5. Pilot phase 2 — read-only commands (env:get, env:diff) in onboarding docs for one team.
  6. Pilot phase 3 — write commands (env:set, env:unset, env:restore) in local/dev only, with mandatory backup and a post-write config:clear in the same scripted step.
  7. Explicitly decide and document: validate_on_boot off by default, log at most, exception prohibited outside local.
  8. Decision review after one quarter of pilot data. Production write access remains out of scope; the release does not change that.

Operational Impact

Maintenance

  • MIT, permissive, low legal friction. Maintenance risk is now lower but still real: active development, PHPStan level 8, Pint, Dependabot, and a .gitattributes discipline signal a maintainer who cares. That is a meaningful upgrade over 1.x and the strongest argument in this release.
  • Counterweight: a fast-moving, low-adoption package with new breaking changes at 2.2.0 means churn. Each release is effectively a mini-migration for us. Budget for pinning and periodic upgrade windows rather than floating constraints.
  • Bus factor is still unknown and still likely small. Do not let improved CI hygiene disguise it.

Support

  • Community-only, no SLA, no commercial backing. Unchanged.
  • Improved CI raises our confidence in code quality but does not create an escalation path. First-line triage stays internal.
  • Still assume no formal CVE process. The new encrypted-file support means this package now touches key material and ciphertext — that raises the bar on our own security review cadence rather than lowering it.

Scaling

  • Unchanged and still the core limitation: .env files are per-instance, so any write workflow conflicts with immutable infrastructure. env:sync does not change this; it accelerates it, which is worse if misapplied.
  • validate_on_boot is the one feature that scales outward to every request, and that is precisely why it should be off. Per-request validation cost is small individually and organizational surprise is large.
  • No computational scaling concern. The constraint is architectural.

Failure modes

  • Corrupted or partially written .env → boot failure. Backup/restore makes recovery possible, but a single .backup slot means a second bad write destroys the good copy. Recovery is not atomicity.
  • Silent value mangling ($, #, spaces, quotes, newlines) → passes boot, fails later. env:sync now propagates such values across files automatically, amplifying impact.
  • Masked-secret leakage into behavior, not logs: a script that consumes env:get post-2.2.0 receives ******** and stores it as a credential. Fails at the far end of the pipeline, hardest to trace.
  • validate_on_boot = exception with an invalid key → every request 500s; no deploy to roll back; recoverable only by fixing config on the box.
  • Config-cache staleness → operator believes a framework config value changed; it did not. Still the most likely misdiagnosis.
  • --file misfire → writes to the wrong file, potentially outside the project, potentially production.
  • Encrypted write with wrong --key/--cipher → destroyed ciphertext, plaintext not recoverable from the artifact.
  • Secret exposure via --reveal in CI logs, or via event payloads / InvalidEnvironmentException messages.
  • Concurrent writes → last-writer-wins data loss.
  • Abandonment → future Laravel major breaks discovery or command signatures, forcing emergency migration.

Ramp-up

  • API learning curve stays near zero. One facade, a dozen commands, six ready-made rule sets. A mid-level Laravel developer is productive in under an hour.
  • Governance education burden increased. Engineers with write access must now also understand: masking-by-default as a breaking behavior, --file risk, encrypted-file key handling, config-cache invalidation, and why validate_on_boot=exception is prohibited. That is a real onboarding tax for a tool with 16 stars and 0 dependents.
  • Overall recommendation: unchanged in direction, tightened in scope. Approve as a developer-tooling experiment only, behind internal interfaces, with write commands restricted to local/dev, validate_on_boot off or log-only, backup mandatory, and a hard rule against production secret management. The 2.2.0 quality signals and the encrypted-env and diff/sync features justify continuing the pilot — they do not justify standardizing. Re-evaluate on evidence of adoption beyond single-digit dependents, a published CI support matrix, a stated security disclosure process, and one clean quarter without a breaking change at the patch/minor level.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console