Skip to content

Unable to pass underscore as argument #264

Description

@elektro-potkan

Version: 3.0.10

Bug Description

After upgrading nette/di from 3.0.9 to 3.0.10, there is an exception thrown when underscore is used as an argument to function or method.
di-err-underscore_tracy-bluescreen-2

Steps To Reproduce

Stub class:

<?php

declare(strict_types=1);

class MyClass {
	public function __construct(string $something){
		// do something
	}
}

NEON config:

services:
	- MyClass(::implode('_', ['one', 'two']))

Expected Behavior

The constructor of MyClass will be called with string one_two as a result of implode('_', ['one', 'two']) function call.

Possible Solution

This is probably caused by the commit 89893da.
I am sorry, but I am not aware of any escape sequence to pass just the underscore as a string argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions