You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected errors with willReturn called on with #299
28 Call to an undefined method PHPUnit\Framework\MockObject\InvocationStubber::with().
🪪 method.notFound
Packages which are installed related to PHPUnit:
phpspec/prophecy-phpunit 2.5.0 Integrating the Prophecy mocking library in PHPUnit test cases
phpstan/phpstan-phpunit 2.0.16 PHPUnit extensions and rules for PHPStan
phpunit/php-code-coverage 14.1.9 Library that provides collection, processing, and rendering functionality for PHP code covera...
phpunit/php-file-iterator 7.0.0 FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-invoker 7.0.0 Invoke callables with a timeout
phpunit/php-text-template 6.0.0 Simple template engine.
phpunit/php-timer 9.0.0 Utility class for timing
phpunit/phpunit 13.1.13 The PHP Unit Testing framework.
symfony/phpunit-bridge 7.4.8 Provides utilities for PHPUnit, especially user deprecation notices management
changed the title [-]Unexpected errors with PHPStan 2.2.0 with `willReturn` called on `with`:[/-][+]Unexpected errors with `willReturn` called on `with`[/+]on May 28, 2026
Activity
VincentLanglet commentedon May 28, 2026
Are you sure that only PHPStan was bump ? Not the extension ? Not Phpunit ?
Also it make me think of
with*()can be used withoutexpects()sebastianbergmann/phpunit#6504with*()withoutexpects()sebastianbergmann/phpunit#6507with()withoutexpects()sebastianbergmann/phpunit#6508So using
withon a mock withoutexpectis/will be wrongalexander-schranz commentedon May 28, 2026
@VincentLanglet you are right seems not the PHPStan 2.2.0 release, unsure which package it is.
[-]Unexpected errors with PHPStan 2.2.0 with `willReturn` called on `with`:[/-][+]Unexpected errors with `willReturn` called on `with`[/+]