Skip to content

Support building-blocks 5.0, collection 2.4, and mapper 3.0.#5

Merged
gustavofreze merged 4 commits into
mainfrom
feature/mapper
Jun 6, 2026
Merged

Support building-blocks 5.0, collection 2.4, and mapper 3.0.#5
gustavofreze merged 4 commits into
mainfrom
feature/mapper

Conversation

@gustavofreze
Copy link
Copy Markdown
Member

Please follow the contributing guidelines.

Summary

What this pull request does.

Related issue

Closes #...

Checklist

  • Tests added or updated.
  • Documentation updated when applicable.
  • composer review passes.
  • composer tests passes.

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.
Copilot AI review requested due to automatic review settings June 6, 2026 14:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 add tiny-blocks/mapper:^3.0.
  • Replace reflection payload serialization from get_object_vars() to tiny-blocks/mapper and 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.

Comment thread .github/workflows/ci.yml
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.
@gustavofreze gustavofreze merged commit 18f7374 into main Jun 6, 2026
6 checks passed
@gustavofreze gustavofreze deleted the feature/mapper branch June 6, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants