Skip to content

Container::$parameters contains unresolved Statement instances #221

@xificurk

Description

@xificurk

Version: dev-master, 3.0.x, 2.4.x

Bug Description

Parameters attribute in generated DI container contain unresolved Nette\DI\Definitions\Statement instances.

Steps To Reproduce

Generate container with the following config:

parameters:
	bar: ::getenv(FOO)

The generated code of DI container will have something like this in constructor:

$this->parameters += [
	'bar' => Nette\PhpGenerator\Helpers::createObject('Nette\DI\Definitions\Statement', [
		'arguments' => ['FOO'],
		"\x00Nette\\DI\\Definitions\\Statement\x00entity" => ['', 'getenv'],
	]),
];

Expected Behavior

I would expect the parameters to be resolved the same way as they are if they are used as arguments in service definitions.

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