feature #13615 [FrameworkBundle] Made ServerParams a service (rpg600)

This PR was submitted for the 2.5 branch but it was merged into the 2.7 branch instead (closes #13615).

Discussion
----------

[FrameworkBundle] Made ServerParams a service

| Q             | A
| ------------- | ---
| Bug fix?      | [yes]
| New feature?  | [no]
| BC breaks?    | [no]
| Deprecations? | [no]
| Tests pass?   | [yes]
| License       | MIT

Since 2.5 we can inject the request stack in ServerParams (see #10912).
Now when a request is handled by HttpFoundationRequestHandler, the content length will be fetched via the current request and not the super global anymore.

Commits
-------

455b714 [FrameworkBundle] Made ServerParams a service
This commit is contained in:
Fabien Potencier 2015-02-16 10:06:55 +01:00
commit 4c767e64b2

View File

@ -154,7 +154,13 @@
</service>
<!-- HttpFoundationRequestHandler -->
<service id="form.type_extension.form.request_handler" class="%form.type_extension.form.request_handler.class%" public="false" />
<service id="form.type_extension.form.request_handler" class="%form.type_extension.form.request_handler.class%" public="false">
<argument type="service" id="form.server_params" />
</service>
<service id="form.server_params" class="Symfony\Component\Form\Util\ServerParams" public="false">
<argument type="service" id="request_stack" />
</service>
<!-- FormTypeValidatorExtension -->
<service id="form.type_extension.form.validator" class="Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension">