Issue Bug Resolved

#110807Extension Scanner rule for BackendUserAuthentication::returnWebmounts() can never match

Olivier Dobberkau 09/26/26, 20:24 updated 09/27/26, 11:00

Description

The Extension Scanner rule meant to detect calls to BackendUserAuthentication::returnWebmounts() has two defects and can therefore never match anything. Extensions calling that method get no warning from the Extension Scanner, although the method was removed in v14.

Verified in v13.4.35, in v14.3.7 and in current main (MethodCallStaticMatcher.php, line 1646 at the time of writing).

The rule

typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php:

'TYPO3\CMS\Core\Authentication\BackendUserAuthentication::returnWebmount' => [
    'numberOfMandatoryArguments' => 0,
    'maximumNumberOfArguments' => 0,
    'restFiles' => [
        'Deprecation-104607-BackendUserAuthenticationReturnWebmounts.rst',
        'Breaking-105377-DeprecatedFunctionalityRemoved.rst',
    ],
],

Defect 1: the method name is missing its trailing “s”

The method is returnWebmounts(), plural. In v13.4.35, Classes/Authentication/BackendUserAuthentication.php:896:

public function returnWebmounts()

The singular spelling returnWebmount does not occur anywhere in the v13 core. The referenced changelog entry uses the plural throughout, including in its own file name: Deprecation-104607-BackendUserAuthenticationReturnWebmounts.rst.

Defect 2: wrong matcher, the method is not static

returnWebmounts() is declared public function, not public static function. It is listed in MethodCallStaticMatcher with :: syntax, so even with the name corrected it would only match static calls.

Every other instance method of the same class is in MethodCallMatcher with ->, for example BackendUserAuthentication->getTSConfigVal, BackendUserAuthentication->recordEditAccessInternals and BackendUserAuthentication->checkLogFailures. This rule is the only BackendUserAuthentication entry in the static matcher.

Suggested fix

Remove the entry from MethodCallStaticMatcher.php and add it to MethodCallMatcher.php:

'TYPO3\CMS\Core\Authentication\BackendUserAuthentication->returnWebmounts' => [
    'numberOfMandatoryArguments' => 0,
    'maximumNumberOfArguments' => 0,
    'restFiles' => [
        'Deprecation-104607-BackendUserAuthenticationReturnWebmounts.rst',
        'Breaking-105377-DeprecatedFunctionalityRemoved.rst',
    ],
],

How it was found

While diffing the public API of typo3/cms-core v13.4.35 against v14.3.7 and comparing the result against the hand-written scanner rules. Of 35 hand-written method rules for v14.0 in TYPO3\CMS\Core, the diff reproduced 34. The single outlier turned out to be this rule rather than a gap in the diff.

I am happy to push a patch to Gerrit for this.

Reviews 3

History 26

  1. Olivier Dobberkau commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-09-27T11:00:19+00:00" > 09/27/26, 11:00 </span>

    Applied in changeset commit:5d46b9a94ed1098f65b29b3f3685f0b6e5e265ca.