Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[DI] 3.4 Service definitions with line breaks in arguments/properties dumped incorrectly when as_files option used #24470

Copy link
Copy link
Closed
@Strate

Description

@Strate
Issue body actions
Q A
Bug report? yes
Feature request? no
BC Break report? yes
RFC? no
Symfony version 3.4.x

Assume we have a service with multi-line string used as value for property:

    some_service_id:
        class: stdClass
        properties:
            test1: 1
            test2: >
                Text (
                    Inner Text
                )
            test3: 321

This is how this definition dumped to php code when PhpDumper used with as_files option (default):

<?php

use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;

// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
// Returns the public 'some_service_id' shared service.

$this->services['some_service_id'] = $instance = new \stdClass();

$instance->test1 = 1;
$instance->test2 = 'Text (
r Text


$instance->test3 = 321;

return $instance;

This file contains incorrect test2 property, and incorrect syntax.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.