Releases: codemonster-ru/env
Releases · codemonster-ru/env
Release v2.3.0
Added
Env::getCast()for optional casting of common string values.
Tests
- Added coverage for
Env::getCast()casting behavior.
Release v2.2.0
Added
- Loader/Parser interfaces and default parser customization.
loadString,loadFiles,safeLoad*helpers with size limits and strict resolve mode.- Optional glob flags for
loadFilesand glob sorting for stable order. - Strict parsing options for
parse()/parseToArray()and BOM handling tests. $VARexpansion support and ASCII-only name mode inDefaultParser.
Changed
- Lines without
=are treated as empty strings. - Multi-line parsing detects whitespace around
=and throws on unterminated quotes. Envis a facade overEnvLoader/EnvParser, with injectable defaults.- README expanded with usage, exceptions, and new options.
Fixed
- Strict resolve now reports unresolved variables in multi-file loads.
Release v2.1.0
Added
- Support for inline comments, escaped
#/=, andexport KEY=valuelines. - Support for escaped quotes and
\n,\r,\tinside quoted values. - Tests covering new parsing behavior and getenv precedence.
Changed
.envparsing now handles spaces around=and quoted values with trailing comments.- Loading respects variables already present in
getenv(). - README updated with parsing rules and examples.
Release v2.0.1
Fixed
- Removed global
env()helper from the package to keep framework-level responsibility incodemonster-ru/annabel. - The package now exposes only the static API through
Codemonster\Env\Env.
Docs
- Updated
README.mdto reflect the removal of the global helper.
Examples now useEnv::get()instead ofenv().
Tests
- Updated all tests to use
Env::get()instead of the removed globalenv()helper.
Internal
- Verified autoload configuration in
composer.json(removed helper file registration). - No API-breaking changes; patch-level release only.
Release v2.0.0
Changed
- Raised minimum PHP version to >= 8.2. No public API changes.
Release v1.1.1
Changed
- Namespace changed from
CodemonstertoCodemonster\Env. - Added support for tests with single and double quotes (
'...'and"...") in.env.
Release v1.1.0
Added
Env::get($key, $default = null)method with type casting:true/(true)→truefalse/(false)→falsenull/(null)→nullempty/(empty)→""- Global helper
env($key, $default = null). - Support for quoted strings (
"...",'...'). - New tests (7 tests, 8 assertions) for all cases.
- Configuration file
phpunit.xml.dist. - The
CHANGELOG.mdfile. - The
README.mdfile with usage examples.
v1.0.0
Added
- The first stable version of the
codemonster-ru/envpackage. - The
Env::load($path)method for loading the.envfile into the environment.