Add class annotation for describe serializer property
composer require gollumsf/serializer-describe-annotation-bundle
return [
// [ ... ]
GollumSF\SerializerDescribeAnnotationBundle\GollumSFSerializerDescribeAnnotationBundle::class => ['all' => true],
];
use GollumSF\SerializerDescribeAnnotationBundle\Attribute\SerializerDescribe;
class EntityParent {
private $proprtyA;
}
#[SerializerDescribe([
'propertyA' => [
'groups' => [
'group_1', 'group_2'
]
],
'propertyB' => [
'serializedName' => 'new_name',
'maxDepth' => 2
]
])]
class EntityChild extends EntityParent {
private $propretyB;
}
use GollumSF\SerializerDescribeAnnotationBundle\Annotation\SerializerDescribe;
class EntityParent {
private $propertyA;
}
/**
* @SerializerDescribe({
* "propertyA" = {
* "groups" = {
* "group_1", "group_2"
* }
* },
* "propertyB" = {
* "serializedName" = "new_name",
* "maxDepth" = 2
* }
* })
*/
class EntityChild extends EntityParent {
private $propertyB;
}