simonschaufi / typo3scan
TYPO3 scanner as standalone CLI application
Requires
- php: ^8.3
- simonschaufi/typo3-cms-scanner: ^14.0
- symfony/console: ^7.4
- symfony/filesystem: ^7.4
- symfony/finder: ^7.4
- symfony/process: ^7.4
- symfony/string: ^7.4
- symfony/yaml: ^7.4
- twig/twig: ^3.23
Requires (Dev)
- ext-simplexml: *
- bamarni/composer-bin-plugin: ^1.8
- ergebnis/composer-normalize: ^2.54
- phpstan/phpstan: ^2.3
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.1
- phpstan/phpstan-strict-rules: ^2.1
- phpstan/phpstan-symfony: ^2.1
- phpunit/phpunit: ^12.5
- rector/rector: ^2.7
- roave/security-advisories: dev-latest
- symplify/easy-coding-standard: ^13.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Scans code for usage of deprecated and or changed code.
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 TYPO3 Rector and Fractor.
Tip
The TYPO3 Upgrade Analyzer is a tool that generates a report for your Website based on the results of TYPO3 Rector, Fractor and the TYPO3 Scanner! Get it here: https://www.simonschaufelberger.de/typo3-upgrade-analyzer-en
What does it do?
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 core. You can scan for deprecations and breaking changes for TYPO3 v7 and up.
Is TYPO3 scan helping you to migrate your TYPO3 site more smoothly?
Then please buy me a drink some day ;-)
Thank you! ♥
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!
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.
Set up the development environment
Clone this repository (or your fork of the scanner repository):
git clone https://github.com/simonschaufi/typo3scan.git
Clone the TYPO3 scanner library repository (or your fork of the scanner repository):
cd packages
git clone https://github.com/simonschaufi/typo3-cms-scanner.git
In composer.json require the package with @dev so that your local package is
loaded instead (make sure to never commit this change!):
{
"require": {
"simonschaufi/typo3-cms-scanner": "@dev"
}
}
Run composer update.
Composer will now link the local scanner library into the typo3scan project. Any changes to the scanner library will be directly reflected when executing typo3scan.
Run the TYPO3scan tool
You can execute the typo3scan tool from the bin directory.
bin/typo3scan scan ~/tmp/testExtension
Run tests
vendor/bin/phpunit
and for the typo3-cms-scanner:
cd packages/typo3-cms-scanner
composer install
vendor/bin/phpunit
Static Analysis
This plugin uses PHPStan for static analysis.
Run PHPStan from the root directory:
vendor/bin/phpstan analyse
Build the phar
Make sure you have Box installed.
composer bin box install composer build
Sponsors
This project was generously sponsored by Stichting Praktijkleren.