{"id":14983899,"url":"https://github.com/rekalogika/reconstitutor","last_synced_at":"2025-04-10T19:41:34.443Z","repository":{"id":192246300,"uuid":"686661914","full_name":"rekalogika/reconstitutor","owner":"rekalogika","description":"Provides a thin layer that sits above Doctrine events to help you reconstitute/hydrate your entities. It lets you augment Doctrine's hydration with your logic in a concise and expressive class.","archived":false,"fork":false,"pushed_at":"2025-03-17T09:18:30.000Z","size":63,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T17:21:17.635Z","etag":null,"topics":["doctrine","hydration","php","reconstitution","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"https://rekalogika.dev/reconstitutor","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/rekalogika.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},"funding":{"github":"priyadi"}},"created_at":"2023-09-03T14:39:40.000Z","updated_at":"2024-09-21T05:57:02.000Z","dependencies_parsed_at":"2023-09-03T18:01:54.796Z","dependency_job_id":"ae826b04-3018-49f9-a78f-743ec76da9c2","html_url":"https://github.com/rekalogika/reconstitutor","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":"0.17391304347826086","last_synced_commit":"5de34227154c2324314372c23cf3b6d068ff1d1c"},"previous_names":["rekalogika/reconstitutor"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalogika%2Freconstitutor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalogika%2Freconstitutor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalogika%2Freconstitutor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rekalogika%2Freconstitutor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rekalogika","download_url":"https://codeload.github.com/rekalogika/reconstitutor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281415,"owners_count":21077423,"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","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":["doctrine","hydration","php","reconstitution","symfony","symfony-bundle"],"created_at":"2024-09-24T14:08:08.817Z","updated_at":"2025-04-10T19:41:34.425Z","avatar_url":"https://github.com/rekalogika.png","language":"PHP","funding_links":["https://github.com/sponsors/priyadi"],"categories":[],"sub_categories":[],"readme":"# rekalogika/reconstitutor\n\nThis library provides a thin layer that sits above Doctrine events to help you\nreconstitute/hydrate your entities. It lets you augment Doctrine's hydration\nwith your logic in a concise and expressive class.\n\nAfter Doctrine hydrates an object from the database, this framework gives you\nthe control to hydrate additional properties not handled by Doctrine, without\nhaving to deal with the peculiarities of Doctrine events and Unit of Work. Then,\nafter Doctrine persists the changes to the database, it lets you do similarly\nwith the properties.\n\nThe most common case of this type of tasks is for handling file uploads, of\nwhich many specialized libraries have already been written. But plenty of other\ncases exist:\n\n* A lazy-loading proxy that fetches the real resource using an API call.\n* Linking objects that are managed by different object managers, or non-Doctrine\n  entities.\n\nThese days we usually call the process *hydration*. *Reconstitution* is the term\nused by Eric Evans in *\"Domain-Driven Design: Tackling Complexity in the Heart of\nSoftware\"*.\n\n## Features\n\n* Simple declaration in a class. You can create a reconstitutor class to handle\n  the reconstitution of a specific entity class, entities that implement a\n  specific interface, entities in a class hierarchy, or those with a specific\n  PHP attribute.\n* Our abstract classes provide `get()` and `set()` methods as a convenience.\n  They let you work with the properties directly, bypassing getters and setters.\n  It is the best practice in reconstitutions as it frees you to have business\n  logic in the getters and setters.\n* The `get()` and `set()` methods are forwarders to a custom implementation of\n  Symfony's `PropertyAccessorInterface`. Therefore, you can use the same\n  exceptions defined in `PropertyAccessorInterface`.\n* It has what we think is the correct behavior. It asks your reconstitutor to\n  save only after Doctrine has successfully saved the object. It doesn't rely on\n  Doctrine seeing the object being dirty before `flush()`-ing. i.e. your\n  entities don't have to modify a Doctrine-managed property —like\n  `$lastUpdated`— just to make sure the correct Doctrine event will be fired.\n\n## Documentation\n\n[rekalogika.dev/reconstitutor](https://rekalogika.dev/reconstitutor)\n\n## License\n\nMIT\n\n## Contributing\n\nIssues and pull requests should be filed in the GitHub repository\n[rekalogika/reconstitutor](https://github.com/rekalogika/reconstitutor).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frekalogika%2Freconstitutor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frekalogika%2Freconstitutor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frekalogika%2Freconstitutor/lists"}