Skip to content

Commit

Permalink
Only use legacy stub file for old versions of PHPUnit
Browse files Browse the repository at this point in the history
Fixes #86
  • Loading branch information
muglug authored Aug 30, 2020
1 parent d3f5c00 commit 4d82449
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class Plugin implements PluginEntryPointInterface
/** @return void */
public function __invoke(RegistrationInterface $psalm, SimpleXMLElement $config = null): void
{
$psalm->addStubFile(__DIR__ . '/../stubs/Assert_75.phpstub');
if (VersionUtils::packageVersionIs('phpunit/phpunit', '<', '8.0')) {
$psalm->addStubFile(__DIR__ . '/../stubs/Assert_75.phpstub');
}
$psalm->addStubFile(__DIR__ . '/../stubs/TestCase.phpstub');
$psalm->addStubFile(__DIR__ . '/../stubs/MockBuilder.phpstub');
$psalm->addStubFile(__DIR__ . '/../stubs/InvocationMocker.phpstub');
Expand Down

0 comments on commit 4d82449

Please sign in to comment.