ecotone-dev icon indicating copy to clipboard operation
ecotone-dev copied to clipboard

Add parameter("...") support in Ecotone expression attributes

Open ralfkuehnel opened this issue 3 weeks ago • 1 comments

I’m working with Symfony + Ecotone and ran into a limitation with expression attributes like:

#[Delayed(expression: '%app.timeout% * 60 * 1000')]

Using %...% placeholders requires pre-processing and causes syntax errors during tests.

I wanted to propose an alternative approach: introducing a parameter("...") function in Ecotone expressions, so it could look like this:

#[Delayed(expression: 'parameter("app.timeout") * 60 * 1000')]

Benefits:

  • No parsing of %...% required, native Ecotone expressions
  • Works seamlessly with Symfony’s ParameterBagInterface
  • Cleaner syntax and easier testing

Would you be open to adding this feature? I can prepare a PR if you agree.

Thanks!

ralfkuehnel avatar Nov 03 '25 19:11 ralfkuehnel

Hey @ralfkuehnel,

I think make sense, feel free to open PR.

Please use ConfigurationVariableService to fetch parameters, as this is the Service that work across different implementations (Symfony, Laravel, Ecotone Lite).

dgafka avatar Nov 04 '25 07:11 dgafka