Skip to content

fix: check each target in negated toUse - #1933

Open
tiagoabsantos wants to merge 8 commits into
pestphp:5.xfrom
tiagoabsantos:fix/negated-to-use
Open

tiagoabsantos wants to merge 8 commits into
pestphp:5.xfrom
tiagoabsantos:fix/negated-to-use

Conversation

@tiagoabsantos

Copy link
Copy Markdown
Contributor

What:

  • Bug Fix
  • New Feature

Description:

expect([...])->not->toUse() passed whenever any target skipped the dependency, even if another target used it. Each subject is now checked on its own, so one violating class fails the negated rule.

Related:

Fixes #1751

A skipped class in expect([...]) made the positive rule fail,
so the negation passed even when another class used the dependency.

Fixes pestphp#1751
Tiago Santos added 7 commits October 26, 2026 09:07
Negated toUse coverage adds 6 tests and 24 assertions,
so the success snapshot and parallel totals were stale.
Snapshot totals add the notToUse coverage on top of the numeric table tests from 5.x.
Snapshot totals keep the six notToUse tests and 24 assertions on top of current 5.x.
Snapshot totals keep the six notToUse tests and 24 assertions on top of current 5.x.
Keep per-subject negated toUse checks and adopt the SingleArchExpectation type from 5.x.
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.

Negated toUse with a multi-element expect([...]) is silently inert — the arch rule can never fail

1 participant