Bug #89207

Epic #83968: PSR-11 Initiative

Incorrect PSR-11 related deprecation messages being triggered by ObjectManager->get()

Added by Benjamin Franzke 3 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Should have
Category:
Extbase
Start date:
2019-09-19
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Due to a wrong condition a deprecation error is triggered by Extbase\Object\ObjectManager->get()
(although no constructor arguments have been passed) when the object to be created/retrieved exists in the (symfony) PSR-11 container.

Example:

TYPO3 Deprecation Notice: TYPO3\CMS\Extbase\SignalSlot\Dispatcher is available in the PSR-11 container. That means you should not try to instanciate it using constructor arguments. Falling back to legacy extbase based injection. in […]/typo3/sysext/extbase/Classes/Object/ObjectManager.php line 123

Associated revisions

Revision e0fd4700 (diff)
Added by Benjamin Franzke 3 months ago

[BUGFIX] Fix wrong PSR-11 related deprecation messages in ObjectManager

Due to an inverse condition the deprecation message that constructor
arguments shoud not be passed was triggered when actually no arguments
where passed.

Also fix the generation of the related non-object exception, the
string concatenation used a wrong variable name.

Change-Id: Icb387b666d2bf249e34eb7bae2d1ed9b3382a8b4
Releases: master
Resolves: #89207
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61760
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Tested-by: Frank Nägler <>
Reviewed-by: Georg Ringer <>
Reviewed-by: Frank Nägler <>

History

#1 Updated by Gerrit Code Review 3 months ago

  • Status changed from New to Under Review

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

#2 Updated by Gerrit Code Review 3 months ago

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

#3 Updated by Benjamin Franzke 3 months ago

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

Also available in: Atom PDF