-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Bundles] Passing parameter value to bundle integerNode
value you get string value instead of defined value
#38873
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
Comments
integerNode
value you get string value instead of defined value
Hey, thanks for your report! |
Hi, the workarround is to just pass the value directly but then you have 2 config values. Let me know if you want me to pick it up i think solution 1 is the most neat one |
See also #40906, beforeNormalization is up for debate :) |
Hey, thanks for your report! |
Could I get an answer? If I do not hear anything I will assume this issue is resolved or abandoned. Please get back to me <3 |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
Symfony version(s) affected: 4.4 (probably others to)
Description
When writing configuration for a bundle and you use a
integerNode
you cannot use paramater values to set this configuration because the value that is passed is a string. Also when you usebeforeNormalization
to parse string values you will get the parameter name instead of the parameter value you have set for that parameter.How to reproduce
Add a integer node like:
configuration.php
Set parameter value:
parameters.yaml
Use parameter value to set the
integerNode
:bundle.yaml
Now you will get 0 as
$value
because passed value tobeforeNormalization
is%price_value%
instead of expected1000
Possible Solution
1000
instead of%price_value%
when we pass the value to bundle configurationThe text was updated successfully, but these errors were encountered: