Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
run: Build/Scripts/runTests.sh -b docker -p ${{ matrix.php }} -s lint

- name: Phpstan
if: ${{ matrix.php <= '8.3' }}
run: Build/Scripts/runTests.sh -b docker -p ${{ matrix.php }} -s phpstan

- name: Unit Tests
Expand Down
6 changes: 0 additions & 6 deletions Build/phpstan/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,3 @@ parameters:
identifier: notIdentical.alwaysTrue
count: 1
path: ../../Classes/Core/Functional/FunctionalTestCase.php

-
message: '#^Call to function method_exists\(\) with ''TYPO3\\\\CMS\\\\Core\\\\Core\\\\Bootstrap'' and ''loadExtTables'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../../Classes/Core/Testbase.php
10 changes: 10 additions & 0 deletions Build/phpstan/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ parameters:
- ../../Classes
- ../../Tests

ignoreErrors:
# Bootstrap::loadExtTables() exists in TYPO3 v14 only. With v14 the check in
# Testbase::loadExtensionTables() is always true, with v15 it is necessary.
# So PHPStan must not report this entry as unmatched.
-
message: '#^Call to function method_exists\(\) with ''TYPO3\\\\CMS\\\\Core\\\\Core\\\\Bootstrap'' and ''loadExtTables'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
path: ../../Classes/Core/Testbase.php
reportUnmatched: false

excludePaths:
# Text fixtures extensions uses $_EXTKEY phpstan would be report as "might not defined"
- ../../Tests/Unit/*/Fixtures/Extensions/*/ext_emconf.php
Expand Down
2 changes: 2 additions & 0 deletions Classes/Core/Testbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,8 @@ private function truncateAllTablesForOtherDatabases(): void
*/
public function loadExtensionTables(): void
{
// Bootstrap::loadExtTables() exists in TYPO3 v14 only. For PHPStan,
// see the ignoreErrors entry in Build/phpstan/phpstan.neon.
if (method_exists(Bootstrap::class, 'loadExtTables')) {
Bootstrap::loadExtTables();
}
Expand Down