Project

General

Profile

Actions

Bug #100152

closed

Multiple warnings in PhpStorm due to "class-string" in phpDocs

Added by Dmitry Dulepov over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-03-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

Description

PhpStorm checks passed function parameters and tells that a parameter to GeneralUtility::makeInstance() should be class-string but passed is string. This happens at every usage (like in GeneralUtility::makeInstance(ConnectionPool::class)). Problem is with commit 3bb114c9dc1 (https://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/3bb114c9dc1). Suddenly the project is full with useless warnings.

It would be good if phpDoc does not break common IDEs.

See the attachment for the PhpStorm report.


Files

warning.jpg (872 KB) warning.jpg Dmitry Dulepov, 2023-03-13 11:02

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #99146: Improve the type annotations around GU::makeInstance & friendsClosedOliver Klee2022-11-20

Actions
Is duplicate of TYPO3 Core - Task #100091: Introduce phpstan- prefixed annotations for makeInstance()ClosedAlexander Schnitzler2023-03-05

Actions
Actions

Also available in: Atom PDF