Skip to content

Commit b28f0ec

Browse files
committed
[BUGFIX] Use proper dependency injection in ReferenceIndex test
The Rector modernization incorrectly changed GeneralUtility::makeInstance() to direct instantiation with 'new', which bypasses TYPO3's dependency injection container. This causes the ReferenceIndex to fail on both TYPO3 v12 and v13 because required dependencies are not injected. Fix: Use GeneralUtility::makeInstance() for TYPO3 v12 compatibility.
1 parent 070024b commit b28f0ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Tests/Functional/DataHandling/RteImageSoftReferenceParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function updateReferenceIndexAddsIndexEntryForImage(): void
2828

2929
$versionInformation = GeneralUtility::makeInstance(Typo3Version::class);
3030
if ($versionInformation->getMajorVersion() < 13) {
31-
(new ReferenceIndex())->updateIndex(false);
31+
GeneralUtility::makeInstance(ReferenceIndex::class)->updateIndex(false);
3232
} else {
3333
$this->get(ReferenceIndex::class)->updateIndex(false);
3434
}

0 commit comments

Comments
 (0)