symfony: Expression engine doesn't handle expressions inside parameters
I’m getting _Call to undefined method Symfony\Component\ExpressionLanguage\Expression::_set_state() … in /app/var/cache/dev/appDevDebugProjectContainer.php line 8170
When I set up the parameter like:
parameters:
session_save_path: "@=service('opensky.runtime_config').get('app.session_save_path')"
The line 8170 has the following code.
protected function getDefaultParameters()
{
return array(
....
'session_save_path' => Symfony\Component\ExpressionLanguage\Expression::__set_state(array(
'expression' => 'service(\'opensky.runtime_config\').get(\'app.session_save_path\')',
)),
....
The service that receives that specific parameter works just fine.
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Reactions: 2
- Comments: 16 (5 by maintainers)
@stof yes I could do that. I just mentioned it as an example, and there could be many other cases. That would be a kind of syntatic sugar.
Please don’t. I really need this feature in a multitenant application. Having an app for each tenant uses way to many memory. edit: maybe a closure could be dumped into the array if it cannot be solved otherwise. Or such parameters should be dumped into another function e.g.
getExpressionParameter