Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b2524d4

Browse filesBrowse files
committed
minor #12033 [Form] Removed constructor argument from FormTypeHttpFoundationExtension for forward compatibility with 2.5 (webmozart)
This PR was merged into the 2.3 branch. Discussion ---------- [Form] Removed constructor argument from FormTypeHttpFoundationExtension for forward compatibility with 2.5 | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This argument was introduced in #11924. No release was made of the 2.3 branch after merging that PR. Since a different constructor argument (`$requestHandler`) was added to FormTypeHttpFoundationExtension in the 2.5 branch, we cannot merge this forward in a BC fashion. For this reason, I removed the argument again. Commits ------- 6cbc862 [Form] Removed constructor argument from FormTypeHttpFoundationExtension for forward compatibility with 2.5
2 parents d671406 + 6cbc862 commit b2524d4
Copy full SHA for b2524d4

File tree

Expand file treeCollapse file tree

3 files changed

+3
-18
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+3
-18
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,8 @@
151151
</service>
152152

153153
<!-- FormTypeHttpFoundationExtension -->
154-
<service id="form.server_params" class="Symfony\Component\Form\Util\ServerParams" public="false"/>
155-
156154
<service id="form.type_extension.form.http_foundation" class="Symfony\Component\Form\Extension\HttpFoundation\Type\FormTypeHttpFoundationExtension">
157155
<tag name="form.type_extension" alias="form" />
158-
<argument type="service" id="form.server_params"/>
159156
</service>
160157

161158
<!-- FormTypeValidatorExtension -->

‎src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationExtension.php
+1-12Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Form\Extension\HttpFoundation;
1313

1414
use Symfony\Component\Form\AbstractExtension;
15-
use Symfony\Component\Form\Util\ServerParams;
1615

1716
/**
1817
* Integrates the HttpFoundation component with the Form library.
@@ -21,20 +20,10 @@
2120
*/
2221
class HttpFoundationExtension extends AbstractExtension
2322
{
24-
/**
25-
* @var ServerParams
26-
*/
27-
private $serverParams;
28-
29-
public function __construct(ServerParams $serverParams = null)
30-
{
31-
$this->serverParams = $serverParams;
32-
}
33-
3423
protected function loadTypeExtensions()
3524
{
3625
return array(
37-
new Type\FormTypeHttpFoundationExtension($this->serverParams),
26+
new Type\FormTypeHttpFoundationExtension(),
3827
);
3928
}
4029
}

‎src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/HttpFoundation/Type/FormTypeHttpFoundationExtension.php
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Symfony\Component\Form\Extension\HttpFoundation\EventListener\BindRequestListener;
1616
use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler;
1717
use Symfony\Component\Form\FormBuilderInterface;
18-
use Symfony\Component\Form\Util\ServerParams;
1918

2019
/**
2120
* @author Bernhard Schussek <bschussek@gmail.com>
@@ -32,10 +31,10 @@ class FormTypeHttpFoundationExtension extends AbstractTypeExtension
3231
*/
3332
private $requestHandler;
3433

35-
public function __construct(ServerParams $serverParams = null)
34+
public function __construct()
3635
{
3736
$this->listener = new BindRequestListener();
38-
$this->requestHandler = new HttpFoundationRequestHandler($serverParams);
37+
$this->requestHandler = new HttpFoundationRequestHandler();
3938
}
4039

4140
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.