We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried to use rector on EXT:imagecycle (https://extensions.typo3.org/extension/imagecycle) and got this error:
/files/.mwsoftware/composer/vendor/bin/rector process typo3conf/ext/imagecycle/ --autoload-file=autoload.php 56/110 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░] 50%Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, null given in /files/.mwsoftware/composer/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Conditions/GlobalStringConditionMatcher.php:37 Stack trace: #0 /files/.mwsoftware/composer/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Conditions/GlobalStringConditionMatcher.php(37): trim(NULL) #1 /files/.mwsoftware/composer/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/v9/v4/OldConditionToExpressionLanguageTypoScriptRector.php(73): Ssch\TYPO3Rector\FileProcessor\TypoScript\Conditions\GlobalStringConditionMatcher->change('...') #2 /files/.mwsoftware/composer/vendor/helmich/typo3-typoscript-parser/src/Parser/Traverser/AggregatingVisitor.php(45): Ssch\TYPO3Rector\FileProcessor\TypoScript\Rector\v9\v4\OldConditionToExpressionLanguageTypoScriptRector->enterNode(Object(Helmich\TypoScriptParser\Parser\AST\ConditionalStatement)) #3 /files/.mwsoftware/composer/vendor/helmich/typo3-typoscript-parser/src/Parser/Traverser/Traverser.php(57): Helmich\TypoScriptParser\Parser\Traverser\AggregatingVisitor->enterNode(Object(Helmich\TypoScriptParser\Parser\AST\ConditionalStatement)) #4 /files/.mwsoftware/composer/vendor/helmich/typo3-typoscript-parser/src/Parser/Traverser/Traverser.php(46): Helmich\TypoScriptParser\Parser\Traverser\Traverser->walkRecursive(Array) #5 /files/.mwsoftware/composer/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/TypoScriptFileProcessor.php(201): Helmich\TypoScriptParser\Parser\Traverser\Traverser->walk() #6 /files/.mwsoftware/composer/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/TypoScriptFileProcessor.php(159): Ssch\TYPO3Rector\FileProcessor\TypoScript\TypoScriptFileProcessor->processFile(Object(Rector\Core\ValueObject\Application\File)) #7 /files/.mwsoftware/composer/vendor/rector/rector/src/Application/ApplicationFileProcessor.php(169): Ssch\TYPO3Rector\FileProcessor\TypoScript\TypoScriptFileProcessor->process(Object(Rector\Core\ValueObject\Application\File), Object(Rector\Core\ValueObject\Configuration)) #8 /files/.mwsoftware/composer/vendor/rector/rector/src/Application/ApplicationFileProcessor.php(139): Rector\Core\Application\ApplicationFileProcessor->processFiles(Array, Object(Rector\Core\ValueObject\Configuration)) #9 /files/.mwsoftware/composer/vendor/rector/rector/src/Console/Command/ProcessCommand.php(120): Rector\Core\Application\ApplicationFileProcessor->run(Object(Rector\Core\ValueObject\Configuration), Object(RectorPrefix202306\Symfony\Component\Console\Input\ArgvInput)) #10 /files/.mwsoftware/composer/vendor/rector/rector/vendor/symfony/console/Command/Command.php(325): Rector\Core\Console\Command\ProcessCommand->execute(Object(RectorPrefix202306\Symfony\Component\Console\Input\ArgvInput), Object(RectorPrefix202306\Symfony\Component\Console\Output\ConsoleOutput)) #11 /files/.mwsoftware/composer/vendor/rector/rector/vendor/symfony/console/Application.php(944): RectorPrefix202306\Symfony\Component\Console\Command\Command->run(Object(RectorPrefix202306\Symfony\Component\Console\Input\ArgvInput), Object(RectorPrefix202306\Symfony\Component\Console\Output\ConsoleOutput)) #12 /files/.mwsoftware/composer/vendor/rector/rector/vendor/symfony/console/Application.php(326): RectorPrefix202306\Symfony\Component\Console\Application->doRunCommand(Object(Rector\Core\Console\Command\ProcessCommand), Object(RectorPrefix202306\Symfony\Component\Console\Input\ArgvInput), Object(RectorPrefix202306\Symfony\Component\Console\Output\ConsoleOutput)) #13 /files/.mwsoftware/composer/vendor/rector/rector/src/Console/ConsoleApplication.php(49): RectorPrefix202306\Symfony\Component\Console\Application->doRun(Object(RectorPrefix202306\Symfony\Component\Console\Input\ArgvInput), Object(RectorPrefix202306\Symfony\Component\Console\Output\ConsoleOutput)) #14 /files/.mwsoftware/composer/vendor/rector/rector/vendor/symfony/console/Application.php(212): Rector\Core\Console\ConsoleApplication->doRun(Object(RectorPrefix202306\Symfony\Component\Console\Input\ArgvInput), Object(RectorPrefix202306\Symfony\Component\Console\Output\ConsoleOutput)) #15 /files/.mwsoftware/composer/vendor/rector/rector/bin/rector.php(132): RectorPrefix202306\Symfony\Component\Console\Application->run() #16 /files/.mwsoftware/composer/vendor/rector/rector/bin/rector(5): require_once('...') #17 /files/.mwsoftware/composer/vendor/bin/rector(117): include('...') #18 {main} thrown in /files/.mwsoftware/composer/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Conditions/GlobalStringConditionMatcher.php on line 37
The text was updated successfully, but these errors were encountered:
composer/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/v9/v4/OldConditionToExpressionLanguageTypoScriptRector.php finds condition where no condition is: https://github.com/franzholz/imagecycle/blob/master/Configuration/TCA/Overrides/tt_news.php
I change line 37-40 to
$type = trim($matches['type'] ?? ''); $property = trim($matches['property'] ?? ''); $operator = trim($matches['operator'] ?? ''); $value = trim($matches['value'] ?? '');
Error is gone but I don't think this is the correct solution
Sorry, something went wrong.
@ste101 Thanks. I guess the reason is this line here: https://github.com/franzholz/imagecycle/blob/master/Configuration/TypoScript/PluginSetup/tt_news/nivoslider/setup.txt#L1
Rector cannot rewrite this condition, because there is no equivalent for the Symfony Expression Language.
I have fixed the error in the latest release.
Successfully merging a pull request may close this issue.
Bug Report
I tried to use rector on EXT:imagecycle (https://extensions.typo3.org/extension/imagecycle) and got this error:
The text was updated successfully, but these errors were encountered: