See sebastianbergmann/phpunit#6156 (comment)
In 12.0.9 PHPUnit removed the InvocationMocker classes, the PR is sebastianbergmann/phpunit@fb4df53
Current references are
-
|
class InvocationMockerDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension |
|
- stubs/InvocationMocker.stub |
|
use PHPUnit\Framework\MockObject\Builder\InvocationMocker; |
|
use PHPUnit\Framework\MockObject\Builder\InvocationMocker; |
I feel like PHPUnit\Framework\MockObject\Builder\InvocationMocker was basically replaced by PHPUnit\Framework\MockObject\InvocationStubberImplementation
Currently don't know if it will require a StubFilesExtensionLoader like this one
https://github.com/phpstan/phpstan-doctrine/blob/2.0.x/src/Stubs/Doctrine/StubFilesExtensionLoader.php
or if a there is a better strategy.
One first step would be to test this lib with phpunit 10/11 (and 12) but it's currently forbidden by the hardcoded php config
|
"phpunit/phpunit": "^9.6" |
|
}, |
|
"config": { |
|
"platform": { |
|
"php": "7.4.6" |
|
}, |
See sebastianbergmann/phpunit#6156 (comment)
In 12.0.9 PHPUnit removed the InvocationMocker classes, the PR is sebastianbergmann/phpunit@fb4df53
Current references are
phpstan-phpunit/stubs/InvocationMocker.stub
Line 10 in 0f857bf
phpstan-phpunit/src/Type/PHPUnit/InvocationMockerDynamicReturnTypeExtension.php
Line 12 in 0f857bf
phpstan-phpunit/extension.neon
Line 15 in 0f857bf
phpstan-phpunit/src/Type/PHPUnit/MockObjectDynamicReturnTypeExtension.php
Line 12 in 0f857bf
phpstan-phpunit/src/Rules/PHPUnit/MockMethodCallRule.php
Line 10 in 0f857bf
I feel like
PHPUnit\Framework\MockObject\Builder\InvocationMockerwas basically replaced byPHPUnit\Framework\MockObject\InvocationStubberImplementationCurrently don't know if it will require a StubFilesExtensionLoader like this one
https://github.com/phpstan/phpstan-doctrine/blob/2.0.x/src/Stubs/Doctrine/StubFilesExtensionLoader.php
or if a there is a better strategy.
One first step would be to test this lib with phpunit 10/11 (and 12) but it's currently forbidden by the hardcoded php config
phpstan-phpunit/composer.json
Lines 19 to 24 in 0f857bf