CakePHP DTO plugin - quickly generate useful data transfer objects for your app (mutable/immutable)
MIT License
Published by dereuromark over 4 years ago
Published by dereuromark almost 5 years ago
Please help to finalize for stable release.
Published by dereuromark almost 5 years ago
Defining a singular automatically sets collection to true.
Published by dereuromark over 5 years ago
Add read()
nullable path reading as convenience wrapper to make this similar to Entity ReadTrait usage.
Published by dereuromark over 5 years ago
Fixed toArray()
for empty collections to be not null
but []
.
Published by dereuromark over 5 years ago
Fixed auto-detect of PHP7.1+
Published by dereuromark over 5 years ago
Associative arrays can now be string|int
. Usually, assoc always means string keys.
But in some cases, integer could also be OK, e.g. when using primary keys as key.
PHPStan etc should not report an error here then, as such the strict string typehint has been removed for $key.
Published by dereuromark almost 6 years ago
Union type support added
<field name="service" type="string|int|float"/>
or even
<field name="service" type="string[]|int[]"/>
is possible now
Published by dereuromark almost 6 years ago
Published by dereuromark almost 6 years ago
Published by dereuromark almost 6 years ago
Allow fromArray() to auto-add keys for associative arrays if that "key" exists in the incoming data.
Fix toArray()/fromArray() for array collections.
Published by dereuromark almost 6 years ago
Added namespaced DTOs.
This way you can have multiple of the same name, as long as they are under different subfolders and not used together or aliased.
Fix mixed type for fields.
Published by dereuromark almost 6 years ago
Default values auto-require the field now (not nullable) unless specified differently.
Published by dereuromark almost 6 years ago
You can try out this package now as stable one.
Please give some feedback or provide ideas for improvement, either as issue or PR.