PHP

PHP runtime changelog

Version history for envless/env, the Envless runtime for PHP.

Version history for envless/env, published on Packagist. When a newer version is out, the package prints a one-line notice the first time it loads in a terminal. Set ENVLESS_DISABLE_UPDATE_NOTICE to silence it.

The TypeScript runtime, @goenvless/env, has its own changelog. The two load the same way, and a change to one lands in the other.

0.0.1

The first release of the PHP runtime, matching @goenvless/env as it stands in the Envless repository. A parity check replays every scenario against both packages, from token, .envless and key resolution, pagination, retries and the cache to the injected manifest, overrides and the explicit fetch, and fails on any difference in the requests, the values, the types, the errors, the process environment, the warnings or the cache files.

  • Env::get(), optional() and has() read every variable coerced to its type, string(), number() and boolean() read it typed for PHPStan and Psalm, and Env::client() reads only the client ones, with snapshot() for templates.
  • Env::load() fetches with an ev_sk_ machine key, decrypts with ENVLESS_KEY or ENVLESS_PASSPHRASE, caches the ciphertext for 15 minutes in the same files @goenvless/env uses, and fills $_ENV, $_SERVER and getenv() without overwriting anything already set or writing a name that changes how a process executes code.
  • vendor/envless/env/register.php loads from PHP's auto_prepend_file. Inside envless run, everything is read from the environment the CLI injected, with no credentials and no request.
  • Env::override() layers values for tests, and the views refuse to be serialised or JSON encoded with their values.
  • Env::fetch() loads with explicit arguments for serverless functions and multi-tenant apps, and Env::isConfigured() lets a build without credentials skip the load.
  • vendor/bin/envless-env types writes a class with one typed method per variable, from the manifest under envless run or with a machine key, and --check catches a stale one in CI.
  • Envless\Env\Symfony\EnvVarLoader for Symfony's %env()%, and recipes for Laravel, PHP-FPM, Apache and WordPress.
  • For PHP-FPM: .envless is found at the Composer project root, the cache falls back to the temp folder when the home folder is not writable, and the last cached values keep a site up through an API outage.