Skip to content

Problem with Kdyby\RabbitMQ extension expected string, got Nette\DI\Statement #4

@JanMikes

Description

@JanMikes

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions