Releases: OzzyCzech/fromArray
Releases · OzzyCzech/fromArray
v2.1.0
What's Changed
Bug Fixes
- Fix null-safe access to
$typeinBaseLoader— prevented crash when property type isnull - Replace
trigger_error()withthrow new InvalidArgumentExceptionfor unsupported types inMetadata - Fix
current()ongetAttributes()— replaced with safe[0] ?? nullaccess
Refactoring
- Add
declare(strict_types=1)to all PHP files - Replace
get_called_class()withstatic::classinFromArraytrait - Replace
call_user_func()with direct static method calls inBaseLoader - Extract shared callback resolution logic into
Loader::resolveCallback() - Remove unnecessary
use functionimports - Remove unnecessary fallback in
Metadata::getProperties() - Add return type
mixedtoBaseLoader::__invoke() - Add
Metadata::resetInstance()for test isolation
Tests
- Add tests for enum loading (nullable and non-nullable)
- Add tests for
Types::ArrayOfObjectswith#[Type]attribute - Add tests for type casting (int, bool, float, string, array)
- Add tests for nullable objects and pre-constructed instances
CI & Docs
- Update PHP test matrix: drop EOL 8.1, add PHP 8.5
- Update CS Fixer job to PHP 8.4
- Fix
macOS-latestcasing in CI matrix - Remove deprecated
--no-suggestflag fromcomposer install - Fix readme: syntax errors in code examples, typos, improved structure
Full Changelog: v2.0.1...v2.1.0
v2.0.1
Full Changelog: v2.0.0...v2.0.1
v2.0.0
Full Changelog: v1.0.1...v2.0.0
v1.0.1
v1.0.0
Full Changelog: v0.0.5...v1.0.0
v0.0.5
Full Changelog: v0.0.4...v0.0.5
v0.0.4
v0.0.3
Full Changelog: v0.0.2...v0.0.3
v0.0.2
Full Changelog: v0.0.1...v0.0.2