gollumsf / serializer-describe-annotation-bundle
Add class annotation for describe serializer property
Installs: 634
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.1
- symfony/framework-bundle: >=4
- symfony/serializer-pack: *
This package is auto-updated.
Last update: 2022-08-16 16:48:47 UTC
README
Add class annotation for describe serializer property
Installation:
composer require gollumsf/serializer-describe-annotation-bundle
config/bundles.php
return [ // [ ... ] GollumSF\SerializerDescribeAnnotationBundle\GollumSFSerializerDescribeAnnotationBundle::class => ['all' => true], ];
Usage
use GollumSF\SerializerDescribeAnnotationBundle\Annotation\SerializerDescribe; class EntityParent { private $proprtyA; } /** * @SerializerDescribe({ * "proprtyA" = { * "groups" = { * "group_1", "group_2" * } * }, * "proprtyB" = { * "serializedName" = "new_name", * "maxDepth" = 2 * } * }) */ class EntityChild extends EntityParent { private $proprtyB; }