Project

General

Profile

Actions

Bug #95607

closed

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

Added by Dennis Römmich about 3 years ago. Updated about 2 years ago.

Status:
Closed
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);


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #97522: Word "new" in command "description" breaks DIClosed2022-04-29

Actions
Has duplicate TYPO3 Core - Bug #99128: Symfony Command: Keyword 'new' breaks DependencyInjectionContainer fileClosed2022-11-18

Actions
Actions #2

Updated by Benjamin Franzke about 3 years ago

  • Assignee set to Benjamin Franzke
Actions #3

Updated by Gerrit Code Review about 3 years 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

Actions #4

Updated by Gerrit Code Review about 3 years 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

Actions #5

Updated by Benjamin Franzke about 3 years ago

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

Updated by Oliver Bartsch over 2 years ago

  • Related to Bug #97522: Word "new" in command "description" breaks DI added
Actions #7

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed
Actions #8

Updated by Benjamin Franzke about 2 years ago

  • Has duplicate Bug #99128: Symfony Command: Keyword 'new' breaks DependencyInjectionContainer file added
Actions

Also available in: Atom PDF