Skip to content

Commit 4c767e6

Browse files
committed
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
2 parents baf13c1 + 455b714 commit 4c767e6

File tree

1 file changed

+7
-1
lines changed
  • src/Symfony/Bundle/FrameworkBundle/Resources/config

1 file changed

+7
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,13 @@
154154
</service>
155155

156156
<!-- HttpFoundationRequestHandler -->
157-
<service id="form.type_extension.form.request_handler" class="%form.type_extension.form.request_handler.class%" public="false" />
157+
<service id="form.type_extension.form.request_handler" class="%form.type_extension.form.request_handler.class%" public="false">
158+
<argument type="service" id="form.server_params" />
159+
</service>
160+
161+
<service id="form.server_params" class="Symfony\Component\Form\Util\ServerParams" public="false">
162+
<argument type="service" id="request_stack" />
163+
</service>
158164

159165
<!-- FormTypeValidatorExtension -->
160166
<service id="form.type_extension.form.validator" class="Symfony\Component\Form\Extension\Validator\Type\FormTypeValidatorExtension">

0 commit comments

Comments
 (0)