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

Comments

Projects
None yet
2 participants
@janmarek
Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

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 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
You can’t perform that action at this time.