{"id":37235590,"url":"https://github.com/mmp4k/proophgen","last_synced_at":"2026-01-16T04:51:21.134Z","repository":{"id":57041628,"uuid":"108172760","full_name":"mmp4k/proophgen","owner":"mmp4k","description":"Easy way to start your prooph project.","archived":false,"fork":false,"pushed_at":"2017-11-04T21:02:05.000Z","size":79,"stargazers_count":8,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-19T18:16:23.330Z","etag":null,"topics":["boilerplate-generator","cqrs","cqrs-es","php","phpspec","prooph"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmp4k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-24T19:20:20.000Z","updated_at":"2019-08-05T10:41:11.000Z","dependencies_parsed_at":"2022-08-23T23:30:29.478Z","dependency_job_id":null,"html_url":"https://github.com/mmp4k/proophgen","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/mmp4k/proophgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmp4k%2Fproophgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmp4k%2Fproophgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmp4k%2Fproophgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmp4k%2Fproophgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmp4k","download_url":"https://codeload.github.com/mmp4k/proophgen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmp4k%2Fproophgen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["boilerplate-generator","cqrs","cqrs-es","php","phpspec","prooph"],"created_at":"2026-01-15T04:03:26.855Z","updated_at":"2026-01-15T04:03:27.366Z","avatar_url":"https://github.com/mmp4k.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [proophgen](https://pilsniak.com/proophgen/)\n\n[![GitHub (Pre-)Release Date](https://img.shields.io/github/release-date-pre/mmp4k/proophgen.svg?style=flat-square)]()\n[![Travis](https://img.shields.io/travis/mmp4k/proophgen.svg?style=flat-square)]()\n[![Coveralls github](https://img.shields.io/coveralls/github/mmp4k/proophgen.svg?style=flat-square)]()\n[![Packagist](https://img.shields.io/packagist/v/pilsniak/proophgen.svg?style=flat-square)]()\n[![GitHub release](https://img.shields.io/github/release/mmp4k/proophgen/all.svg?style=flat-square)]()\n[![Packagist](https://img.shields.io/packagist/l/pilsniak/proophgen.svg?style=flat-square)]()\n[![GitHub last commit](https://img.shields.io/github/last-commit/mmp4k/proophgen.svg?style=flat-square)]()\n\nWhy developers love CRUD? Because it's easy to automate work around it. Why developers hate DDD/CQRS? Boilerplates.\n\nUsing this small app `proophgen` and single 15th lines `yaml` file you can generate a project that contains **48 files** (with phpspec tests!) and start coding. No more boilerplates.\n\nYou can also use singe command to create your ValueObject, Command and AggregateRoot with Events.\n\n## Table of Contents \n\n* [Examples](#examples)  \n* [Create single ValueObject](#create-single-valueobject)\n* [Create single Command](#create-single-command)\n* [Create single AggregateRoot with Events](#create-single-aggregateroot-with-events)\n* [Id Policy](#id-policy)  \n* [Installation](#installation)\n\n## Examples\n\nThis is your `yaml`\n\n```\nidPolicy: Ramsey\\Uuid\\UuidInterface # or string (default value)\nvalueObjects:\n  - Model\\ValueObject\\Mail\n  - Model\\ValueObject\\Name\n  - Model\\ValueObject\\Password\ncommands:\n  - Model\\Command\\RegisterUser\n  - Model\\Command\\LoginUser\naggregateRoots:\n  Model\\User:\n    - !UserRegistered\n  Model\\Identity:\n    - !EmailIdentityCreated\n    - UserToIdentityAssigned\n    - UserLogged\n```\n\nThere is your command to run:\n\n```\n$ proophgen do\n```\n\nAnd there is your result (since v0.1.10):\n\n```\n./src/Infrastructure/Identity/EventSourced.php                                                                                                      ✔  2042  21:06:28 \n./src/Infrastructure/Identity/InMemory.php\n./src/Infrastructure/User/EventSourced.php\n./src/Infrastructure/User/InMemory.php\n./src/Model/Command/LoginUser.php\n./src/Model/Command/RegisterUser.php\n./src/Model/CommandHandler/LoginUserHandler.php\n./src/Model/CommandHandler/RegisterUserHandler.php\n./src/Model/Identity/Event/EmailIdentityCreated.php\n./src/Model/Identity/Event/UserLogged.php\n./src/Model/Identity/Event/UserToIdentityAssigned.php\n./src/Model/Identity/Exception/IdentityNotFound.php\n./src/Model/Identity/Guard/EmailIdentityCreatedGuard.php\n./src/Model/Identity/Guard/UserLoggedGuard.php\n./src/Model/Identity/Guard/UserToIdentityAssignedGuard.php\n./src/Model/Identity.php\n./src/Model/IdentityRepository.php\n./src/Model/User/Event/UserRegistered.php\n./src/Model/User/Exception/UserNotFound.php\n./src/Model/User/Guard/UserRegisteredGuard.php\n./src/Model/User.php\n./src/Model/UserRepository.php\n./src/Model/ValueObject/Mail.php\n./src/Model/ValueObject/Name.php\n./src/Model/ValueObject/Password.php\n./spec/Infrastructure/Identity/EventSourcedSpec.php\n./spec/Infrastructure/Identity/InMemorySpec.php\n./spec/Infrastructure/User/EventSourcedSpec.php\n./spec/Infrastructure/User/InMemorySpec.php\n./spec/Model/Command/LoginUserSpec.php\n./spec/Model/Command/RegisterUserSpec.php\n./spec/Model/CommandHandler/LoginUserHandlerSpec.php\n./spec/Model/CommandHandler/RegisterUserHandlerSpec.php\n./spec/Model/Identity/Event/EmailIdentityCreatedSpec.php\n./spec/Model/Identity/Event/UserLoggedSpec.php\n./spec/Model/Identity/Event/UserToIdentityAssignedSpec.php\n./spec/Model/Identity/Exception/IdentityNotFoundSpec.php\n./spec/Model/Identity/Guard/EmailIdentityCreatedGuardSpec.php\n./spec/Model/Identity/Guard/UserLoggedGuardSpec.php\n./spec/Model/Identity/Guard/UserToIdentityAssignedGuardSpec.php\n./spec/Model/IdentitySpec.php\n./spec/Model/User/Event/UserRegisteredSpec.php\n./spec/Model/User/Exception/UserNotFoundSpec.php\n./spec/Model/User/Guard/UserRegisteredGuardSpec.php\n./spec/Model/UserSpec.php\n./spec/Model/ValueObject/MailSpec.php\n./spec/Model/ValueObject/NameSpec.php\n./spec/Model/ValueObject/PasswordSpec.php\n```\n\n## Create single ValueObject\n\nYou need to run that command:\n\n```\nproophgen vo Model/ValueObject/FirstName\n```\n\nAs a result you should to see something similar to:\n\n```\nCreating files:\n[v] ./src/Model/ValueObject/FirstName.php\n[v] ./spec/Model/ValueObject/FirstNameSpec.php\n```\n\n## Create single Command\n\nYou need to run that command:\n\n```\nproophgen c Model/Command/RemoveUser \n```\n\nAs a result you should to see something similar to:\n\n```\nCreating files:\n[v] ./src/Model/Command/RemoveUser.php\n[v] ./src/Model/CommandHandler/RemoveUserHandler.php\n[v] ./spec/Model/Command/RemoveUserSpec.php\n[v] ./spec/Model/CommandHandler/RemoveUserHandlerSpec.php\n```\n\n## Create single AggregateRoot with Events\n\nYou need to run that command:\n\n```\nproophgen ar Model/Admin \\!AdminCreated AdminRemoved AdminBlocked  \n```\n\nAs a result you should to see something similar to:\n\n```\nCreating files:\n[v] ./src/Model/Admin.php\n[v] ./src/Model/AdminRepository.php\n[v] ./src/Model/Admin/Exception/AdminNotFound.php\n[v] ./src/Model/Admin/Event/AdminCreated.php\n[v] ./src/Model/Admin/Guard/AdminCreatedGuard.php\n[v] ./src/Model/Admin/Event/AdminRemoved.php\n[v] ./src/Model/Admin/Guard/AdminRemovedGuard.php\n[v] ./src/Model/Admin/Event/AdminBlocked.php\n[v] ./src/Model/Admin/Guard/AdminBlockedGuard.php\n[v] ./src/Infrastructure/Admin/InMemory.php\n[v] ./src/Infrastructure/Admin/EventSourced.php\n[v] ./spec/Model/AdminSpec.php\n[v] ./spec/Infrastructure/Admin/EventSourcedSpec.php\n[v] ./spec/Model/Admin/Exception/AdminNotFoundSpec.php\n[v] ./spec/Infrastructure/Admin/InMemorySpec.php\n[v] ./spec/Model/Admin/Event/AdminCreatedSpec.php\n[v] ./spec/Model/Admin/Guard/AdminCreatedGuardSpec.php\n[v] ./spec/Model/Admin/Event/AdminRemovedSpec.php\n[v] ./spec/Model/Admin/Guard/AdminRemovedGuardSpec.php\n[v] ./spec/Model/Admin/Event/AdminBlockedSpec.php\n[v] ./spec/Model/Admin/Guard/AdminBlockedGuardSpec.php\n```\n## Id Policy\n\nAs default `proophgen` generates all ids as string. If you wish you can change it just running this variant of previous commands:\n\nFor aggregate root:\n\n```\nproophgen ar --id-policy=\"Ramsey\\Uuid\\UuidInterface\" Model/Admin \\!AdminCreated AdminRemoved AdminBlocked\n```\n\nFor command:\n\n```\nproophgen c --id-policy=\"Ramsey\\Uuid\\UuidInterface\" Model/Command/RemoveUser \n```\n\n## Installation\n\nThere is a few way to use `proophgen`\n\n### 1. You can download .phar file\n\nGo to [releases page on github](https://github.com/mmp4k/proophgen/releases) and download `proophgen.phar`.\n\n```\nmv ~/Downloads/proophgen.phar /usr/local/bin/proophgen\nchmod +x /usr/local/bin/proophgen\n```\n\n### 2. You can use docker\n\nJust run that command:\n\n```\ndocker run -v $(pwd):/var/www proophgen/proophgen \n```\n\n### 3. Composer (not recommended)\n\nYou can add `proophgen` directly to your project as `dev` dependency but then your project and `proophgen` will be sharing a whole dependencies and some conflicts can happened.\n\n```\ncomposer require --dev pilsniak/proophgen\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmp4k%2Fproophgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmp4k%2Fproophgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmp4k%2Fproophgen/lists"}