Scans code for usage of deprecated and or changed code.
This is the source repository for typo3scan. The actual usable scanner and documentation can be found in the typo3scan repository.
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.
TYPO3 publishes breaking changes and deprecations since version 7.
This tool scans a folder for any code that is broken or deprecated. It's a wrapper around the TYPO3 scanner library that has been extracted from the TYPO3 v9 core. You can scan for deprecations and breaking changes for v7 and up.
Then please buy me a beer some day ;-)
Thank you! ♥
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!
This tool is a wrapper around the TYPO3 scanner library that has been extracted from the TYPO3 v9 core. I added the v7 and v8 matcher rules to a fork of this repository.
Most of the time you will want to change the typo3 scanner library or your fork of it and then run that library inside the typo3scan tool.
Clone the TYPO3 scanner library repository (or your fork of the scanner repository):
git clone https://github.com/Tuurlijk/scanner.git
Clone this repository:
git clone https://github.com/Tuurlijk/typo3scan.git
Add a repository entry to your composer.json
pointing to your locally cloned scanner library repository. Put this one as the first one in the list.
{
"type": "path",
"url": "~/Projects/TYPO3/scanner/"
},
Run composer update
. Composer will now link the local scanner library into the typo3scan project. So any changes to the scanner library will be directly reflected when executing typo3scan.
You can execute the typo3scan tool from the bin
directory.
cd ~/path/to/typo3scan
./bin/typo3scan scan ~/tmp/testExtension
cd ~/path/to/scanner-library
composer install
./.Build/bin/phpunit tests/
Make sure you have Box installed.
composer update typo3/cms-scanner
composer build
composer prep
This project was generously sponsored by Stichting Praktijkleren.