{"id":23151200,"url":"https://github.com/mschwemer/typo3scan","last_synced_at":"2025-05-16T03:05:16.227Z","repository":{"id":32982388,"uuid":"148297133","full_name":"mschwemer/typo3scan","owner":"mschwemer","description":"Scans TYPO3 extensions for usage of deprecated and or changed code","archived":false,"fork":false,"pushed_at":"2024-10-27T07:31:32.000Z","size":10370,"stargazers_count":96,"open_issues_count":12,"forks_count":15,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-13T14:14:09.538Z","etag":null,"topics":["cli-app","code-quality","extension","php","scanner","typo3"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mschwemer.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"michielroos"}},"created_at":"2018-09-11T09:58:37.000Z","updated_at":"2025-03-25T10:04:08.000Z","dependencies_parsed_at":"2024-11-29T09:43:59.049Z","dependency_job_id":"21a0c328-5d20-4f4c-b74f-fbf3b1dff7f0","html_url":"https://github.com/mschwemer/typo3scan","commit_stats":{"total_commits":95,"total_committers":13,"mean_commits":"7.3076923076923075","dds":"0.18947368421052635","last_synced_commit":"15fc8bf9bdc8d45ea3175514152d0b5cc23242f1"},"previous_names":["mschwemer/typo3scan","tuurlijk/typo3scan"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mschwemer%2Ftypo3scan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mschwemer%2Ftypo3scan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mschwemer%2Ftypo3scan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mschwemer%2Ftypo3scan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mschwemer","download_url":"https://codeload.github.com/mschwemer/typo3scan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459088,"owners_count":22074605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli-app","code-quality","extension","php","scanner","typo3"],"created_at":"2024-12-17T18:29:09.800Z","updated_at":"2025-05-16T03:05:11.218Z","avatar_url":"https://github.com/mschwemer.png","language":null,"funding_links":["https://patreon.com/michielroos","https://www.patreon.com/michielroos","https://paypal.me/MichielRoos"],"categories":[],"sub_categories":[],"readme":"# TYPO3 scanner\nScans code for usage of deprecated and or changed code.\n\n## What about actually FIXING the broken code automatically?\nTYPO3scan 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).\n\n## What does it do?\n[![demo](https://asciinema.org/a/201851.png)](https://asciinema.org/a/201851?autoplay=1)\n\nTYPO3 publishes [breaking changes and deprecations since version 7](https://docs.typo3.org/typo3cms/extensions/core/stable/Index.html).\n\nThis 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.\n\n## Is TYPO3 scan helping you to migrate your TYPO3 site more smoothly?\nThen please consider a sponsorship so I can make this tool even more awesome!\n- Become a patron on [Patreon](https://www.patreon.com/michielroos)\n- Make a donation via [PayPal](https://paypal.me/MichielRoos)\n\nThank you! ♥\n\n## Requirements\nThe 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.\n\nIf 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.\n\n## Installation\nInstall into an existing composer project:\n```bash\ncomposer require \"michielroos/typo3scan\"\n```\n\n## Usage\n### Scan a path\nSpecify a path to scan.\n```bash\nphp ./typo3scan.phar scan ~/tmp/source\n```\n\n### Scan for changes in certain TYPO3 version\nBy 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`.\n- long option: `--target`\n- short option: `-t`\n- values: `7`, `8`, `9`, `10`, `11`, `12` and `13`\n- default: `13`\n```bash\nphp ./typo3scan.phar scan --target 8 ~/tmp/source\n```\n\n### Show only certain types of changes\nYou can filter out specific change types (breaking, deprecation, feature, important)\n- long option: `--only`\n- short option: `-o`\n- values: `breaking`, `deprecation`, `feature`, `important`\n- default: `breaking,deprecation,feature,important`\n```bash\nphp ./typo3scan.phar scan --only breaking ~/tmp/source\n\nphp ./typo3scan.phar scan --only breaking,deprecation ~/tmp/source\n```\n\n### Show only certain indicator types (strong / weak)\nYou can filter out specific indicator types (strong, weak)\n- long option: `--indicators`\n- short option: `-i`\n- values: `strong`, `weak`\n- default: `strong,weak`\n```bash\nphp ./typo3scan.phar scan --indicators weak ~/tmp/source\n\nphp ./typo3scan.phar scan --indicators strong ~/tmp/source\n```\n\n### Change output format\nYou can specify a different output format.\n- long option: `--format`\n- short option: `-f`\n- values: `html`, `junit`, `markdown`, `plain`\n- default: `plain`\n```bash\nphp ./typo3scan.phar scan --format markdown ~/tmp/source\n```\n\n### Specify report filename\nInstead of piping the output to a file, typo3scanner can write directly to a report file\n- long option: `--reportFile`\n- short option: `-r`\n```bash\nphp ./typo3scan.phar scan -r ~/tmp/report.txt ~/tmp/source\n```\n\n### Specify custom template folder\nYou can output in ANY format of your choosing by specifying a custom templatePath. \n- long option: `--templatePath`\n\nThe 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:\n```bash\nphp ./typo3scan.phar scan --format html --templatePath ~/path/to/templates ~/tmp/source\n```\nIf you want to output the report as Restructured Text, you would create a `Rst.twig` template and generate rest using:\n```bash\nphp ./typo3scan.phar scan --format rst --templatePath ~/path/to/templates ~/tmp/source\n```\n\n### Capture output in a file\nYou can redirect the output to a file\n```bash\nphp ./typo3scan.phar scan --format markdown  ~/tmp/source \u003e source.md\n```\n\n### Loop over a list of extensions\nIf you have a list of extension keys you want to scan, you can do something like:\n```bash\nfor e in `cat ~/extensions.txt`;\ndo\n    php ./typo3scan.phar scan --format markdown  ~/tmp/ext/$e \u003e ~/tmp/reports/$e.md;\ndone\n```\n\n### Run the TYPO3scan tool from within Gitlab CI\n\nCheck multiple extensions in the folder `web/typo3conf/ext/` adjust that path if needed.\n\nThe 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.\n\nThis way you can easily review each extension.\n\nWith the planned junit ouput this can be nicely integrated into the gitlab merge request widget as well.\n\n```\ncheckDeprecations:\n  image: docker.kay-strobach.de/docker/php:7.1\n  stage: test\n  variables:\n    SCANNER_RELEASE: \"https://github.com/Tuurlijk/typo3scan/releases/download/1.3.0/typo3scan.phar\"\n  script:\n    - curl -L $SCANNER_RELEASE --output typo3scan.phar\n    - php ./typo3scan.phar\n    - mkdir -p Build/Report/Deprecations\n    - for d in web/typo3conf/ext/*/ ; do (php ./typo3scan.phar scan --target 7 --format markdown $d \u003e Build/Report/Deprecations/v7-$(basename $d).md); done\n    - for d in web/typo3conf/ext/*/ ; do (php ./typo3scan.phar scan --target 8 --format markdown $d \u003e Build/Report/Deprecations/v8-$(basename $d).md); done\n    - for d in web/typo3conf/ext/*/ ; do (php ./typo3scan.phar scan --target 9 --format markdown $d \u003e Build/Report/Deprecations/v9-$(basename $d).md); done\n    - for d in web/typo3conf/ext/*/ ; do (php ./typo3scan.phar scan --target 10 --format markdown $d \u003e Build/Report/Deprecations/v10-$(basename $d).md); done\n  artifacts:\n    when: on_success\n    expire_in: 7 days\n    paths:\n    - Build\n```\n\n## Example output\nYou can find example templates in the [Resources/Private/Templates](./src/Resources/Private/Templates) folder.\n### Plain\nA part of the plain output for:\n```bash\ntypo3scan.phar scan ~/tmp/source/powermail\n```\nLooks like this:\n```\npowermail\n\nFound 26 matches in 1.09s when checking for changes and deprecations in TYPO3 7\n\nstrong  weak  DEPRECATION BREAKING  \n29.41%  70.59%  5.88% 94.12%  \n\nClasses/Finisher/SendParametersFinisher.php\nCall to method \"isEnabled()\" (weak)\n60 if ($this-\u003eisEnabled()) {\nDeprecation: #37171 - Deprecate t3editor-\u003eisEnabled()\nhttps://docs.typo3.org/typo3cms/extensions/core/Changelog/7.3/Deprecation-67171-T3editorIsEnabled.html\n\nConfiguration/TCA/tx_powermail_domain_model_answer.php\nUsage of array key \"dividers2tabs\" (strong)\n14 'dividers2tabs' =\u003e true,\nBreaking: #62833 - Removed dividers2tabs functionality\nhttps://docs.typo3.org/typo3cms/extensions/core/Changelog/7.0/Breaking-62833-Dividers2Tabs.html\n\nUsage of array key \"canNotCollapse\" (weak)\n240 'canNotCollapse' =\u003e 1\nBreaking: #67753 - Drop \"Show secondary options\"\nhttps://docs.typo3.org/typo3cms/extensions/core/Changelog/7.4/Breaking-67753-DropSecondaryOptions.html\n\nUsage of array key \"_PADDING\" (weak)\n206 '_PADDING' =\u003e 2,\nBreaking: #63846 - FormEngine refactoring\nhttps://docs.typo3.org/typo3cms/extensions/core/Changelog/7.3/Breaking-63846-FormEngineRefactoring.html\n\next_localconf.php\nAccess to array key \"formevals\" (weak)\n71 $TYPO3_CONF_VARS['SC_OPTIONS']['tce']['formevals']['\\In2code\\Powermail\\Tca\\EvaluateEmail'] =\nBreaking: #67749 - Force class auto loading for various hooks\nhttps://docs.typo3.org/typo3cms/extensions/core/Changelog/7.4/Breaking-67749-ForceAutoloadingForVariousHooks.html\n```\n### HTML\nA part of the html output for:\n```bash\ntypo3scan.phar scan ~/tmp/source/coreapi -f html -t 7\n```\nLooks like this:\n\n![](./Documentation/Screenshots/Html.png)\n### Junit\nA part of the junit output for:\n```bash\ntypo3scan.phar scan ~/tmp/source/coreapi -f junit -t 7\n```\nLooks like this:\n\n![](./Documentation/Screenshots/Junit.png)\n\n## Contributing\nIf 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!\n\nYou can contribute here: [TYPO3scan src repository](https://github.com/Tuurlijk/typo3scan-src)\n\n## Sponsors\nThis project was generously sponsored by [Stichting Praktijkleren](https://www.stichtingpraktijkleren.nl/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmschwemer%2Ftypo3scan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmschwemer%2Ftypo3scan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmschwemer%2Ftypo3scan/lists"}