Bug #95607

Keyword "new" leads to corrupt DependencyInjectionContainer_...php

Added by Dennis Römmich about 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Should have
Category:
-
Target version:
-
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);

#2

Updated by Benjamin Franzke about 2 months ago

  • Assignee set to Benjamin Franzke
#3

Updated by Gerrit Code Review about 2 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71606

#4

Updated by Gerrit Code Review about 2 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/71606

#5

Updated by Benjamin Franzke about 2 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF