Closed patrickkusebauch closed 3 years ago
Version: v3.1.4
When a Nette extension validates it's input parameters via Nette Validator, you cannot use Nette Dynamic parameters.
kdyby/rabbitmq
parameters: messageQueue: host: %env.MESSAGE_QUEUE_HOST% user: %env.MESSAGE_QUEUE_USER% password: %env.MESSAGE_QUEUE_PASSWORD% db: %env.MESSAGE_QUEUE_DB%
rabbitmq: connection: host: %messageQueue.host% port: 5672 user: %messageQueue.user% password: %messageQueue.password% vhost: %messageQueue.db%
3. and Booting.php like this: ```php $configurator->addDynamicParameters([ 'env' => getenv(), ]);
The value of the dynamic parameter is passed, not the reference to it.
Typecasting in the configuration file
It must be fixed in kdyby/rabbitmq. Like Validators::assertField($config, 'user', 'string|Nette\DI\DynamicParameter')
Validators::assertField($config, 'user', 'string|Nette\DI\DynamicParameter')
Version: v3.1.4
Bug Description
When a Nette extension validates it's input parameters via Nette Validator, you cannot use Nette Dynamic parameters.
Steps To Reproduce
kdyby/rabbitmq
rabbitmq: connection: host: %messageQueue.host% port: 5672 user: %messageQueue.user% password: %messageQueue.password% vhost: %messageQueue.db%
Expected Behavior
The value of the dynamic parameter is passed, not the reference to it.
Possible Solution
Typecasting in the configuration file