config.neon:
rabbitmq:
connection:
host: @env::get('RABBIT_HOST', 'localhost')
port: @env::get('RABBIT_PORT', '5672')
user: @env::get('RABBIT_USER', 'guest')
password: @env::get('RABBIT_PASSWORD', 'guest')
vhost: @env::get('RABBIT_VHOST', '/')
Exception we are receiving: The The config item 'user' of connection rabbitmq.default expects to be string in range 3.., object Nette\DI\Statement given.
This is causing the problem: https://github.com/Kdyby/RabbitMq/blob/master/src/Kdyby/RabbitMq/DI/RabbitMqExtension.php#L244
The problem is that Nette\DI\Statement is not translated into native types (string/int) soon enough.
Workaround we are considering is creating Phing task, that will create config.local.neon with values from getenv()