8000 minor #12033 [Form] Removed constructor argument from FormTypeHttpFou… · symfony/symfony@b2524d4 · GitHub
[go: up one dir, main page]

Skip to content

Commit b2524d4

Browse 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

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

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

Lines 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

Lines 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

Lines 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