Skip to content

Unable to pass underscore as argument #264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
elektro-potkan opened this issue Sep 29, 2021 · 1 comment
Closed

Unable to pass underscore as argument #264

elektro-potkan opened this issue Sep 29, 2021 · 1 comment

Comments

@elektro-potkan
Copy link

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
Copy link
Member

dg commented Sep 29, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants