Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Oct 14, 2025

Allows testing of rules which delegate work to NodeCallbackInvoker

extracted from phpstan/phpstan-phpunit#238

Allows testing of rules which delegate work to NodeCallbackInvoker
@ondrejmirtes
Copy link
Member

The constructor should ask for an array of rules, DirectRegistry should be created internally.

Copy link
Member

@ondrejmirtes ondrejmirtes left a comment

Choose a reason for hiding this comment

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

A test please 😊


private DirectRegistry $registry;

public function __construct(DirectRegistry $ruleRegistry)
Copy link
Member

Choose a reason for hiding this comment

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

Constructor needs @api too

@staabm staabm marked this pull request as ready for review October 14, 2025 13:43
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit 3a21c13 into phpstan:2.1.x Oct 14, 2025
541 of 552 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the comp branch October 14, 2025 13:57
@clxmstaab clxmstaab restored the comp branch October 14, 2025 14:27
@staabm staabm deleted the comp branch October 14, 2025 14:27
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.

3 participants