{"id":28545837,"url":"https://github.com/somnambulist-tech/domain","last_synced_at":"2025-10-11T20:12:10.598Z","repository":{"id":47070377,"uuid":"195473483","full_name":"somnambulist-tech/domain","owner":"somnambulist-tech","description":"A collection of entities and helpers for creating domain objects and events","archived":false,"fork":false,"pushed_at":"2025-04-12T17:14:51.000Z","size":566,"stargazers_count":26,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-16T12:43:51.130Z","etag":null,"topics":["ddd","ddd-cqrs","doctrine","domain-events","php","sf-messenger"],"latest_commit_sha":null,"homepage":null,"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/somnambulist-tech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2019-07-05T22:29:12.000Z","updated_at":"2025-09-10T11:08:32.000Z","dependencies_parsed_at":"2024-06-19T14:44:59.023Z","dependency_job_id":null,"html_url":"https://github.com/somnambulist-tech/domain","commit_stats":{"total_commits":81,"total_committers":3,"mean_commits":27.0,"dds":0.1728395061728395,"last_synced_commit":"98dd813f47d7838ac01d0dc0ba879fe0c36bc642"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/somnambulist-tech/domain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somnambulist-tech%2Fdomain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somnambulist-tech%2Fdomain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somnambulist-tech%2Fdomain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somnambulist-tech%2Fdomain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/somnambulist-tech","download_url":"https://codeload.github.com/somnambulist-tech/domain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somnambulist-tech%2Fdomain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008579,"owners_count":26084480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ddd","ddd-cqrs","doctrine","domain-events","php","sf-messenger"],"created_at":"2025-06-09T23:08:36.684Z","updated_at":"2025-10-11T20:12:10.593Z","avatar_url":"https://github.com/somnambulist-tech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Somnambulist Domain Package\n[![GitHub Actions Build Status](https://img.shields.io/github/actions/workflow/status/somnambulist-tech/domain/tests.yml?logo=github\u0026branch=master)](https://github.com/somnambulist-tech/domain/actions?query=workflow%3Atests)\n[![Issues](https://img.shields.io/github/issues/somnambulist-tech/domain?logo=github)](https://github.com/somnambulist-tech/domain/issues)\n[![License](https://img.shields.io/github/license/somnambulist-tech/domain?logo=github)](https://github.com/somnambulist-tech/domain/blob/master/LICENSE)\n[![PHP Version](https://img.shields.io/packagist/php-v/somnambulist/domain?logo=php\u0026logoColor=white)](https://packagist.org/packages/somnambulist/domain)\n[![Current Version](https://img.shields.io/packagist/v/somnambulist/domain?logo=packagist\u0026logoColor=white)](https://packagist.org/packages/somnambulist/domain)\n\nProvides a core set of support classes for building domain oriented projects. This library compiles the\npreviously separate domain and mapping libraries into a single project for easier maintenance.\n\nIt consists of:\n \n * Commands\n   * CommandBus interface / abstract command\n   * SF Messenger implementation\n * Doctrine\n   * Enumeration factories + Type bindings\n   * Additional types / type overrides for the Doctrine Type system\n   * Abstract Aggregate repository\n   * Custom Postgres DQL functions\n * Models\n   * Contracts - value object interface definitions\n   * Types - a collection of value-objects, enumerations, and date helpers\n   * AggregateRoot - an aggregate root stub implementation that can raise events\n   * AbstractEntity and AbstractEntityCollection - child entities and helper for an aggregate root\n * Events\n   * EventBus interface / abstract event\n   * SF Messenger EventBus implementation\n   * Doctrine subscriber that broadcasts onFlush all events from aggregate roots\n   * Custom serializer to handle encode/decode when the event class does not exist\n * Jobs\n   * JobQueue interface / abstract job\n   * SF Messenger implementation \n * Queries\n   * QueryBus interface / abstract query\n   * SF Messenger implementation \n * default XML mappings for embeddable objects in Doctrine .dcm.xml and Symfony .orm.xml conventions\n\n### Requirements\n\n * PHP 8.3+\n * mb_string\n * bcmath\n * beberlei/assert\n * eloquent/enumeration\n * somnambulist/collection\n * symfony/messenger for the Messenger bus implementations.\n\n### Installation\n\nInstall using composer, or checkout / pull the files from github.com.\n\n * composer require somnambulist/domain\n\n### Upgrading from 5.X to 7.X\n\nFrom 7.0 PHP 8.3+ is required, additionally, with the move to Doctrine 3.0 there are substantial differences in how\nrepositories are implemented. Instead of using custom repositories, an `AbstractAggregateRepository` has been added\nthat directly calls into Doctrine EntityManager.\n\n`AbstractModelLocator` and `AbstractServiceModelLocator` have been removed as the addition of type-hints prevented the\noverriding of findBy etc. As these were helpers, they are no longer necessary.\n\nMost model types are now read-only. Several have been changed to native enums (`DistanceUnit`, `AreaUnit`).\n\nCommands and Jobs are now read-only classes. Queries are still writable to keep the meta-data and include support.\n\n### Upgrading from 4.X to 5.X\n\nFrom 5.X this project will be re-namespaced to drop `Domain`. 4.X includes a `classmap.php` providing\naliases for backwards compatibility.\n\nFrom 5.0 the QueryBus supports typed response objects. This is an optional feature that provides a built-in \nmechanism to handle failed queries without trapping exceptions in the calling code.\n\nFrom 5.0 domain event names are always generated at construction time as `snake_case`.\n\n### Upgrading from 3.X to 4.X\n\nFrom 4.X this project was re-namespaced to `Somnambulist\\Components\\Domain`. Update all references to\nreflect this change this includes any Doctrine mapping files / annotations.\n\nThe Doctrine `AbstractIdentityType` was moved out of the `Identity` namespace to the main `Types`.\n\n### Usage\n\nSee the docs folder for more documentation on each component.\n\n * [Aggregate Root](docs/aggregate-root.md)\n * [Domain Events](docs/domain-events.md)\n * [Value Objects](docs/value-objects.md)\n * [Enumerations](docs/enumerations.md)\n * [Enumeration Bridge](docs/doctrine-enum-bridge.md)\n * [Doctrine Mapping](docs/doctrine-mappings.md)\n * [Symfony Messenger Integration](docs/messenger.md)\n * [Using Command Query Separation](docs/cqrs.md)\n\n### Links\n\n * [Doctrine](http://doctrine-project.org)\n * [API Bundle](https://github.com/somnambulist-tech/api-bundle)\n * [API Client](https://github.com/somnambulist-tech/api-client)\n * [Collection](https://github.com/somnambulist-tech/collection)\n * [Form Requests](https://github.com/somnambulist-tech/form-request-bundle)\n * [Read-Models](https://github.com/somnambulist-tech/read-models)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomnambulist-tech%2Fdomain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomnambulist-tech%2Fdomain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomnambulist-tech%2Fdomain/lists"}