gollumsf / serializer-describe-attribute-bundle
Add class attribute for describe serializer property
Package info
github.com/GollumSF/serializer-describe-attribute-bundle
Type:symfony-bundle
pkg:composer/gollumsf/serializer-describe-attribute-bundle
v1.0.0
2026-03-27 08:51 UTC
Requires
- php: >=8.2
- symfony/framework-bundle: ^6.4|^7.0|^8.0
- symfony/property-access: ^6.4|^7.0|^8.0
- symfony/serializer: ^6.4|^7.0|^8.0
Requires (Dev)
- gollumsf/reflection-property-test: ^1.0
- nyholm/symfony-bundle-test: ^3.0
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2026-03-27 09:51:19 UTC
README
Add class attribute for describe serializer property
Requirements:
- PHP >= 8.2
- Symfony 6.4, 7.x or 8.0
Installation:
composer require gollumsf/serializer-describe-attribute-bundle
config/bundles.php
return [ // [ ... ] GollumSF\SerializerDescribeAttributeBundle\GollumSFSerializerDescribeAttributeBundle::class => ['all' => true], ];
Usage:
use GollumSF\SerializerDescribeAttributeBundle\Attribute\SerializerDescribe; class EntityParent { private $propertyA; } #[SerializerDescribe([ 'propertyA' => [ 'groups' => [ 'group_1', 'group_2' ] ], 'propertyB' => [ 'serializedName' => 'new_name', 'maxDepth' => 2 ] ])] class EntityChild extends EntityParent { private $propertyB; }