Skip to content

Conversation

@lindyhopchris
Copy link
Member

Auto-wiring is implemented via attributes on the relevant classes, e.g. a command bus command can specify which commands it handles using the WithCommand attribute.

@lindyhopchris lindyhopchris self-assigned this Jan 1, 2026
@lindyhopchris lindyhopchris requested a review from Copilot January 1, 2026 17:12
Copy link

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 PR adds PSR container support across all specific container classes and implements auto-wiring functionality using PHP attributes. The changes enable dependency injection via PSR containers for handlers, publishers, enqueuers, and middleware throughout the application and infrastructure layers.

Key changes:

  • PSR container support added to all handler/publisher/enqueuer container classes
  • Auto-wiring implemented via attributes (WithCommand, WithQuery, WithEvent, Through, etc.)
  • New testing utilities (FakeContainer, FakeLogger) to support the enhanced functionality

Reviewed changes

Copilot reviewed 77 out of 77 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Toolkit/Pipeline/Through.php New attribute for declaring middleware pipelines
src/Toolkit/Pipeline/PipelineBuilder.php Updated to accept PSR containers and create PipeContainer instances
src/Toolkit/Pipeline/PipeContainer.php Added PSR container fallback for resolving pipes
src/Testing/FakeUnitOfWork.php Added counter properties for attempts, commits, and rollbacks
src/Testing/FakeLogger.php New fake logger implementation for testing
src/Testing/FakeContainer.php New PSR container implementation for testing
src/Infrastructure/Queue/*.php PSR container support and auto-wiring for queue components
src/Infrastructure/OutboundEventBus/*.php PSR container support and auto-wiring for event publishers
src/Application/Messages/HandlesMessages.php Trait for extracting middleware from handlers via attributes
src/Application/InboundEventBus/*.php PSR container support and auto-wiring for event handlers
src/Application/Bus/*.php PSR container support and auto-wiring for command/query handlers
tests/Unit/**/*.php Updated unit tests with PSR container scenarios
tests/Integration/**/*.php New integration tests demonstrating auto-wiring functionality
phpunit.xml Added integration test suite configuration
deptrac.yaml Added PSR Container layer to dependency rules
composer.json Added psr/container and symfony/polyfill-php85 dependencies
CHANGELOG.md Documented all new features

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lindyhopchris lindyhopchris merged commit 40845cc into develop Jan 1, 2026
4 checks passed
@lindyhopchris lindyhopchris deleted the feature/psr-container branch January 1, 2026 17:18
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