mschwemer / typo3scan

Scans TYPO3 extensions for usage of deprecated and or changed code
MIT License
94 stars 15 forks source link

Some .rst files are missing #25

Closed alexanderschnitzler closed 5 years ago

alexanderschnitzler commented 5 years ago

I just used the scanner with version 1.6.0 and got no output at all while scanning an extension with target version 8. Reason is, that not all necessary rst files are to be found in this repository.

In my case /8.6/Deprecation-51291-PageRepositoryShouldFieldBeOverlaid.rst is missing, which then leads to an error in `\MichielRoos\TYPO3Scan\Command\ScanCommand::findRstFile``

Here's the complete stack trace of both a warning and an error thrown:

PHP Notice:  Undefined index: Deprecation-51291-PageRepositoryShouldFieldBeOverlaid.rst in ./typo3scan/src/TYPO3Scan/Command/ScanCommand.php on line 466
PHP Stack trace:
PHP   1. {main}() ./typo3scan/bin/typo3scan:0
PHP   2. MichielRoos\TYPO3Scan\Console\Application->run($input = *uninitialized*, $output = *uninitialized*) ./typo3scan/bin/typo3scan:37
PHP   3. MichielRoos\TYPO3Scan\Console\Application->doRun($input = *uninitialized*, $output = *uninitialized*) ./typo3scan/vendor/symfony/console/Application.php:148
PHP   4. MichielRoos\TYPO3Scan\Console\Application->doRunCommand($command = *uninitialized*, $input = *uninitialized*, $output = *uninitialized*) ./typo3scan/vendor/symfony/console/Application.php:248
PHP   5. MichielRoos\TYPO3Scan\Command\ScanCommand->run($input = *uninitialized*, $output = *uninitialized*) ./typo3scan/vendor/symfony/console/Application.php:953
PHP   6. MichielRoos\TYPO3Scan\Command\ScanCommand->execute($input = *uninitialized*, $output = *uninitialized*) ./typo3scan/vendor/symfony/console/Command/Command.php:255
PHP   7. Twig_TemplateWrapper->render($context = *uninitialized*) ./typo3scan/src/TYPO3Scan/Command/ScanCommand.php:179
PHP   8. __TwigTemplate_285667e7cde5e68772a4c77b1d12193b4fd1d2ed99a979cb119fb044d821ceaf->render($context = *uninitialized*) ./typo3scan/vendor/twig/twig/lib/Twig/TemplateWrapper.php:43
PHP   9. __TwigTemplate_285667e7cde5e68772a4c77b1d12193b4fd1d2ed99a979cb119fb044d821ceaf->display($context = *uninitialized*, $blocks = *uninitialized*) ./typo3scan/vendor/twig/twig/lib/Twig/Template.php:375
PHP  10. __TwigTemplate_285667e7cde5e68772a4c77b1d12193b4fd1d2ed99a979cb119fb044d821ceaf->displayWithErrorHandling($context = *uninitialized*, $blocks = *uninitialized*) ./typo3scan/vendor/twig/twig/lib/Twig/Template.php:367
PHP  11. __TwigTemplate_285667e7cde5e68772a4c77b1d12193b4fd1d2ed99a979cb119fb044d821ceaf->doDisplay($context = *uninitialized*, $blocks = *uninitialized*) ./typo3scan/vendor/twig/twig/lib/Twig/Template.php:390
PHP  12. MichielRoos\TYPO3Scan\Command\ScanCommand->MichielRoos\TYPO3Scan\Command\{closure:./typo3scan/src/TYPO3Scan/Command/ScanCommand.php:283-286}($path = *uninitialized*) ./typo3scan/vendor/twig/twig/lib/Twig/Environment.php(378) : eval()'d code:268
PHP  13. MichielRoos\TYPO3Scan\Command\ScanCommand->findRstFile($path = *uninitialized*) ./typo3scan/src/TYPO3Scan/Command/ScanCommand.php:284
#0 ./typo3scan/src/TYPO3Scan/Command/ScanCommand.php(284): MichielRoos\TYPO3Scan\Command\ScanCommand->findRstFile('/8.6/Deprecatio...')
#1 ./typo3scan/vendor/twig/twig/lib/Twig/Environment.php(378) : eval()'d code(268): MichielRoos\TYPO3Scan\Command\ScanCommand->MichielRoos\TYPO3Scan\Command\{closure}('/8.6/Deprecatio...')
#2 ./typo3scan/vendor/twig/twig/lib/Twig/Template.php(390): __TwigTemplate_285667e7cde5e68772a4c77b1d12193b4fd1d2ed99a979cb119fb044d821ceaf->doDisplay(Array, Array)
#3 ./typo3scan/vendor/twig/twig/lib/Twig/Template.php(367): Twig_Template->displayWithErrorHandling(Array, Array)
#4 ./typo3scan/vendor/twig/twig/lib/Twig/Template.php(375): Twig_Template->display(Array)
#5 /V in ./typo3scan/src/TYPO3Scan/Command/ScanCommand.php on line 466
alexanderschnitzler commented 5 years ago

The mentioned file had been moved. The offending commit is this one: https://github.com/TYPO3/TYPO3.CMS/commit/7e00cefe044fdaabff479bf8fe4e7e768ba96792

I'll try to create a PR later.

alexanderschnitzler commented 5 years ago

This is not an issue in this repository. Needs to be fixed in https://github.com/ohader/scanner. See: https://github.com/ohader/scanner/issues/10