Skip to content

Commit

Permalink
Run static analysis checks on PHP 8.4 (#11753)
Browse files Browse the repository at this point in the history
* Run static analysis checks on PHP 8.4

* Remove forgotten references to Psalm

* Remove invalid annotation

I do not think it achieves anything.
  • Loading branch information
greg0ire authored Dec 7, 2024
1 parent 8fb1043 commit 0ed0be0
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ phpstan-baseline.neon export-ignore
phpstan-dbal2.neon export-ignore
phpstan-params.neon export-ignore
phpstan-persistence2.neon export-ignore
psalm.xml export-ignore
psalm-baseline.xml export-ignore
5 changes: 1 addition & 4 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- composer.*
- src/**
- phpstan*
- psalm*
- tests/StaticAnalysis/**
push:
branches:
Expand All @@ -19,7 +18,6 @@ on:
- composer.*
- src/**
- phpstan*
- psalm*
- tests/StaticAnalysis/**

jobs:
Expand Down Expand Up @@ -48,7 +46,7 @@ jobs:
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.3"
php-version: "8.4"

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

5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1055,11 +1055,6 @@ parameters:
count: 1
path: src/Mapping/ClassMetadataFactory.php

-
message: "#^Call to an undefined method ReflectionProperty\\:\\:getHooks\\(\\)\\.$#"
count: 1
path: src/Mapping/ClassMetadataInfo.php

-
message: "#^Method Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataInfo\\:\\:_storeAssociationMapping\\(\\) has parameter \\$assocMapping with no value type specified in iterable type array\\.$#"
count: 5
Expand Down
2 changes: 1 addition & 1 deletion phpstan-params.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parameters:
earlyTerminatingMethodCalls:
Doctrine\ORM\Query\Parser:
- syntaxError
phpVersion: 80200
phpVersion: 80400

ignoreErrors:
# Remove on 3.0.x
Expand Down
2 changes: 0 additions & 2 deletions tests/Tests/Models/Enums/FaultySwitch.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class FaultySwitch
/**
* The following line is ignored on psalm and phpstan so that we can test
* that the mapping is throwing an exception when a non-backed enum is used.
*
* @phpstan-suppress InvalidArgument
*/
#[Column(enumType: SwitchStatus::class)]
public SwitchStatus $status;
Expand Down

0 comments on commit 0ed0be0

Please sign in to comment.