Closed ToshY closed 3 weeks ago
Problem
Since 1.9.0 (using 1.9.2 currently) the mapper stopped mapping nullable property values to stdClass.
1.9.0
1.9.2
stdClass
Reproduction
class Book { public function __construct( public int $id, public ?int $completed, ) { } }
Then calling the mapper:
$result = $this->mapper->map( new Book(1, null), new \stdClass(), );
In =<1.8.0:
=<1.8.0
^ {#546 +"id": 1 +"completed": null }
In >=1.9.0:
>=1.9.0
^ {#547 +"id": 1 }
Should be fixed by https://github.com/rekalogika/mapper/pull/199 and v1.9.3. Thank you for your report.
@priyadi Thanks for the fast fix as always 💯
Problem
Since
1.9.0
(using1.9.2
currently) the mapper stopped mapping nullable property values tostdClass
.Reproduction
Then calling the mapper:
In
=<1.8.0
:In
>=1.9.0
: