1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Fix prophecy warnings (#4051)

* Use weirdan/prophecy-shim to avoid PHPUnit warnings on prophesize() calls

* Drop vcs repo as the package is already available on packagist

* Bump psalm/plugin-phpunit

Fixes Prophecy-related issues
This commit is contained in:
Bruce Weirdan 2020-08-25 01:02:39 +03:00 committed by Daniil Gentili
parent fd96419527
commit 1ac27d6d22
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
4 changed files with 16 additions and 3 deletions

View File

@ -47,7 +47,8 @@
"phpmyadmin/sql-parser": "5.1.0",
"phpspec/prophecy": ">=1.9.0",
"phpunit/phpunit": "^7.5.16 || ^8.5 || ^9.0",
"psalm/plugin-phpunit": "^0.10",
"psalm/plugin-phpunit": "^0.11",
"weirdan/prophecy-shim": "^1.0 || ^2.0",
"slevomat/coding-standard": "^5.0",
"squizlabs/php_codesniffer": "^3.5",
"symfony/process": "^4.3"

View File

@ -1,6 +1,7 @@
<?php
namespace Psalm\Tests\Config;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Psalm\Config;
use Psalm\Internal\PluginManager\ComposerLock;
@ -11,6 +12,8 @@ use Psalm\Internal\RuntimeCaches;
/** @group PluginManager */
class PluginListTest extends \Psalm\Tests\TestCase
{
use ProphecyTrait;
/** @var ObjectProphecy<ConfigFile> */
private $config_file;

View File

@ -1,16 +1,20 @@
<?php
namespace Psalm\Tests;
use const LIBXML_NOBLANKS;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Psalm\ErrorBaseline;
use Psalm\Exception\ConfigException;
use Psalm\Internal\Provider\FileProvider;
use Psalm\Internal\RuntimeCaches;
use const LIBXML_NOBLANKS;
class ErrorBaselineTest extends TestCase
{
use ProphecyTrait;
/** @var ObjectProphecy */
private $fileProvider;

View File

@ -1,8 +1,8 @@
<?php
namespace Psalm\Tests;
use function preg_quote;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Psalm\Internal\PluginManager\Command\DisableCommand;
use Psalm\Internal\PluginManager\Command\EnableCommand;
@ -14,11 +14,16 @@ use Symfony\Component\Console\Application;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Tester\CommandTester;
use function preg_quote;
/** @group PluginManager */
class PsalmPluginTest extends TestCase
{
use ProphecyTrait;
/** @var ObjectProphecy */
private $plugin_list;
/** @var ObjectProphecy */
private $plugin_list_factory;