{"id":20681185,"url":"https://github.com/gemberphp/serializer-symfony","last_synced_at":"2026-01-16T11:55:29.902Z","repository":{"id":257813841,"uuid":"807581520","full_name":"GemberPHP/serializer-symfony","owner":"GemberPHP","description":"[Dependency adapter] Gember Event Sourcing Serializer adapter based on symfony/serializer","archived":false,"fork":false,"pushed_at":"2026-01-14T15:11:06.000Z","size":266,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T18:56:43.480Z","etag":null,"topics":["cqrs","dcb","ddd","domain-driven-design","dynamic-consistency-boundary","event-sourcing","gember","serializer","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GemberPHP.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-29T11:28:41.000Z","updated_at":"2026-01-14T15:08:54.000Z","dependencies_parsed_at":"2024-10-07T18:38:46.808Z","dependency_job_id":"cde9e9b2-bca4-40d2-ad2d-6b4350157985","html_url":"https://github.com/GemberPHP/serializer-symfony","commit_stats":null,"previous_names":["gemberphp/serializer-symfony"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/GemberPHP/serializer-symfony","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GemberPHP%2Fserializer-symfony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GemberPHP%2Fserializer-symfony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GemberPHP%2Fserializer-symfony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GemberPHP%2Fserializer-symfony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GemberPHP","download_url":"https://codeload.github.com/GemberPHP/serializer-symfony/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GemberPHP%2Fserializer-symfony/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cqrs","dcb","ddd","domain-driven-design","dynamic-consistency-boundary","event-sourcing","gember","serializer","symfony"],"created_at":"2024-11-16T22:10:02.232Z","updated_at":"2026-01-16T11:55:29.895Z","avatar_url":"https://github.com/GemberPHP.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🫚 Gember Serializer: Symfony Serializer\n[![Build Status](https://scrutinizer-ci.com/g/GemberPHP/serializer-symfony/badges/build.png?b=main)](https://github.com/GemberPHP/serializer-symfony/actions)\n[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/GemberPHP/serializer-symfony.svg?style=flat)](https://scrutinizer-ci.com/g/GemberPHP/serializer-symfony/code-structure)\n[![Quality Score](https://img.shields.io/scrutinizer/g/GemberPHP/serializer-symfony.svg?style=flat)](https://scrutinizer-ci.com/g/GemberPHP/serializer-symfony)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE)\n[![PHP Version](https://img.shields.io/badge/php-%5E8.3-8892BF.svg?style=flat)](http://www.php.net)\n\n[Gember Event Sourcing](https://github.com/GemberPHP/event-sourcing) Serializer adapter based on [symfony/serializer](https://github.com/symfony/serializer).\n\n\u003e All external dependencies in Gember Event Sourcing are organized into separate packages,\n\u003e making it easy to swap out a vendor adapter for another.\n\n## Installation\nInstall with Composer:\n```bash\ncomposer require gember/serializer-symfony\n```\n\n## Configuration\nBind this adapter to the `Serializer` interface in your service definitions.\n\n### Examples\n\n#### Vanilla PHP\n```php\nuse Gember\\SerializerSymfony\\SymfonySerializer;\nuse Symfony\\Component\\Serializer\\Encoder\\JsonEncoder;\nuse Symfony\\Component\\Serializer\\Normalizer\\DateTimeNormalizer;\nuse Symfony\\Component\\Serializer\\Normalizer\\ObjectNormalizer;\nuse Symfony\\Component\\Serializer\\Serializer;\n\n$serializer = new SymfonySerializer(\n    new Serializer(\n        [\n            new DateTimeNormalizer([\n                DateTimeNormalizer::FORMAT_KEY =\u003e 'Y-m-d\\TH:i:s.uP',\n            ]),\n            new ObjectNormalizer(),\n        ],\n        [\n            new JsonEncoder(),\n        ],\n    ),\n);\n```\n\n#### Symfony\nIt is recommended to use the [Symfony bundle](https://github.com/GemberPHP/event-sourcing-symfony-bundle) to configure Gember Event Sourcing.\nWith this bundle, the adapter is automatically set as the default for the Serializer.\n\nIf you're not using the bundle, you can either add the serializer to the existing stack of serializers or bind it directly to the `Serializer` interface.\n\nOption 1: Add to the existing stack of serializers:\n```yaml\nGember\\SerializerSymfony\\SymfonySerializer:\n  arguments: \n    - '@serializer' # or any other Symfony Serializer definition of your choice \n\nGember\\EventSourcing\\Util\\Serialization\\Serializer\\SerializableDomainEvent\\SerializableDomainEventSerializer: ~\n\nGember\\DependencyContracts\\Util\\Serialization\\Serializer\\Serializer:\n  class: Gember\\EventSourcing\\Util\\Serialization\\Serializer\\Stacked\\StackedSerializer\n  arguments:\n    - [\n        '@Gember\\EventSourcing\\Util\\Serialization\\Serializer\\SerializableDomainEvent\\SerializableDomainEventSerializer',\n        '@Gember\\SerializerSymfony\\SymfonySerializer' # added to stack of serializers\n    ]\n```\n\nOption 2: Bind directly to `Serializer` interface:\n```yaml\nGember\\DependencyContracts\\Util\\Serialization\\Serializer\\Serializer:\n  class: Gember\\SerializerSymfony\\SymfonySerializer\n  arguments:\n    - '@serializer' # or any other Symfony Serializer definition of your choice\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemberphp%2Fserializer-symfony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgemberphp%2Fserializer-symfony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemberphp%2Fserializer-symfony/lists"}