Skip to content

Merge EmptyDataProviderRule into 2.1.x - #352

Merged
staabm merged 1 commit into
2.1.xfrom
2.0.x
Nov 12, 2026
Merged

staabm merged 1 commit into
2.1.xfrom
2.0.x

Conversation

@staabm

@staabm staabm commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

I did not realize that #328 had a target branch of 2.0.x.. merging now into 2.1.x which is the latest release branch atm

* Report a data provider that provides no data sets

PHPUnit 10 and newer rejects a data provider that provides nothing.
PHPUnit 9 skipped the test instead.

EmptyDataProviderRule reports a provider method whose every return
statement returns an iterable that is provably empty. It skips
generators, because whether a generator yields at all depends on control
flow the rule cannot decide.

Closes #251

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* cheap checks first

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Markus Staab <maggus.staab@googlemail.com>
@staabm
staabm marked this pull request as ready for review November 12, 2026 15:26
@staabm
staabm merged commit 13cc64d into 2.1.x Nov 12, 2026
203 of 206 checks passed
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