Skip to content

fix: static analysis of methods chained on describe() - #1838

Open
lazerg wants to merge 1 commit into
pestphp:5.xfrom
lazerg:fix/issue-1837-describe-call-mixin
Open

fix: static analysis of methods chained on describe()#1838
lazerg wants to merge 1 commit into
pestphp:5.xfrom
lazerg:fix/issue-1837-describe-call-mixin

Conversation

@lazerg

@lazerg lazerg commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

What:

  • Bug Fix
  • New Feature

Description:

On PHPStan level 2, describe('...', fn () => ...)->skip(...) and ->with(...) are reported as calls to undefined methods on Pest\PendingCalls\DescribeCall, even though both work at runtime.

DescribeCall::__call() forwards to BeforeEachCall, which is already annotated with @mixin TestCall, so the methods exist for real, there is just nothing telling static analysis about them one level up. This adds the same annotation to DescribeCall.

Related:

Fixes #1837

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.

[Bug]: pest-plugin-phpstan undefined method skip/with in Pest\PendingCalls\DescribeCall

1 participant