Skip to content

Commit feb9a0a

Browse files
authored
Bump phpstan/phpstan to ^2.0 (#11)
* [Composer] Bump phpstan/phpstan to ^2.0 * [PHPStan] Regenerated PHPStan baseline
1 parent 8bc29b1 commit feb9a0a

File tree

5 files changed

+61
-3
lines changed

5 files changed

+61
-3
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"require-dev": {
2020
"ibexa/behat": "~4.6.x-dev",
2121
"ibexa/code-style": "~2.0.0",
22-
"phpstan/phpstan": "^1.10",
23-
"phpstan/phpstan-phpunit": "^1.3",
24-
"phpstan/phpstan-symfony": "^1.3",
22+
"phpstan/phpstan": "^2.0",
23+
"phpstan/phpstan-phpunit": "^2.0",
24+
"phpstan/phpstan-symfony": "^2.0",
2525
"phpunit/phpunit": "^9.0",
2626
"qossmic/deptrac-shim": "^0.24.0 || ^1.0.2"
2727
},

ignore-by-php-version.neon.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
7+
declare(strict_types=1);
8+
9+
$includes = [];
10+
if (PHP_VERSION_ID >= 80000) {
11+
$includes[] = __DIR__ . '/ignore-gte-php-8.0-errors.neon';
12+
}
13+
14+
$config = [];
15+
$config['includes'] = $includes;
16+
17+
return $config;

ignore-gte-php-8.0-errors.neon

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: '#^Method Ibexa\\CoreSearch\\CriterionMapper\\LogicalAndCriterionMapper\:\:getType\(\) never returns ''NOT'' so it can be removed from the return type\.$#'
5+
identifier: return.unusedType
6+
count: 1
7+
path: src/lib/CriterionMapper/LogicalAndCriterionMapper.php
8+
9+
-
10+
message: '#^Method Ibexa\\CoreSearch\\CriterionMapper\\LogicalOrCriterionMapper\:\:getType\(\) never returns ''NOT'' so it can be removed from the return type\.$#'
11+
identifier: return.unusedType
12+
count: 1
13+
path: src/lib/CriterionMapper/LogicalOrCriterionMapper.php
14+

phpstan-baseline.neon

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: '#^Call to function assert\(\) with true will always evaluate to true\.$#'
5+
identifier: function.alreadyNarrowedType
6+
count: 1
7+
path: src/contracts/Persistence/CriterionMapper/AbstractFieldCriterionMapper.php
8+
9+
-
10+
message: '#^Instanceof between T of Ibexa\\Contracts\\CoreSearch\\Values\\Query\\Criterion\\FieldValueCriterion and Ibexa\\Contracts\\CoreSearch\\Values\\Query\\Criterion\\FieldValueCriterion will always evaluate to true\.$#'
11+
identifier: instanceof.alwaysTrue
12+
count: 1
13+
path: src/contracts/Persistence/CriterionMapper/AbstractFieldCriterionMapper.php
14+
15+
-
16+
message: '#^Method Ibexa\\CoreSearch\\CriterionMapper\\LogicalAndCriterionMapper\:\:getType\(\) never returns ''OR'' so it can be removed from the return type\.$#'
17+
identifier: return.unusedType
18+
count: 1
19+
path: src/lib/CriterionMapper/LogicalAndCriterionMapper.php
20+
21+
-
22+
message: '#^Method Ibexa\\CoreSearch\\CriterionMapper\\LogicalOrCriterionMapper\:\:getType\(\) never returns ''AND'' so it can be removed from the return type\.$#'
23+
identifier: return.unusedType
24+
count: 1
25+
path: src/lib/CriterionMapper/LogicalOrCriterionMapper.php

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
includes:
22
- vendor/phpstan/phpstan-phpunit/extension.neon
33
- vendor/phpstan/phpstan-symfony/extension.neon
4+
- phpstan-baseline.neon
5+
- ignore-by-php-version.neon.php
46

57
parameters:
68
level: 8

0 commit comments

Comments
 (0)