Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[ExpressionLanguage] throw exception when parameters contain expressions#9700
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
aitboudad commentedDec 4, 2013
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #9658 |
License | MIT |
Doc PR | symfony/symfony-docs#3232 |
mvrhov commentedDec 5, 2013
I already said that throwing the exception is the easy way, and I don't agree with that as it really doesn't solve the actual problem. If this cannot be solved otherwise I'd rather have getParameter returning null. And documentation explicitly stating that when parameters contain expression the getParameter function returns null for that specific parameter |
@mvrhov why do you want to use expressions in parameters? If you want to do that, you should create the parameter in the Extension of the bundle |
mvrhov commentedDec 6, 2013
I said that in original ticket in my case that's for multitenat application Where some parameters are dependant on the tenant. |
@mvrhov As parameters are resolved at compilation time and dumped statically, it won't work. You should use the expression in the argument instead of using it in a parameter. |
mvrhov commentedDec 6, 2013
I can't configure 3rd party bundles like this? Also the services that are configured via parameters.yml seem to work just fine, the only problem ATM is the parameters array. That's why my suggestion is to write null for those keys. |
mvrhov commentedDec 6, 2013
I've updated the original issue with additional information. |
…n expressions (aitboudad)This PR was merged into the 2.4 branch.Discussion----------[ExpressionLanguage] throw exception when parameters contain expressions| Q | A| ------------- | ---| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#9658| License | MIT| Doc PR |symfony/symfony-docs#3232Commits-------ca123bc [ExpressionLanguage] throw exception when parameters contain expressions