Skip to content

version 2.0.0

Latest

Choose a tag to compare

@naingaunglwin-dev naingaunglwin-dev released this 25 Jul 22:34
· 2 commits to master since this release
976c68e

v2.0.0

This major release introduces a completely redesigned architecture focused on extensibility, custom loaders, and multi-format support — all while maintaining simplicity.

✨ What's New

  • New Env::create() system

    • Fully configurable with custom loaders, files, override behavior, and caching
  • Dotenv no longer auto-loads by default — explicit load() call gives you full control

  • Static Access

    • Env::get() and Env::group() auto-initialize if no instance is created
  • Safe Load Mode

    • safeLoad() returns empty arrays on failure instead of throwing

📦 Loader & Parser Architecture

  • Each loader resolves based on file extension

  • Supports .env, .json by default

  • Loaders must implement LoaderInterface or extend BaseLoader

  • Parsers are resolved by convention: JsonParser, DotenvParser, etc.

📌 Breaking Changes

  • Removed old methods like reload()

  • File loading logic moved into pluggable loaders (e.g., DotenvLoader, JsonLoader)

📚See full README for usage & custom loader examples

👉 View Documentation