Skip to content

Commit 0ed0be0

Browse files
authored
Run static analysis checks on PHP 8.4 (doctrine#11753)
* Run static analysis checks on PHP 8.4 * Remove forgotten references to Psalm * Remove invalid annotation I do not think it achieves anything.
1 parent 8fb1043 commit 0ed0be0

File tree

5 files changed

+2
-14
lines changed

5 files changed

+2
-14
lines changed

.gitattributes

-2
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,3 @@ phpstan-baseline.neon export-ignore
1919
phpstan-dbal2.neon export-ignore
2020
phpstan-params.neon export-ignore
2121
phpstan-persistence2.neon export-ignore
22-
psalm.xml export-ignore
23-
psalm-baseline.xml export-ignore

.github/workflows/static-analysis.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
- composer.*
1010
- src/**
1111
- phpstan*
12-
- psalm*
1312
- tests/StaticAnalysis/**
1413
push:
1514
branches:
@@ -19,7 +18,6 @@ on:
1918
- composer.*
2019
- src/**
2120
- phpstan*
22-
- psalm*
2321
- tests/StaticAnalysis/**
2422

2523
jobs:
@@ -48,7 +46,7 @@ jobs:
4846
uses: "shivammathur/setup-php@v2"
4947
with:
5048
coverage: "none"
51-
php-version: "8.3"
49+
php-version: "8.4"
5250

5351
- name: "Require specific DBAL version"
5452
run: "composer require doctrine/dbal ^${{ matrix.dbal-version }} --no-update"
@@ -73,4 +71,3 @@ jobs:
7371
- name: "Run a static analysis with phpstan/phpstan"
7472
run: "vendor/bin/phpstan analyse -c phpstan-persistence2.neon"
7573
if: "${{ matrix.dbal-version == 'default' && matrix.persistence-version != 'default'}}"
76-

phpstan-baseline.neon

-5
Original file line numberDiff line numberDiff line change
@@ -1055,11 +1055,6 @@ parameters:
10551055
count: 1
10561056
path: src/Mapping/ClassMetadataFactory.php
10571057

1058-
-
1059-
message: "#^Call to an undefined method ReflectionProperty\\:\\:getHooks\\(\\)\\.$#"
1060-
count: 1
1061-
path: src/Mapping/ClassMetadataInfo.php
1062-
10631058
-
10641059
message: "#^Method Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataInfo\\:\\:_storeAssociationMapping\\(\\) has parameter \\$assocMapping with no value type specified in iterable type array\\.$#"
10651060
count: 5

phpstan-params.neon

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ parameters:
88
earlyTerminatingMethodCalls:
99
Doctrine\ORM\Query\Parser:
1010
- syntaxError
11-
phpVersion: 80200
11+
phpVersion: 80400
1212

1313
ignoreErrors:
1414
# Remove on 3.0.x

tests/Tests/Models/Enums/FaultySwitch.php

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ class FaultySwitch
1414
/**
1515
* The following line is ignored on psalm and phpstan so that we can test
1616
* that the mapping is throwing an exception when a non-backed enum is used.
17-
*
18-
* @phpstan-suppress InvalidArgument
1917
*/
2018
#[Column(enumType: SwitchStatus::class)]
2119
public SwitchStatus $status;

0 commit comments

Comments
 (0)