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

janmarek opened this issue Sep 6, 2012 · 1 comment


Copy link

@janmarek janmarek commented Sep 6, 2012

I tried to configure authenticator service like this:

  username: user
  password: 1234

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

And in generated service factory there was

array('%username%' => 1234)

passed to constructor.

Copy link

@dg 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

@dg dg closed this Apr 1, 2013
dg added a commit to nette/di that referenced this issue Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants