PHPackages                             michielroos/typo3scan - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. michielroos/typo3scan

ActiveProject[Testing &amp; Quality](/categories/testing)

michielroos/typo3scan
=====================

TYPO3 scanner

1.7.7(3y ago)100363.6k—8.7%15[10 issues](https://github.com/Tuurlijk/typo3scan/issues)20MITPHP ^7.0 || ^8.0

Since Sep 12Pushed 1y ago9 watchersCompare

[ Source](https://github.com/Tuurlijk/typo3scan)[ Packagist](https://packagist.org/packages/michielroos/typo3scan)[ Patreon](https://www.patreon.com/michielroos)[ RSS](/packages/michielroos-typo3scan/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (25)Used By (20)

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

[](#typo3-scanner)

Scans code for usage of deprecated and or changed code.

What about actually FIXING the broken code automatically?
---------------------------------------------------------

[](#what-about-actually-fixing-the-broken-code-automatically)

TYPO3scan only *reports* on code that needs to be fixed when migrating to a higher version of TYPO3. If you want a tool that **automatically fixes the code for you** take a look at the [TYPO3 Rector project](https://github.com/sabbelasichon/typo3-rector).

What does it do?
----------------

[](#what-does-it-do)

[![demo](https://camo.githubusercontent.com/409ad630393b93a90be3787f7127af4e1d239b0f315d8ab236f50ac03f699da1/68747470733a2f2f61736369696e656d612e6f72672f612f3230313835312e706e67)](https://asciinema.org/a/201851?autoplay=1)

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

This tool scans a folder for any code that is broken or deprecated. It's a wrapper around the [TYPO3 scanner library](https://github.com/ohader/scanner) that has been extracted from the TYPO3 v9 core. You can scan for deprecations and breaking changes for v7 and up.

Is TYPO3 scan helping you to migrate your TYPO3 site more smoothly?
-------------------------------------------------------------------

[](#is-typo3-scan-helping-you-to-migrate-your-typo3-site-more-smoothly)

Then please consider a sponsorship so I can make this tool even more awesome!

- Become a patron on [Patreon](https://www.patreon.com/michielroos)
- Make a donation via [PayPal](https://paypal.me/MichielRoos)

Thank you! ♥

Requirements
------------

[](#requirements)

The scanner requires **PHP 7.0** or higher to run. Why? *Because this tool was written in 2018!* Still running that old site on PHP 5.6? Move your extensions over to a system with PHP 7.0+ to scan them.

If there is enough demand I can downgrade components of the scanner so it can also run on PHP 5.6. This would also mean that the TYPO3 scanner library will need to be adjusted. It is taken from the TYPO3 9 core which requires PHP 7.2 at the time of writing. This sounds like quite a hassle to me, so if you want to run the LTS version of TYPO3 . . . ugrading your PHP version is the preferred practice.

Installation
------------

[](#installation)

Install into an existing composer project:

```
composer require "michielroos/typo3scan"
```

Usage
-----

[](#usage)

### Scan a path

[](#scan-a-path)

Specify a path to scan.

```
php ./typo3scan.phar scan ~/tmp/source
```

### Scan for changes in certain TYPO3 version

[](#scan-for-changes-in-certain-typo3-version)

By default the scanner scans for breaking changes and deprecations in the most recent version of TYPO3. At the time of writing, this is version `10`.

- long option: `--target`
- short option: `-t`
- values: `7`, `8`, `9`, `10`, `11`, `12` and `13`
- default: `13`

```
php ./typo3scan.phar scan --target 8 ~/tmp/source
```

### Show only certain types of changes

[](#show-only-certain-types-of-changes)

You can filter out specific change types (breaking, deprecation, feature, important)

- long option: `--only`
- short option: `-o`
- values: `breaking`, `deprecation`, `feature`, `important`
- default: `breaking,deprecation,feature,important`

```
php ./typo3scan.phar scan --only breaking ~/tmp/source

php ./typo3scan.phar scan --only breaking,deprecation ~/tmp/source
```

### Show only certain indicator types (strong / weak)

[](#show-only-certain-indicator-types-strong--weak)

You can filter out specific indicator types (strong, weak)

- long option: `--indicators`
- short option: `-i`
- values: `strong`, `weak`
- default: `strong,weak`

```
php ./typo3scan.phar scan --indicators weak ~/tmp/source

php ./typo3scan.phar scan --indicators strong ~/tmp/source
```

### Change output format

[](#change-output-format)

You can specify a different output format.

- long option: `--format`
- short option: `-f`
- values: `html`, `junit`, `markdown`, `plain`
- default: `plain`

```
php ./typo3scan.phar scan --format markdown ~/tmp/source
```

### Specify report filename

[](#specify-report-filename)

Instead of piping the output to a file, typo3scanner can write directly to a report file

- long option: `--reportFile`
- short option: `-r`

```
php ./typo3scan.phar scan -r ~/tmp/report.txt ~/tmp/source
```

### Specify custom template folder

[](#specify-custom-template-folder)

You can output in ANY format of your choosing by specifying a custom templatePath.

- long option: `--templatePath`

The scanner looks for a file with the name `Format.twig`. So if you create a HTML template and store that in `~/path/to/templates/Html.twig`, then you can generate a HTML report with the following command:

```
php ./typo3scan.phar scan --format html --templatePath ~/path/to/templates ~/tmp/source
```

If you want to output the report as Restructured Text, you would create a `Rst.twig` template and generate rest using:

```
php ./typo3scan.phar scan --format rst --templatePath ~/path/to/templates ~/tmp/source
```

### Capture output in a file

[](#capture-output-in-a-file)

You can redirect the output to a file

```
php ./typo3scan.phar scan --format markdown  ~/tmp/source > source.md
```

### Loop over a list of extensions

[](#loop-over-a-list-of-extensions)

If you have a list of extension keys you want to scan, you can do something like:

```
for e in `cat ~/extensions.txt`;
do
    php ./typo3scan.phar scan --format markdown  ~/tmp/ext/$e > ~/tmp/reports/$e.md;
done
```

### Run the TYPO3scan tool from within Gitlab CI

[](#run-the-typo3scan-tool-from-within-gitlab-ci)

Check multiple extensions in the folder `web/typo3conf/ext/` adjust that path if needed.

The result is an artifact which contains a `Build/Report/Deprecations` where you have a file per extension and TYPO3 Version 7, 8, 9 and 10.

This way you can easily review each extension.

With the planned junit ouput this can be nicely integrated into the gitlab merge request widget as well.

```
checkDeprecations:
  image: docker.kay-strobach.de/docker/php:7.1
  stage: test
  variables:
    SCANNER_RELEASE: "https://github.com/Tuurlijk/typo3scan/releases/download/1.3.0/typo3scan.phar"
  script:
    - curl -L $SCANNER_RELEASE --output typo3scan.phar
    - php ./typo3scan.phar
    - mkdir -p Build/Report/Deprecations
    - for d in web/typo3conf/ext/*/ ; do (php ./typo3scan.phar scan --target 7 --format markdown $d > Build/Report/Deprecations/v7-$(basename $d).md); done
    - for d in web/typo3conf/ext/*/ ; do (php ./typo3scan.phar scan --target 8 --format markdown $d > Build/Report/Deprecations/v8-$(basename $d).md); done
    - for d in web/typo3conf/ext/*/ ; do (php ./typo3scan.phar scan --target 9 --format markdown $d > Build/Report/Deprecations/v9-$(basename $d).md); done
    - for d in web/typo3conf/ext/*/ ; do (php ./typo3scan.phar scan --target 10 --format markdown $d > Build/Report/Deprecations/v10-$(basename $d).md); done
  artifacts:
    when: on_success
    expire_in: 7 days
    paths:
    - Build

```

Example output
--------------

[](#example-output)

You can find example templates in the [Resources/Private/Templates](./src/Resources/Private/Templates) folder.

### Plain

[](#plain)

A part of the plain output for:

```
typo3scan.phar scan ~/tmp/source/powermail
```

Looks like this:

```
powermail

Found 26 matches in 1.09s when checking for changes and deprecations in TYPO3 7

strong  weak  DEPRECATION BREAKING
29.41%  70.59%  5.88% 94.12%

Classes/Finisher/SendParametersFinisher.php
Call to method "isEnabled()" (weak)
60 if ($this->isEnabled()) {
Deprecation: #37171 - Deprecate t3editor->isEnabled()
https://docs.typo3.org/typo3cms/extensions/core/Changelog/7.3/Deprecation-67171-T3editorIsEnabled.html

Configuration/TCA/tx_powermail_domain_model_answer.php
Usage of array key "dividers2tabs" (strong)
14 'dividers2tabs' => true,
Breaking: #62833 - Removed dividers2tabs functionality
https://docs.typo3.org/typo3cms/extensions/core/Changelog/7.0/Breaking-62833-Dividers2Tabs.html

Usage of array key "canNotCollapse" (weak)
240 'canNotCollapse' => 1
Breaking: #67753 - Drop "Show secondary options"
https://docs.typo3.org/typo3cms/extensions/core/Changelog/7.4/Breaking-67753-DropSecondaryOptions.html

Usage of array key "_PADDING" (weak)
206 '_PADDING' => 2,
Breaking: #63846 - FormEngine refactoring
https://docs.typo3.org/typo3cms/extensions/core/Changelog/7.3/Breaking-63846-FormEngineRefactoring.html

ext_localconf.php
Access to array key "formevals" (weak)
71 $TYPO3_CONF_VARS['SC_OPTIONS']['tce']['formevals']['\In2code\Powermail\Tca\EvaluateEmail'] =
Breaking: #67749 - Force class auto loading for various hooks
https://docs.typo3.org/typo3cms/extensions/core/Changelog/7.4/Breaking-67749-ForceAutoloadingForVariousHooks.html

```

### HTML

[](#html)

A part of the html output for:

```
typo3scan.phar scan ~/tmp/source/coreapi -f html -t 7
```

Looks like this:

[![](./Documentation/Screenshots/Html.png)](./Documentation/Screenshots/Html.png)

### Junit

[](#junit)

A part of the junit output for:

```
typo3scan.phar scan ~/tmp/source/coreapi -f junit -t 7
```

Looks like this:

[![](./Documentation/Screenshots/Junit.png)](./Documentation/Screenshots/Junit.png)

Contributing
------------

[](#contributing)

If you want to help improve this tool to reduce the amount of false positives, improve matchers, add new matchers etc., your contributions are very welcome!

You can contribute here: [TYPO3scan src repository](https://github.com/Tuurlijk/typo3scan-src)

Sponsors
--------

[](#sponsors)

This project was generously sponsored by [Stichting Praktijkleren](https://www.stichtingpraktijkleren.nl/).

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity51

Moderate usage in the ecosystem

Community35

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 83.9% 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.

###  Release Activity

Cadence

Every ~70 days

Recently: every ~123 days

Total

24

Last Release

1178d ago

PHP version history (3 changes)1.0.0PHP ^7.0

1.4.1PHP &gt;=7.0.8

1.7.4PHP ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/00744f74e232c6ea656fb0ed215ac42cf530d35732c0a13f806970479645d5e8?d=identicon)[Tuurlijk](/maintainers/Tuurlijk)

---

Top Contributors

[![Tuurlijk](https://avatars.githubusercontent.com/u/790979?v=4)](https://github.com/Tuurlijk "Tuurlijk (94 commits)")[![mschwemer](https://avatars.githubusercontent.com/u/103594?v=4)](https://github.com/mschwemer "mschwemer (4 commits)")[![mbrodala](https://avatars.githubusercontent.com/u/5037116?v=4)](https://github.com/mbrodala "mbrodala (3 commits)")[![greenfieldr](https://avatars.githubusercontent.com/u/2246716?v=4)](https://github.com/greenfieldr "greenfieldr (2 commits)")[![DanielSiepmann](https://avatars.githubusercontent.com/u/354250?v=4)](https://github.com/DanielSiepmann "DanielSiepmann (2 commits)")[![markuspoerschke](https://avatars.githubusercontent.com/u/1222377?v=4)](https://github.com/markuspoerschke "markuspoerschke (1 commits)")[![can0199msh](https://avatars.githubusercontent.com/u/44492652?v=4)](https://github.com/can0199msh "can0199msh (1 commits)")[![garfieldius](https://avatars.githubusercontent.com/u/705480?v=4)](https://github.com/garfieldius "garfieldius (1 commits)")[![NicoWeio](https://avatars.githubusercontent.com/u/12870528?v=4)](https://github.com/NicoWeio "NicoWeio (1 commits)")[![nsd0smoog](https://avatars.githubusercontent.com/u/259808881?v=4)](https://github.com/nsd0smoog "nsd0smoog (1 commits)")[![peterkraume](https://avatars.githubusercontent.com/u/4234704?v=4)](https://github.com/peterkraume "peterkraume (1 commits)")[![kaystrobach](https://avatars.githubusercontent.com/u/1185776?v=4)](https://github.com/kaystrobach "kaystrobach (1 commits)")

---

Tags

cli-appcode-qualityextensionphpscannertypo3

### Embed Badge

![Health badge](/badges/michielroos-typo3scan/health.svg)

```
[![Health](https://phpackages.com/badges/michielroos-typo3scan/health.svg)](https://phpackages.com/packages/michielroos-typo3scan)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

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