deserialize an object with some embedded attributes values different than BDD values
Expected Result
Not excluded attributes in embedded document are not update as expected
Actual Result
The attributes not exposed are still updated
exemple :
/** @ExclusionPolicy("all") */
class Contract{
/**
*
* @Serializer\Type("App\Document\Embedded\ContractPeriod")
* @Serializer\SerializedName("contractPeriod")
* @Expose()
*/
private $contractPeriod;
/**
*
* @Serializer\Type("App\Document\Embedded\ContractPeriod")
* @Serializer\SerializedName("contractPeriod")
*/
private $testNotExposed;
**In this case we are in the main document so the not exposed value will not be updated with deserialization**
}
/** @ExclusionPolicy("all") */
class ContractPeriod {
/**
* @Serializer\Type("string")
* @Serializer\SerializedName("label")
* @Expose()
*/
private $label;
/**
* @var DateTime|null
* @Groups({"contract"})
*
* @ODM\Field(type="date", nullable=true)
*/
private $otherNotExposeTest;
**In this case we are in the Embedded document and the not exposed value is always updated with deserialization**
}
Bug report? yes
Steps required to reproduce the problem
Expected Result
Not excluded attributes in embedded document are not update as expected
Actual Result
The attributes not exposed are still updated
exemple :