·
2 commits
to master
since this release
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()andEnv::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,.jsonby default -
Loaders must implement
LoaderInterfaceor extendBaseLoader -
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)