Skip to content

Commit 947b13b

Browse files
authored
[TASK] Happify phpstan again (#539)
It seems that `@phpstan-ignore-next-line` mumbles when it does non actively suppress something. With the release of doctrine 4, this kicks in for two lines which phpstan gets right now. phpstan with PHP 8.2 now collides with 8.1, we skip the 8.1 run. Also add PHP 8.3 to the matrix.
1 parent 7f4a539 commit 947b13b

3 files changed

Lines changed: 6 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
php: [ '8.1' , '8.2' ]
16+
php: [ '8.1' , '8.2', '8.3' ]
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v3
@@ -29,6 +29,7 @@ jobs:
2929
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s lint
3030

3131
- name: Phpstan
32+
if: ${{ matrix.php >= '8.2' }}
3233
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s phpstan
3334

3435
- name: Unit Tests

Classes/Core/Functional/Framework/DataHandling/Snapshot/DatabaseSnapshot.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,12 @@ public function restore(DatabaseAccessor $accessor, Connection $connection): voi
102102
}
103103

104104
/**
105-
* @todo Replace usages by direct instanceof checks when TYPO3 v13.0 / Doctrine DBAL 4 is lowes supported version.
106-
*
107-
* @param Connection $connection
108-
* @return bool
105+
* @todo Replace usages by direct instanceof checks when
106+
* TYPO3 v13.0 / Doctrine DBAL 4 is lowest supported version.
109107
* @throws \Doctrine\DBAL\Exception
110108
*/
111109
private function isSQLite(Connection $connection): bool
112110
{
113-
/** @phpstan-ignore-next-line */
114111
return $connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\SQLitePlatform;
115112
}
116113
}

Classes/Core/Testbase.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,15 +1023,12 @@ protected function exitWithMessage($message): void
10231023
}
10241024

10251025
/**
1026-
* @todo Replace usages by direct instanceof checks when TYPO3 v13.0 / Doctrine DBAL 4 is lowes supported version.
1027-
*
1028-
* @param Connection|DoctrineConnection $connection
1029-
* @return bool
1026+
* @todo Replace usages by direct instanceof checks when
1027+
* TYPO3 v13.0 / Doctrine DBAL 4 is lowest supported version.
10301028
* @throws DBALException
10311029
*/
10321030
private static function isSQLite(Connection|DoctrineConnection $connection): bool
10331031
{
1034-
/** @phpstan-ignore-next-line */
10351032
return $connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\SQLitePlatform;
10361033
}
10371034
}

0 commit comments

Comments
 (0)