PHPackages                             m12r/typo3-cms-scanner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. m12r/typo3-cms-scanner

ActiveLibrary

m12r/typo3-cms-scanner
======================

TYPO3 CMS static file analysis

204[1 issues](https://github.com/mschwemer/scanner/issues)PHP

Since Aug 8Pushed today2 watchersCompare

[ Source](https://github.com/mschwemer/scanner)[ Packagist](https://packagist.org/packages/m12r/typo3-cms-scanner)[ RSS](/packages/m12r-typo3-cms-scanner/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

TYPO3 scanner
=============

[](#typo3-scanner)

Scans code for usage of deprecated and or changed code.

This is a library component that can be used to build tools that scan PHP files for broken or deprecated code.

Tools using this library:

- [TYPO3 CMS v9](https://typo3.org/)
- [standalone TYPO3 scanner](https://github.com/Tuurlijk/typo3scan)

TYPO3 publishes [breaking changes and deprecations since version 7](https://docs.typo3.org/typo3cms/extensions/core/stable/Index.html).

This library uses the [PHP parser](https://github.com/nikic/PHP-Parser) written by [Nikita Popov](https://github.com/nikic). The parser transforms the PHP code from a file into an [Abstract Syntax Tree (AST)](https://github.com/nikic/PHP-Parser/blob/master/doc/component/Walking_the_AST.markdown). This can then be easily analysed using 'Matchers' and accompanying 'Rules'.

Matchers
--------

[](#matchers)

Every node visited by the node traverser, will be checked using all Matchers specified in the `\M12R\Scanner\Domain\Model\MatcherBundle`.

Currently we have the followign matchers:

### ArrayDimensionMatcher

[](#arraydimensionmatcher)

Matches arrays like `$GLOBALS['foo']['bar']`

### ArrayGlobalMatcher

[](#arrayglobalmatcher)

Match access to a one dimensional $GLOBAL array Example `$GLOBALS['TYPO3_DB']`

### ArrayMatcher

[](#arraymatcher)

Find usages of dropped TCA configuration values and other nested array structures. You can specify the `matchOnValues` parameter to pass in an array of values to match.

### ClassConstantMatcher

[](#classconstantmatcher)

Find usages of class constants. Test for `Class\Name::THE_CONSTANT`, matches are considered "strong"

### ClassNameMatcher

[](#classnamematcher)

Find usages of class / interface names which are entirely deprecated or removed

### ClassNamePatternMatcher

[](#classnamepatternmatcher)

Find usages of class / interface names which are entirely deprecated or removed by specifying regex patterns

### ConstantMatcher

[](#constantmatcher)

Find usages of class constants. Test for `THE_CONSTANT`, matches are considered "strong"

### FunctionCallMatcher

[](#functioncallmatcher)

Find usages of global function calls which were removed / deprecated. This is a strong match.

### GlobalMatcher

[](#globalmatcher)

Match access to a one dimensional '$GLOBAL' array Example `$TT`

### InterfaceMethodChangedMatcher

[](#interfacemethodchangedmatcher)

Matches interface method arguments which have been dropped. This does *not* test if a class implements an interface. The scanner only looks for:

- Class method names not having specified number of arguments
- Method calls with given method name not having this number of arguments

### MethodAnnotationMatcher

[](#methodannotationmatcher)

Find usages of method annotations

### MethodArgumentDroppedMatcher

[](#methodargumentdroppedmatcher)

Find usages of method calls which changed signature and dropped arguments, but are called with more arguments. This is a "weak" match since we're just testing for method name but not connected class.

### MethodArgumentDroppedStaticMatcher

[](#methodargumentdroppedstaticmatcher)

Find usages of static method calls which were removed / deprecated. This is a "strong" match if class name is given and "weak" if not.

### MethodArgumentRequiredMatcher

[](#methodargumentrequiredmatcher)

Find usages of method calls which changed signature and added required arguments. This is a "weak" match since we're just testing for method name but not connected class.

### MethodArgumentRequiredStaticMatcher

[](#methodargumentrequiredstaticmatcher)

Find usages of static method calls which gained new mandatory arguments. This is a "strong" match if class name is given and "weak" if not.

### MethodArgumentUnusedMatcher

[](#methodargumentunusedmatcher)

Match method usages where arguments "in between" are unused but not given as "null": `public function foo($arg1, $unsused1 = null, $unused2 = null, $arg4)`but called with: `->foo('arg1', 'notNull', null, 'arg4');`

### MethodArgumentUnusedStaticMatcher

[](#methodargumentunusedstaticmatcher)

Match static method usages where arguments "in between" are unused but not given as "null": `public function foo($arg1, $unsused1 = null, $unused2 = null, $arg4)`but called with: `->foo('arg1', 'notNull', null, 'arg4');`This is a "strong" match if class name is given and "weak" if not.

### MethodCallMatcher

[](#methodcallmatcher)

Find usages of method calls which were removed / deprecated. This is a "weak" match since we're just testing for method name but not connected class.

### MethodCallStaticMatcher

[](#methodcallstaticmatcher)

Find usages of static method calls which were removed / deprecated.

This match is performed either is case of a direct `foo\bar::aMethod()` call as "strong" match, or as only `::aMethod()` as "weak" match.

As additional indicator, the number of required, mandatory arguments is recognized: If calling a static method as `$foo::aMethod($arg1)`, but the method needs two arguments, this is *not* considered a match. This would have raised a fatal PHP error anyway and this is nothing we test here.

### PropertyAnnotationMatcher

[](#propertyannotationmatcher)

Find usages of property annotations

### PropertyExistsStaticMatcher

[](#propertyexistsstaticmatcher)

Find usages of properties which have been deprecated or removed. Useful if abstract classes remove properties.

### PropertyProtectedMatcher

[](#propertyprotectedmatcher)

Find usages of properties which have been made protected and are not called in $this context.

### PropertyPublicMatcher

[](#propertypublicmatcher)

Find usages of properties which were removed / deprecated.

Rules
-----

[](#rules)

There are rulesets for each matcher in: [config/Matcher](./config/Matcher). Currently there are rules for v7, v8 and v9 of TYPO3.

Test
----

[](#test)

When you write a new matcher or extend an existing one, please also write the needed tests.

You can run the tests with: `./.Build/bin/phpunit tests`

###  Health Score

21

—

LowBetter than 17% of packages

Maintenance55

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/103594?v=4)[Marcus Schwemer](/maintainers/mschwemer)[@mschwemer](https://github.com/mschwemer)

---

Top Contributors

[![Tuurlijk](https://avatars.githubusercontent.com/u/790979?v=4)](https://github.com/Tuurlijk "Tuurlijk (204 commits)")[![mschwemer](https://avatars.githubusercontent.com/u/103594?v=4)](https://github.com/mschwemer "mschwemer (19 commits)")[![ohader](https://avatars.githubusercontent.com/u/402145?v=4)](https://github.com/ohader "ohader (10 commits)")[![nsd0smoog](https://avatars.githubusercontent.com/u/259808881?v=4)](https://github.com/nsd0smoog "nsd0smoog (2 commits)")[![susannemoog](https://avatars.githubusercontent.com/u/321804?v=4)](https://github.com/susannemoog "susannemoog (2 commits)")[![helhum](https://avatars.githubusercontent.com/u/904370?v=4)](https://github.com/helhum "helhum (1 commits)")

### Embed Badge

![Health badge](/badges/m12r-typo3-cms-scanner/health.svg)

```
[![Health](https://phpackages.com/badges/m12r-typo3-cms-scanner/health.svg)](https://phpackages.com/packages/m12r-typo3-cms-scanner)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
