Support building-blocks 5.0, collection 2.4, and mapper 3.0.#5
Merged
Conversation
EventRecord now carries its identifier as a Uuid value object, so the write path converts it explicitly when binding the insert and when reporting duplicate-event conflicts. PayloadSerializers declares its element type for collection generics. Reflection payloads serialize through tiny-blocks/mapper instead of get_object_vars, resolving nested value objects, enums, and date-times and unwrapping single-property wrappers to their inner value.
Refresh the .claude rules and add commit-message, tiny-blocks-create, and tiny-blocks-consume skills along with .claude/settings.json. Replace the old .claude/CLAUDE.md with a root CLAUDE.md index, and align .gitattributes and .gitignore with the current tooling and its local config overrides.
There was a problem hiding this comment.
Pull request overview
This pull request updates the outbox library to be compatible with the latest tiny-blocks ecosystem releases (building-blocks 5.x, collection 2.4, mapper 3.x), and aligns the repository’s docs, tests, and tooling guidance with the updated APIs and conventions.
Changes:
- Bump Composer dependencies to
tiny-blocks/building-blocks:^5.0,tiny-blocks/collection:^2.4, and addtiny-blocks/mapper:^3.0. - Replace reflection payload serialization from
get_object_vars()totiny-blocks/mapperand document the new behavior. - Update tests and repo scaffolding/rules content (CLAUDE index/rules/skills, workflow naming, ignore/export-ignore lists) to match the ecosystem baseline.
Reviewed changes
Copilot reviewed 47 out of 48 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/InMemoryOutboxRepositoryTest.php | Updates unit tests to the new building-blocks event/aggregate APIs (e.g., pullEvents) and removes deprecated event-type arguments. |
| tests/Unit/InMemoryOutboxRepositoryMock.php | Adjusts mock repository behavior for new ID representation (->toString()). |
| tests/Models/RefundIssued.php | Adds eventType() required by the updated DomainEvent contract. |
| tests/Models/OrderPlaced.php | Adds eventType() required by the updated DomainEvent contract. |
| tests/Models/Order.php | Updates aggregate behavior call to the new API (pushEvent). |
| tests/Models/EventRecordFactory.php | Refactors test EventRecord creation to use the updated building-blocks factories/types (Uuid, Utc). |
| tests/Integration/DoctrineOutboxRepositoryTest.php | Updates integration tests to the new EventRecord creation API and removes deprecated revision/type wiring. |
| src/Serialization/PayloadSerializers.php | Adds/clarifies collection semantics and generics doc for serializer lookup behavior. |
| src/Serialization/PayloadSerializerReflection.php | Switches reflection serialization implementation to tiny-blocks/mapper. |
| src/Internal/OutboxInsert.php | Updates ID conversion to match new record ID type (->toString()). |
| src/DoctrineOutboxRepository.php | Updates duplicate-event error path to pass string IDs (->toString()). |
| README.md | Documents mapper-based payload serialization behavior and updated guidance for custom serializers. |
| composer.json | Bumps tiny-blocks dependencies and updates dev tooling versions (phpstan). |
| CLAUDE.md | Introduces the root CLAUDE index describing repo validation and conventions. |
| .gitignore | Aligns ignored paths with the new “.dist baseline + local overrides” tooling model. |
| .github/workflows/codeql.yml | Renames and slightly reformats the CodeQL workflow for consistency. |
| .github/workflows/ci.yml | Aligns concurrency naming with the ecosystem baseline and adjusts the test job configuration. |
| .github/copilot-instructions.md | Updates the mandatory pre-task step path to reference root CLAUDE.md. |
| .gitattributes | Updates Packagist export-ignore set to match the canonical tiny-blocks layout. |
| .claude/skills/tiny-blocks-create/SKILL.md | Adds the scaffolding skill documentation and canonical asset map. |
| .claude/skills/tiny-blocks-create/assets/github/workflows/ci.yml | Adds the canonical CI workflow asset used for scaffolding/restores. |
| .claude/skills/tiny-blocks-create/assets/github/PULL_REQUEST_TEMPLATE.md | Adds canonical PR template asset. |
| .claude/skills/tiny-blocks-create/assets/github/ISSUE_TEMPLATE/feature_request.md | Adds canonical feature request template asset. |
| .claude/skills/tiny-blocks-create/assets/github/ISSUE_TEMPLATE/bug_report.md | Adds canonical bug report template asset. |
| .claude/skills/tiny-blocks-create/assets/docs/SECURITY.md | Adds canonical security policy asset. |
| .claude/skills/tiny-blocks-create/assets/config/phpunit.xml | Adds canonical phpunit.xml asset. |
| .claude/skills/tiny-blocks-create/assets/config/phpstan.neon.dist | Adds canonical phpstan.neon.dist asset. |
| .claude/skills/tiny-blocks-create/assets/config/phpcs.xml | Adds canonical phpcs.xml asset. |
| .claude/skills/tiny-blocks-create/assets/config/Makefile | Adds canonical Makefile asset. |
| .claude/skills/tiny-blocks-create/assets/config/infection.json.dist | Adds canonical infection.json.dist asset. |
| .claude/skills/tiny-blocks-create/assets/config/composer.json | Adds canonical composer.json asset template. |
| .claude/skills/tiny-blocks-create/assets/config/.gitignore | Adds canonical .gitignore asset. |
| .claude/skills/tiny-blocks-create/assets/config/.gitattributes | Adds canonical .gitattributes asset. |
| .claude/skills/tiny-blocks-create/assets/config/.editorconfig | Adds canonical .editorconfig asset. |
| .claude/skills/tiny-blocks-consume/SKILL.md | Adds the “consume ecosystem packages” skill documentation. |
| .claude/skills/tiny-blocks-consume/scripts/refresh-catalog.py | Adds the script that rebuilds the local tiny-blocks package catalog from Packagist. |
| .claude/skills/tiny-blocks-consume/references/catalog.md | Adds the generated tiny-blocks package catalog snapshot. |
| .claude/skills/commit-message/SKILL.md | Adds the conventional-commit message formatting skill documentation. |
| .claude/settings.json | Adds Claude Code settings and permissions configuration. |
| .claude/rules/php-library-tooling.md | Updates/clarifies tooling invariants and the .dist override model. |
| .claude/rules/php-library-testing.md | Updates testing rules and exceptions (generics-only PHPDoc carve-out, white-box exception notes). |
| .claude/rules/php-library-modeling.md | Updates modeling rules and clarifies enum/value-object guidance. |
| .claude/rules/php-library-github-workflows.md | Updates workflow conventions and action pinning guidance. |
| .claude/rules/php-library-documentation.md | Updates README/docs conventions and points canonical templates to skill assets. |
| .claude/rules/php-library-commits.md | Removes the commits rule file (superseded by the commit-message skill). |
| .claude/rules/php-library-code-style.md | Updates code-style rules (named args ordering, PHPDoc rules, string formatting, etc.). |
| .claude/rules/php-library-architecture.md | Updates architecture guidance, including driver test placement conventions. |
| .claude/CLAUDE.md | Removes the old CLAUDE index file under .claude/ in favor of the root CLAUDE.md. |
The integration test bootstrap reads DATABASE_HOST and the related variables to provision and reach the MySQL container, and composer tests fails at bootstrap without them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What this pull request does.
Related issue
Closes #...
Checklist
composer reviewpasses.composer testspasses.