Issue Feature Resolved

#110859Expose the Extension Scanner as a CLI command upgrade:scan

Olivier Dobberkau 09/30/26, 11:27 updated 10/27/26, 21:00

Description

The gap

The Extension Scanner is reachable only through Admin Tools > Upgrade > Scan
Extension Files
. There is no console command, so in a CI pipeline, a pre-upgrade
script or any automated workflow the scanner does not exist.

The scan itself lives inline in UpgradeController::extensionScannerScanFileAction()
(118 lines in v14.3.7), and the matcher registry is a 94-line protected $matchers
property in the same internal@ controller. There is no service to call.

Everyone who needs the scan outside the backend copies both out of the controller.
Besides EXT:install itself, the 23-entry registry is mirrored by hand in
netresearch/nr-extension-scanner-cli dkd-dobberkau/t3corescan .
michielroos/typo3scan reimplements the
scanner altogether.

Scope, as agreed with Benni Mack

  • Command upgrade:scan in EXT:install, registered in its ServiceProvider next to setup and install:password:set.
  • The extracted service is public API, not internal@.
  • Output: a table and JSON to start with.

Planned change

  1. Move the matcher registry out of UpgradeController into one declaration.
  2. Extract the traversal into ExtensionScannerService with typed results (ScanResult, ScanMatch, and an Indicator enum backed by the existing values strong / weak).
  3. Let extensionScannerScanFileAction() delegate to the service, so the backend module and the CLI cannot drift apart. The module’s output stays unchanged.
  4. Add upgrade:scan [extension...] [--format=table|json] [--fail-on=strong|any|none]. By default strong findings and unparsable files make the exit code non-zero.

The extraction is low-risk: between v13.4.35 and v14.3.7 Classes/ExtensionScanner/
kept an identical file list and changed in no public signature.

Patch

Implemented and tested locally against main (unit, install functional, PHPStan,
CGL, and by hand in a running instance). It will go to Gerrit as two changes: the
service extraction and the command, each with a changelog entry.

Related: #110807, #110808

Reviews 3

History 413

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

    Applied in changeset commit:9cc2be04c51a1c6d356bb4482a60dd145760428d.