core icon indicating copy to clipboard operation
core copied to clipboard

fix(symfony): make `WriteListener` compatible with `MainController`

Open ihmels opened this issue 1 year ago • 3 comments

While "data" is set in the context in the MainController, this was not the case with the WriteListener.

I noticed this after updating from v3.2.14 to v3.3.3. Although I had set event_listeners_backward_compatibility_layer to false, the Symfony events were used again instead of the MainController. I had to set use_symfony_listeners to false so that I could restore the behavior of v3.2.14.

Shouldn't use_symfony_listeners be false if event_listeners_backward_compatibility_layer is also set to false?

Q A
Branch? 3.3
Tickets
License MIT
Doc PR

ihmels avatar May 23 '24 15:05 ihmels

Shouldn't use_symfony_listeners be false if event_listeners_backward_compatibility_layer is also set to false?

Not really as use_symfony_listeners: false also breaks some behaviors for example attributes like read.

soyuka avatar May 24 '24 05:05 soyuka

Not really as use_symfony_listeners: false also breaks some behaviors for example attributes like read.

But shouldn't the MainController be used if event_listeners_backward_compatibility_layer is set to false?

ihmels avatar May 24 '24 13:05 ihmels

MainController is never used with listeners, when listeners are enabled we use the PlaceholderAction. Forget the event_listeners_backward_compatibility_layer it's not needed anymore, now you can just pick whether:

  • symfony_use_listeners=true uses PlaceholderAction (or your own controller)
  • symfony_use_listeners=false uses the MainController

Maybe that I should just unset the event_listeners_backward_compatibility_layer flag if use_symfony_listeners is set?

soyuka avatar May 24 '24 16:05 soyuka

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 23 '24 23:07 stale[bot]