From 0ec0b34a0ce4d59794a3bdfc5354b761f4464be2 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 6 Feb 2019 12:23:31 +0100 Subject: [PATCH] allow PHPUnit 8 --- ecs.yml | 1 + phpstan.neon | 1 + tests/AbstractContainerAwareTestCase.php | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ecs.yml b/ecs.yml index c663d5aacea..253d83bcd7f 100644 --- a/ecs.yml +++ b/ecs.yml @@ -137,6 +137,7 @@ parameters: # 3rd party parent code - 'src/DependencyInjection/Loader/TolerantRectorYamlFileLoader.php' - 'src/PhpParser/Printer/BetterStandardPrinter.php' + - 'tests/AbstractContainerAwareTestCase.php' Symplify\CodingStandard\Sniffs\Debug\CommentedOutCodeSniff.Found: # notes diff --git a/phpstan.neon b/phpstan.neon index cdaf990284e..aec543f1e6e 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -108,3 +108,4 @@ parameters: - '#Parameter \#1 \$nodes of method Rector\\PhpParser\\Node\\BetterNodeFinder\:\:find\(\) expects array\|PhpParser\\Node, array\|null given#' - '#Method Rector\\NetteToSymfony\\Rector\\RouterListToControllerAnnotationsRector\:\:resolveAssignRouteNodes\(\) should return array but returns array#' + - '#PHPDoc tag @param for parameter \$data with type mixed is not subtype of native type array#' diff --git a/tests/AbstractContainerAwareTestCase.php b/tests/AbstractContainerAwareTestCase.php index 0dbf80fce54..c84ba57bf98 100644 --- a/tests/AbstractContainerAwareTestCase.php +++ b/tests/AbstractContainerAwareTestCase.php @@ -21,9 +21,11 @@ abstract class AbstractContainerAwareTestCase extends TestCase /** * Constructs a test case with the given name. * + * @param string|null $data * @param mixed[] $data + * @param string $dataName */ - public function __construct(?string $name = null, array $data = [], string $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { if (self::$cachedContainer === null) { self::$cachedContainer = (new ContainerFactory())->create();