Skip to content

[DependencyInjection] Dumping out container may produce syntax error code #8030

@tgabi333

Description

@tgabi333

Create a service where name contains "-" and there will be a syntax error.

I think the root of the problem is that PhpDumper uses Container::camelize to generate function names which doesn't comply with PHP labels.

In my opinion, PhpDumper should use an internal function to generate PHP label-safe identifiers from service names, it would be more general solution than restrict service names.

If you agree i would like to push this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueIdeal for your first contribution! (some Symfony experience may be required)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions