Skip to content

Releases: OzzyCzech/fromArray

v2.1.0

14 Apr 10:27

Choose a tag to compare

What's Changed

Bug Fixes

  • Fix null-safe access to $type in BaseLoader — prevented crash when property type is null
  • Replace trigger_error() with throw new InvalidArgumentException for unsupported types in Metadata
  • Fix current() on getAttributes() — replaced with safe [0] ?? null access

Refactoring

  • Add declare(strict_types=1) to all PHP files
  • Replace get_called_class() with static::class in FromArray trait
  • Replace call_user_func() with direct static method calls in BaseLoader
  • Extract shared callback resolution logic into Loader::resolveCallback()
  • Remove unnecessary use function imports
  • Remove unnecessary fallback in Metadata::getProperties()
  • Add return type mixed to BaseLoader::__invoke()
  • Add Metadata::resetInstance() for test isolation

Tests

  • Add tests for enum loading (nullable and non-nullable)
  • Add tests for Types::ArrayOfObjects with #[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-latest casing in CI matrix
  • Remove deprecated --no-suggest flag from composer install
  • Fix readme: syntax errors in code examples, typos, improved structure

Full Changelog: v2.0.1...v2.1.0

v2.0.1

14 Apr 10:28

Choose a tag to compare

Full Changelog: v2.0.0...v2.0.1

v2.0.0

14 Apr 10:28

Choose a tag to compare

Full Changelog: v1.0.1...v2.0.0

v1.0.1

14 Apr 10:28

Choose a tag to compare

What's Changed

  • Scheme now supports array of classes by @tarikflz in #2

Full Changelog: v1.0.0...v1.0.1

v1.0.0

14 Apr 10:28

Choose a tag to compare

Full Changelog: v0.0.5...v1.0.0

v0.0.5

14 Apr 10:28

Choose a tag to compare

Full Changelog: v0.0.4...v0.0.5

v0.0.4

14 Apr 10:28
5811a82

Choose a tag to compare

What's Changed

Full Changelog: v0.0.3...v0.0.4

v0.0.3

14 Apr 10:28

Choose a tag to compare

Full Changelog: v0.0.2...v0.0.3

v0.0.2

14 Apr 10:28

Choose a tag to compare

Full Changelog: v0.0.1...v0.0.2

v0.0.1

14 Apr 10:28

Choose a tag to compare

Initial release