Project

General

Profile

Actions

Bug #100152

closed

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

Added by Dmitry Dulepov about 1 year ago. Updated about 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 #1

Updated by Georg Ringer about 1 year ago

  • Related to Task #99146: Improve the type annotations around GU::makeInstance & friends added
Actions #2

Updated by Georg Ringer about 1 year ago

  • Is duplicate of Task #100091: Introduce phpstan- prefixed annotations for makeInstance() added
Actions #3

Updated by Georg Ringer about 1 year ago

  • Status changed from New to Needs Feedback

IMO fixed with https://review.typo3.org/c/Packages/TYPO3.CMS/+/78031. can you recheck and vote?

Actions #4

Updated by Dmitry Dulepov about 1 year ago

I adjusted a copy of v12.2.0 manually - yes, it is solved with this change. Thanks, Georg! I will add my review.

Actions #5

Updated by Georg Ringer about 1 year ago

  • Status changed from Needs Feedback to Closed

thanks for super fast response. closing issue here as duplicate

Actions

Also available in: Atom PDF