ExtensionScannerService
Scans PHP files for usages of removed or deprecated TYPO3 Core code.
This is the engine behind the "Extension scanner" of the install tool. It reports what static analysis found and where it came from; it deliberately does not resolve the referenced changelog files to documents, and it does not read the matched source lines. Both are presentation concerns of the caller.
Not declared final only because the unit tests of EXT:install replace it with a test double; substitutability is not a promise of this API.
This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.
Tags
Table of Contents
Methods
- __construct() : mixed
- findScannableFiles() : array<int, string>
- Collect PHP files below the given directory that can be handed to scanFile(), sorted by name.
- scanFile() : ScanResult
- Scan a single file. A file that can not be parsed does not raise an exception: the result carries the parser message instead, so that scanning many files is not aborted by a single broken one.
Methods
__construct()
public
__construct(MatcherRegistry $matcherRegistry, MatcherFactory $matcherFactory) : mixed
Parameters
- $matcherRegistry : MatcherRegistry
- $matcherFactory : MatcherFactory
Both arguments are internal to EXT:install. Obtain the service from the dependency injection container instead of constructing it.
findScannableFiles()
Collect PHP files below the given directory that can be handed to scanFile(), sorted by name.
public
findScannableFiles(string $basePath) : array<int, string>
Parameters
- $basePath : string
Tags
Return values
array<int, string> —absolute file paths
scanFile()
Scan a single file. A file that can not be parsed does not raise an exception: the result carries the parser message instead, so that scanning many files is not aborted by a single broken one.
public
scanFile(string $absoluteFilePath) : ScanResult
Parameters
- $absoluteFilePath : string