-
-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Version: 3.1.10
Bug Description
Includes section can expand only parameters which are set to Nette\DI\Config\Loader::setParameters. Parameters which are set in parameters section in config files are ignored.
Steps To Reproduce
Neon file:
parameters:
# filesystem type local|s3|ftp
filesystemType: local
includes:
- filesystems/filesystem-%filesystemType%.neonEnds with exception Nette\InvalidArgumentException Missing parameter 'filesystemType'.
Expected Behavior
Before processing includes section in neon files merge parameters from parameters section.
Possible Solution
Maybe this change can be enough:
In /src/DI/Config/Loader.php:56 add these lines:
if (isset($data[Nette\DI\Compiler::Parameters])) {
$this->parameters = Nette\Schema\Helpers::merge($this->parameters, $data[Nette\DI\Compiler::Parameters]);
$this->parameters = Nette\DI\Helpers::expand($this->parameters, $this->parameters, true);
}And of course, make public constant Nette\DI\Compiler::Parameters ..
Kcko and ustpcz
Metadata
Metadata
Assignees
Labels
No labels