Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DI: replacing %foo% in config by parameters does not work for array keys #766

Closed
janmarek opened this issue Sep 6, 2012 · 1 comment
Closed

Comments

@janmarek
Copy link
Contributor

janmarek commented Sep 6, 2012

I tried to configure authenticator service like this:

parameters:
  username: user
  password: 1234

services:
  authenticator: Nette\Security\SimpleAuthenticator({%username%: %password%})

And in generated service factory there was

array('%username%' => 1234)

passed to constructor.

@dg
Copy link
Member

dg commented Apr 1, 2013

In current implementation parameter are expanded quite late and support them in keys is very very difficult. It should be supported if we move expansion immediately after loading file. But it bring BC breaks, see http://forum.nette.org/cs/12881-dependency-injection-v-nette-2-1#p92188

@dg dg closed this as completed Apr 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants