8000 [Form] Removed constructor argument from FormTypeHttpFoundationExtension for forward compatibility with 2.5 by webmozart · Pull Request #12033 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Removed constructor argument from FormTypeHttpFoundationExtension for forward compatibility with 2.5 #12033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,8 @@
</service>

<!-- FormTypeHttpFoundationExtension -->
<service id="form.server_params" class="Symfony\Component\Form\Util\ServerParams" public="false"/>

<service id="form.type_extension.form.http_foundation" class="Symfony\Component\Form\Extension\HttpFoundation\Type\FormTypeHttpFoundationExtension">
<tag name="form.type_extension" alias="form" />
<argument type="service" id="form.server_params"/>
</service>

<!-- FormTypeValidatorExtension -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\Form\Extension\HttpFoundation;

use Symfony\Component\Form\AbstractExtension;
use Symfony\Component\Form\Util\ServerParams;

/**
* Integrates the HttpFoundation component with the Form library.
Expand All @@ -21,20 +20,10 @@
*/
class HttpFoundationExtension extends AbstractExtension
{
/**
* @var ServerParams
*/
private $serverParams;

public function __construct(ServerParams $serverParams = null)
{
$this->serverParams = $serverParams;
}

protected function loadTypeExtensions()
{
return array(
new Type\FormTypeHttpFoundationExtension($this->serverParams),
new Type\FormTypeHttpFoundationExtension(),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Symfony\Component\Form\Extension\HttpFoundation\EventListener\BindRequestListener;
use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Util\ServerParams;

/**
* @author Bernhard Schussek <bschussek@gmail.com>
Expand All @@ -32,10 +31,10 @@ class FormTypeHttpFoundationExtension extends AbstractTypeExtension
*/
private $requestHandler;

public function __construct(ServerParams $serverParams = null)
public function __construct()
{
$this->listener = new BindRequestListener();
$this->requestHandler = new HttpFoundationRequestHandler($serverParams);
$this->requestHandler = new HttpFoundationRequestHandler();
}

/**
Expand Down
0