From 8c4805cd0a7b97366d268e3af40abc68c5984b2f Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Tue, 6 Apr 2021 15:33:33 -0300 Subject: [PATCH] Update pattern to ignore PHPStan error Since we updated to PHPStan 0.12.83 we started getting the error bellow. It seems this happened because the message of an error that we were already ignoring was changed. This commit simply updates the pattern we use to ignore the error to reflect the change in the new PHPStan version. ``` ------ --------------------------------------------------------------------- Line lib/Features/FeatureFlagsController.php ------ --------------------------------------------------------------------- Ignored error pattern #^Cannot access offset \(int\|string\) on array\|false# in path /home/circleci/mailpoet/lib/Features/FeatureFlagsController.php was not matched in reported errors. 44 Cannot access offset (int|string) on array|false. ------ --------------------------------------------------------------------- ``` [MAILPOET-3491] --- tasks/phpstan/php-version-dependent-config-libs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/phpstan/php-version-dependent-config-libs.php b/tasks/phpstan/php-version-dependent-config-libs.php index 7bad77c75d..9e5acc6cd6 100644 --- a/tasks/phpstan/php-version-dependent-config-libs.php +++ b/tasks/phpstan/php-version-dependent-config-libs.php @@ -9,7 +9,7 @@ $config['parameters']['phpVersion'] = $phpVersion; # see https://github.com/phpstan/phpstan/issues/4060 if ($phpVersion < 80000) { $config['parameters']['ignoreErrors'][] = [ - 'message' => '#^Cannot access offset \\(int\\|string\\) on array\\|false#', + 'message' => '#^Cannot access offset \\(int\\|string\\) on array\\ __DIR__ . '/../../lib/Features/FeatureFlagsController.php', 'count' => 1, ];