Project

General

Profile

Actions

Task #98251

closed

Avoid unsolvable phpstan error for return-type mismatch

Added by Stefan Bürk over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-09-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

PHP8.1 introduced native return types to native methods
and interfaces, which crashes if they are not compatible.
As a workaround the introduced `#[\ReturnTypeWillChange]`
attribute can be used to mitigate this, which has been
used to mitigate quite some issues with it.

PHPStan has released a new version which fixes a bunch of
bugs, which detects more issues in core. These will be
addressed with the dedicated PHPStan raise patch. However,
one issue cannot be solved or added to the baseline and
must be fixed beforehand. The reason is, that phpstan also
evaluates the PHPDoc return type.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #98246: Update PHPStanRejectedOliver Klee2022-09-02

Actions
Actions #1

Updated by Stefan Bürk over 1 year ago

Actions #2

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75599

Actions #3

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75599

Actions #4

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75575

Actions #5

Updated by Stefan Bürk over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF