Skip to content

Releases: brianlmoon/value-objects

v2.4.1 Fix error when null values are passed in to fromArray

Choose a tag to compare

@brianlmoon brianlmoon released this 02 Sep 16:58
f86fb48

What's Changed

  • Skip nested-object handling in fromArray() when value is null by @brianlmoon in #8

Full Changelog: v2.4.0...v2.4.1

Lazily instantiate nullable typed-object properties in fromArray()

Choose a tag to compare

@brianlmoon brianlmoon released this 13 Aug 16:09
5775b14

Removes the requirement to eagerly initialize nested ValueObject properties in __construct() when they are nullable; fromArray() now creates the instance on demand based on the property's declared type.

Bug fixes

Choose a tag to compare

@brianlmoon brianlmoon released this 06 Aug 04:20
3b01e38

When REQUIRED_TYPE lists more than one class and a value passed in is already an instance of one of them, filterType() only recognized a match if the instance happened to be of the last-listed type, since the default case only handled converting raw arrays into instances. Instances of any other listed type were wrongly rejected.

Expose parent getArrayCopy

Choose a tag to compare

@brianlmoon brianlmoon released this 02 Dec 16:39
9211544
Merge pull request #5 from brianlmoon/expose_arrayobject_getarraycopy

Expose the original version of ArrayObject's getArrayCopy

Bug fix with nested objects

Choose a tag to compare

@brianlmoon brianlmoon released this 15 Nov 04:32
7ba1894

Fixed Bug: Objects in plain arrays would not be exported to array properly.

PHP Updates and more

Choose a tag to compare

@brianlmoon brianlmoon released this 01 Oct 00:58
843e745
  • Updated to minimum PHP 8.2
  • PHP 8.4 fixes
  • Updated PHPUnit to 11
  • Fixed null handling for non-nullable values in fromArray

Support overriding toArray

Choose a tag to compare

@brianlmoon brianlmoon released this 01 Mar 20:12
575f67c

If an object does not support the Export interface, a child class may want to convert it before these base classes toArray is called. This also adds support for classes implementing the JsonSerializable interface.

Update namespace and add docs

Choose a tag to compare

@brianlmoon brianlmoon released this 22 Jan 18:30
  • Simplified namespace to \Moonspot\ValueObjects
  • Removed Builder base class. Use moonspot/builder.
  • Added README

Initial Production Release

Choose a tag to compare

@brianlmoon brianlmoon released this 19 Jan 23:13

These objects have been used in production in a non open source application for several years. This is the first public release of them in hopes that others find them useful.

v0.9.0

Choose a tag to compare

@brianlmoon brianlmoon released this 14 Dec 22:54

Initial pre-release