schmittjoh / serializer

Library for (de-)serializing data of any complexity (supports JSON, and XML)
http://jmsyst.com/libs/serializer
MIT License
2.32k stars 589 forks source link

fix(stringable-type): Allow stringable object as type. #1493

Closed pmysiak closed 1 year ago

pmysiak commented 1 year ago
Q A
Bug fix? yes
New feature? no
Doc updated no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #...
License MIT

I'm sorry but I made a small mistake in previous pull request #1492 . Documentation is updated correctly. I've updated code to fulfill documentation. Now you can use

#[Serializer\Type(new ArrayOfMyHandler(MyClass::class))]
private $array;

and also

#[Serializer\Type(name: new ArrayOfMyHandler(MyClass::class))]
private $array;
scyzoryck commented 1 year ago

Thanks for fixes:)