Actions
Bug #95607
closedKeyword "new" leads to corrupt DependencyInjectionContainer_...php
Start date:
2021-10-12
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
I defined a console command through the Services.yaml. And whenever i use the word “new” inside of my command description, the whole dependencyInjection container breaks. It replaces my description with the string:
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstanceForDi(
Steps to reproduce:
1. Create a new console command in your Services.yaml eg:
services: My\Great\Command\SmthCommand: tags: - name: 'console.command' command: 'do:sth' description: 'This is a cool new Command' schedulable: false
2. Clear the cache: vendor/bin/typo3 cache:flush
Since the Description includes the word "new" the cached DependencyInjectionContainer class beneath var/ will result in:
$a->addLazyCommand('do:sth', 'My\\Great\\Command\\SmthCommand', 'This is a cool \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstanceForDi(Command', false, false, NULL);
Actions