Skip to content

Conversation

@tyrsson
Copy link
Owner

@tyrsson tyrsson commented Aug 18, 2025

No description provided.

Signed-off-by: Joey Smith <jsmith@webinertia.net>

Signed-off-by: Joey Smith <jsmith@webinertia.net>
@tyrsson tyrsson added this to the 0.1.0 milestone Aug 18, 2025
@tyrsson tyrsson self-assigned this Aug 18, 2025
Copilot AI review requested due to automatic review settings August 18, 2025 13:13
@tyrsson tyrsson added enhancement New feature or request phpstan Static Analysis priority: high labels Aug 18, 2025
@tyrsson tyrsson merged commit 920fcc4 into tyrsson:0.1.x Aug 18, 2025
9 checks passed
@tyrsson tyrsson deleted the middlewarepipe-test branch August 18, 2025 13:14
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 comprehensive unit tests for the MiddlewarePipe class, providing test coverage for a command bus middleware pipeline implementation. The tests cover interface compliance, pipeline functionality, middleware execution order, and various edge cases.

  • Adds complete test suite for MiddlewarePipe class with 20 test methods
  • Tests middleware pipeline operations including adding middleware, handling commands, and processing through the pipeline
  • Validates proper execution order, cloning behavior, and support for various return types

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

$middleware1 = new class ($executionOrder) implements MiddlewareInterface {
/** @param array<string> $executionOrder */
public function __construct(
/** @phpstan-ignore property.onlyWritten */
Copy link

Copilot AI Aug 18, 2025

Choose a reason for hiding this comment

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

The PHPStan ignore comment is incorrect - the property is being read in the process method on line 177. This suppression should be removed as it's suppressing a non-existent issue.

Suggested change
/** @phpstan-ignore property.onlyWritten */

Copilot uses AI. Check for mistakes.
/** @param array<string> $executionOrder */
public function __construct(
/** @phpstan-ignore property.onlyWritten */
private array &$executionOrder
Copy link

Copilot AI Aug 18, 2025

Choose a reason for hiding this comment

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

The PHPStan ignore comment is incorrect - the property is being read in the process method on line 192. This suppression should be removed as it's suppressing a non-existent issue.

Suggested change
private array &$executionOrder
private array &$executionOrder

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request phpstan Static Analysis priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant