Populate an object after unserialization in Symfony

Code
<?php

use Symfony\Component\Serializer\Serializer;
use 
Symfony\Component\Serializer\Encoder\JsonEncoder;
use 
Symfony\Component\Serializer\Normalizer\PropertyNormalizer;

$jsonEncoder = new JsonEncoder();
$normalizer = new PropertyNormalizer();

$serializer = new Serializer([$normalizer], [$jsonEncoder]);

$array = ['id' => 1'foo' => 'bar'];

class 
Foo
{
    private 
$id;
    private 
$foo;
}

$serialized $serializer->serialize($array'json');

$foo = new Foo();

$unserialized $serializer->deserialize(
    
$serialized,
    
Foo::class,
    
'json'
    [
        
'object_to_populate' => $foo,
    ]
);

dump(
    
$unserialized === $foo,
    
$unserialized
);
Result
true

Foo {#369
-id: 1
-foo: "bar"
}
Used Versions
PHP 7.2, Zend 3.0, Symfony 4.0, Laravel 5.6, PHPUnit 6.5, Doctrine 2.8