Issue Bug Closed

#103056The extension scanner does not report "Breaking: #96641 - TypoLink related hooks removed"

Daniel Siepmann 02/06/24, 08:00 updated 02/06/24, 12:00

Description

The change log entry can be found at: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.0/Breaking-96641-TypoLinkRelatedHooksRemoved.html

I’d expect the scanner to report a strong match for those two occurences:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typoLink_PostProc'][$extKey] = \Vendor\OurKey\LinkBuilding\CustomCssClassBasedOnType::class . '->process';

And:

    \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TYPO3_CONF_VARS'], [
        'SC_OPTIONS' => [
            'tslib/class.tslib_content.php' => [
                'typoLink_PostProc' => [
                    $extKey => \Vendor\OurKey\LinkBuilding\CustomCssClassBasedOnType::class . '->process',
                ],
            ],
        ],
    ]);

Neither is reported.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Oliver Bartsch commented and changed status New Needs Feedback 02/06/24, 11:29

    Hi Daniel,

    these occurrences should be reported as “weak” match (like all array access matches). Where exactly did you define the mentioned hook registrations?

    I just checked them in an ext_localconf.php and got a report, at least for the first registration. I assume the array merge construct is not supported by the extension scanner.

    Best, Oli

  2. Daniel Siepmann commented and changed status Needs Feedback Closed 02/06/24, 12:00

    I also had them within ext_localconf.php.

    The first one was a trial to check whether that would work as I thought the merge might not work.
    And indeed it is a weak match … I’d expect it to be a strong match, but I don’t know how the scanner internals work. I’d thought it would be able to detect that it is the key in proper context. Why else wouldn’t it find the array_merge approach?

    But I’ll close as this seems to be the expected behaviour and not a bug. Thanks for your fast response and explanation.