Skip to content

fix: bugs found while adding unit test coverage - #42

Merged
lindyhopchris merged 9 commits into
developfrom
fix/issue-40
Nov 14, 2026
Merged

lindyhopchris merged 9 commits into
developfrom
fix/issue-40

Conversation

@lindyhopchris

Copy link
Copy Markdown
Member

Fixes the bugs reported in #40. There is one commit per bug, and each commit has its own changelog entry and tests.

  1. EnqueuerContainer::bind() throws an InfrastructureException when given a string binding without a PSR container.
  2. KeyedSetOfErrors::put() and merge() sort keys case-insensitively, the same as the constructor. A private sort() method now does the sorting for all three.
  3. Meta::merge() uses array_replace(), so numeric string keys are not renumbered.
  4. Error compares the message and key against '', so it accepts '0' for both.
  5. The UuidV4 / UuidV7 version contract checks now have a message (Expecting a version 4 UUID. / Expecting a version 7 UUID.).
  6. FakeExceptionReporter rethrows once the reported count is at or past the expected count.
  7. FakeLogger::messages() only filters out null, so a message of '0' is kept.
  8. LogPushedToQueue implements QueueMiddleware instead of CommandMiddleware, and __invoke() now returns void. Anyone who type-hints against the old interface will see a small BC change.

From the additional notes:

  • FakeContainer: a binding or instance now overrides the built-in reporter, logger and unit of work. has() no longer calls get(), so it does not run the binding closure. It returns true for any bound id, even one whose binding resolves to null; get() still throws not-found in that case.
  • FakeUnitOfWork: the unreachable exception is left as it is.

composer all passes.

Closes #40

🤖 Generated with Claude Code

lindyhopchris and others added 9 commits November 14, 2026 13:45
Refs #40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…leware

Refs #40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #40

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lindyhopchris
lindyhopchris merged commit d92e755 into develop Nov 14, 2026
2 checks passed
@lindyhopchris
lindyhopchris deleted the fix/issue-40 branch November 14, 2026 13:53
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.

Bugs found while adding unit test coverage

1 participant