Restructure repository to match tiny-blocks library standards.#3
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR restructures the repository to align with tiny-blocks library conventions while simplifying the outbox model by removing snapshot support and renaming aggregate sequencing to aggregate versioning.
Changes:
- Remove snapshot serialization and related schema/exception surface, focusing the outbox on payload + aggregate version.
- Rename
sequenceNumber→aggregateVersionthroughout core code, tests, schema, and docs. - Standardize tooling/configuration (PHPUnit/PHPStan/PHPCS, reports paths, GitHub workflows, templates).
Reviewed changes
Copilot reviewed 66 out of 67 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/bootstrap.php | Update bootstrap import to integration test database namespace. |
| tests/Unit/OrderPlacedSerializer.php | Move serializer fixture into Unit namespace. |
| tests/Unit/InvalidPayloadSerializer.php | Move serializer fixture into Unit namespace. |
| tests/Unit/InMemoryOutboxRepositoryTest.php | Update tests to aggregate versioning and remove snapshot paths. |
| tests/Unit/InMemoryOutboxRepositoryMock.php | Remove snapshot serializer dependency; switch duplicate detection to aggregate versions. |
| tests/Unit/DriverExceptionStub.php | Move DBAL driver exception stub into Unit namespace. |
| tests/Models/Order.php | Remove snapshot state override in test aggregate fixture. |
| tests/Models/EventRecordFactory.php | Update factory to new EventRecord shape (aggregateVersion/occurredAt/eventType). |
| tests/Mocks/InvalidSnapshotSerializer.php | Remove snapshot serializer test double. |
| tests/Mocks/CustomOrderSnapshotSerializer.php | Remove snapshot serializer test double. |
| tests/Integration/RefundIssuedSerializer.php | Move serializer fixture into Integration namespace. |
| tests/Integration/OutboxTableFactory.php | Update integration DDL for new schema and unique constraint (aggregate version). |
| tests/Integration/IntegrationTestCase.php | Move integration base test case into Integration namespace. |
| tests/Integration/FallbackOrderPlacedSerializer.php | Move fallback serializer fixture into Integration namespace. |
| tests/Integration/DoctrineOutboxRepositoryTest.php | Update integration tests to new constructor arg (serializers) and aggregate versioning; remove snapshot cases. |
| tests/Integration/Database.php | Move integration database helper into Integration namespace. |
| src/Serialization/SnapshotSerializers.php | Remove snapshot serializers collection. |
| src/Serialization/SnapshotSerializerReflection.php | Remove reflection snapshot serializer. |
| src/Serialization/SnapshotSerializer.php | Remove snapshot serializer interface. |
| src/Serialization/SerializedSnapshot.php | Remove serialized snapshot value object and validation exception path. |
| src/Serialization/SerializedPayload.php | Clarify payload factories (fromArray encodes; from validates raw JSON). |
| src/Serialization/PayloadSerializers.php | Add PHPDoc describing selection semantics. |
| src/Serialization/PayloadSerializer.php | Adjust interface doc wording. |
| src/Schema/UniqueConstraint.php | Rename default constraint to aggregate-version unique constraint. |
| src/Schema/TableLayout.php | Add/expand PHPDoc and reorder builder/default helpers. |
| src/Schema/IdentityColumnType.php | Add PHPDoc for identity column conversion. |
| src/Schema/Columns.php | Remove snapshot column; rename sequenceNumber to aggregateVersion. |
| src/OutboxRepository.php | Update public contract throws to aggregate versioning and remove snapshot exceptions. |
| src/Internal/OutboxInsert.php | Remove snapshot binding; insert aggregate version and payload only. |
| src/Internal/ColumnsBuilder.php | Remove snapshot column builder; add aggregateVersion builder. |
| src/Exceptions/SnapshotSerializerNotConfigured.php | Remove snapshot-related exception. |
| src/Exceptions/PayloadSerializerNotConfigured.php | Replace constructor with named constructor-style factory. |
| src/Exceptions/OutboxRequiresActiveTransaction.php | Expand factory method doc and formatting. |
| src/Exceptions/InvalidSnapshotJson.php | Remove snapshot JSON exception. |
| src/Exceptions/InvalidPayloadJson.php | Rename factory method and tighten message format. |
| src/Exceptions/DuplicateOutboxEvent.php | Adjust message formatting and add docs. |
| src/Exceptions/DuplicateAggregateVersion.php | Introduce new exception for aggregate version collisions. |
| src/Exceptions/DuplicateAggregateSequence.php | Remove old sequence-based collision exception. |
| src/DoctrineOutboxRepository.php | Remove snapshot serializer support; rename ctor arg to serializers; map unique constraint violations to aggregate version. |
| phpunit.xml | Tighten PHPUnit flags and move all report paths under reports/. |
| phpstan.neon.dist | Raise to level: max, include tests, and scope ignores with identifiers. |
| phpcs.xml | Add canonical PHPCS ruleset file. |
| infection.json.dist | Move Infection log/tmp paths under reports/. |
| composer.json | Update dependencies + scripts to tiny-blocks library standards. |
| SECURITY.md | Add standard security policy file. |
| README.md | Update docs for new schema + aggregate versioning and remove snapshot docs. |
| Makefile | Align targets to canonical composer scripts and reports/ paths. |
| .github/workflows/codeql.yml | Rename workflow and add concurrency/timeout. |
| .github/workflows/ci.yml | Rename resolve job and rewire downstream needs/output references. |
| .github/workflows/auto-assign.yml | Add concurrency/timeout and rename job. |
| .github/copilot-instructions.md | Rephrase project context and clarify rule-file scope. |
| .github/PULL_REQUEST_TEMPLATE.md | Add canonical PR template. |
| .github/ISSUE_TEMPLATE/feature_request.md | Add canonical feature request template. |
| .github/ISSUE_TEMPLATE/bug_report.md | Add canonical bug report template. |
| .gitattributes | Align wording and export-ignore dev artifacts (reports/, .phpunit.cache). |
| .editorconfig | Enforce 120 char line length. |
| .claude/rules/php-library-tooling.md | Add canonical tooling rules and reference config shapes. |
| .claude/rules/php-library-testing.md | Expand PHPUnit/BDD conventions and strict testing rules. |
| .claude/rules/php-library-modeling.md | Expand modeling rules, nomenclature, and exception guidance. |
| .claude/rules/php-library-github-workflows.md | Add canonical GitHub workflow conventions. |
| .claude/rules/php-library-documentation.md | Add canonical README/docs standards and templates. |
| .claude/rules/php-library-commits.md | Add Conventional Commits guidance. |
| .claude/rules/php-library-code-style.md | Expand code-style rules (PHPDoc, naming, chaining, formatting overrides). |
| .claude/rules/php-library-architecture.md | Add canonical architecture and public/internal boundary rules. |
| .claude/rules/github-workflows.md | Remove old workflow rules file. |
| .claude/CLAUDE.md | Replace project overview with rule index and scoping guidance. |
…in phpstan.neon.dist.
…in phpstan.neon.dist.
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.
No description provided.