Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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