Skip to content

Commit

Permalink
minor #34617 [FWBundle] Remove error_renderer.serializer if the Seria…
Browse files Browse the repository at this point in the history
…lizer isn't available (dunglas)

This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[FWBundle] Remove error_renderer.serializer if the Serializer isn't available

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

(Should help for https://github.com/hautelook/AliceBundle/pull/485).

Commits
-------

0b4c21b [FWBundle] Remove error_renderer.serializer if the Serializer isn't available
  • Loading branch information
nicolas-grekas committed Nov 28, 2019
2 parents c79a498 + 0b4c21b commit ac20382
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Expand Up @@ -14,19 +14,7 @@
<argument type="service" id="logger" on-invalid="null" />
</service>

<service id="error_handler.error_renderer.serializer" class="Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer">
<argument type="service" id="serializer" />
<argument type="service">
<service>
<factory class="Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer" method="getPreferredFormat" />
<argument type="service" id="request_stack" />
</service>
</argument>
<argument type="service" id="error_renderer.html" />
</service>

<service id="error_renderer.html" alias="error_handler.error_renderer.html" />
<service id="error_renderer.serializer" alias="error_handler.error_renderer.serializer" />
<service id="error_renderer" alias="error_renderer.html" />
</services>
</container>
16 changes: 14 additions & 2 deletions src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml
Expand Up @@ -12,8 +12,6 @@
<services>
<defaults public="false" />

<service id="error_renderer" alias="error_renderer.serializer" />

<service id="serializer" class="Symfony\Component\Serializer\Serializer" public="true">
<argument type="collection" />
<argument type="collection" />
Expand Down Expand Up @@ -152,5 +150,19 @@

<tag name="property_info.list_extractor" priority="-999" />
</service>

<!-- ErrorRenderer integration -->
<service id="error_renderer" alias="error_renderer.serializer" />
<service id="error_renderer.serializer" alias="error_handler.error_renderer.serializer" />
<service id="error_handler.error_renderer.serializer" class="Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer">
<argument type="service" id="serializer" />
<argument type="service">
<service>
<factory class="Symfony\Component\ErrorHandler\ErrorRenderer\SerializerErrorRenderer" method="getPreferredFormat" />
<argument type="service" id="request_stack" />
</service>
</argument>
<argument type="service" id="error_renderer.html" />
</service>
</services>
</container>

0 comments on commit ac20382

Please sign in to comment.