nette/di

Unable to pass underscore as argument

Closed this issue · 1 comments

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.

dg commented

I will try to find a solution, for now please use the older version.