{"id":18376426,"url":"https://github.com/cycle/entity-behavior","last_synced_at":"2025-08-20T04:32:05.242Z","repository":{"id":43886860,"uuid":"413955615","full_name":"cycle/entity-behavior","owner":"cycle","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-09T11:47:51.000Z","size":133,"stargazers_count":9,"open_issues_count":6,"forks_count":6,"subscribers_count":4,"default_branch":"1.x","last_synced_at":"2024-12-13T21:49:49.465Z","etag":null,"topics":["hacktoberfest"],"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/cycle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"cycle"}},"created_at":"2021-10-05T19:37:59.000Z","updated_at":"2024-12-08T19:32:07.000Z","dependencies_parsed_at":"2024-11-06T00:37:01.777Z","dependency_job_id":null,"html_url":"https://github.com/cycle/entity-behavior","commit_stats":{"total_commits":24,"total_committers":4,"mean_commits":6.0,"dds":"0.33333333333333337","last_synced_commit":"60cc56f96f719a459636d9ff596b58defff7a0b0"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fentity-behavior","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fentity-behavior/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fentity-behavior/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cycle%2Fentity-behavior/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cycle","download_url":"https://codeload.github.com/cycle/entity-behavior/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230394228,"owners_count":18218707,"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":["hacktoberfest"],"created_at":"2024-11-06T00:23:17.870Z","updated_at":"2025-08-20T04:32:05.237Z","avatar_url":"https://github.com/cycle.png","language":"PHP","funding_links":["https://github.com/sponsors/cycle"],"categories":[],"sub_categories":[],"readme":"# Cycle ORM Entity Behavior\n[![Latest Stable Version](https://poser.pugx.org/cycle/entity-behavior/version)](https://packagist.org/packages/cycle/entity-behavior)\n[![Build Status](https://github.com/cycle/entity-behavior/workflows/build/badge.svg)](https://github.com/cycle/entity-behavior/actions)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/cycle/entity-behavior/badges/quality-score.png?b=1.x)](https://scrutinizer-ci.com/g/cycle/entity-behavior/?branch=1.x)\n[![Codecov](https://codecov.io/gh/cycle/entity-behavior/graph/badge.svg)](https://codecov.io/gh/cycle/entity-behavior)\n\u003ca href=\"https://discord.gg/TFeEmCs\"\u003e\u003cimg src=\"https://img.shields.io/badge/discord-chat-magenta.svg\"\u003e\u003c/a\u003e\n\nThe package provides a collection of attributes that add behaviors to Cycle ORM entities. It also provides a convenient\nAPI to create custom behavior attributes.\n\n## Installation\n\nThe package is available via composer and can be installed using the following command:\n\n```bash\ncomposer require cycle/entity-behavior\n```\n\n## Configuration\n\nAfter installation the package you need to create `Cycle\\ORM\\ORM` object with\npassing `\\Cycle\\ORM\\Entity\\Behavior\\EventDrivenCommandGenerator` generator object as third (`commandGenerator`)\nargument.\n\n**Example**\n\n```php\nuse Cycle\\ORM\\ORM;\nuse Cycle\\ORM\\Entity\\Behavior\\EventDrivenCommandGenerator;\n\n// Application container (PSR-11 compatible).\n// https://www.php-fig.org/psr/psr-11/\n$container = new Container();\n$commandGenerator = new EventDrivenCommandGenerator($schema, $container);\n\n$orm = new ORM(\n    factory: $factory,\n    schema: $schema,\n    commandGenerator: $commandGenerator,\n);\n```\n\nThat's it. Now you can use all benefits of this package.\n\n### Available behaviors\n\n- [UUID](https://cycle-orm.dev/docs/entity-behaviors-uuid)\n- [CreatedAt and UpdatedAt](https://cycle-orm.dev/docs/entity-behaviors-timestamps)\n- [SoftDelete](https://cycle-orm.dev/docs/entity-behaviors-soft-delete)\n- [OptimisticLock](https://cycle-orm.dev/docs/entity-behaviors-optimistic-lock)\n- [Hook](https://cycle-orm.dev/docs/entity-behaviors-hooks)\n- [EventListener](https://cycle-orm.dev/docs/entity-behaviors-event-listener)\n\n## License:\n\nThe MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained\nby [Spiral Scout](https://spiralscout.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcycle%2Fentity-behavior","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcycle%2Fentity-behavior","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcycle%2Fentity-behavior/lists"}