Baldinof / roadrunner-bundle

A RoadRunner worker integrated in your Symfony app
MIT License
270 stars 48 forks source link

StreamedResponseListener deprecated as of Symfony 6.1 #84

Closed brzuchal closed 2 years ago

brzuchal commented 2 years ago

Got this on container build

In DecoratorServicePass.php line 84:

  The service "Baldinof\RoadRunnerBundle\Integration\Symfony\StreamedResponseListener" has a dependency on a non-existent service "streamed_response_listener".  

It looks like as of Symfony 6.1 this listener is deprecated.

brzuchal commented 2 years ago

It looks like simple temporary solution can be achieved by adding it back to the services definition files using:

YAML

services:
    streamed_response_listener:
        class: Symfony\Component\HttpKernel\EventListener\StreamedResponseListener
        tags:
        - kernel.event_subscriber
        - container.hot_path

XML

<?xml version="1.0" encoding="utf-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
  <services>
    <service id="streamed_response_listener" class="Symfony\Component\HttpKernel\EventListener\StreamedResponseListener">
      <tag name="kernel.event_subscriber"/>
      <tag name="container.hot_path"/>
    </service>
  </services>
</container>