gollumsf/serializer-describe-annotation-bundle

Add class annotation for describe serializer property

v1.0.2 2019-05-16 09:25 UTC

This package is auto-updated.

Last update: 2022-08-16 16:48:47 UTC


README

Build Status License Latest Stable Version Latest Unstable Version

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;
}