From ad8e98955fd28177e05e46dacc673bd2edbae3e4 Mon Sep 17 00:00:00 2001 From: Jules Pietri Date: Sat, 21 May 2016 20:24:27 +0200 Subject: [PATCH 1/8] [Form] fixed EntityType test with query_builder option --- .../Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php index 469d8fa3d1..cf4f4ac688 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php @@ -222,8 +222,13 @@ class EntityTypeTest extends TypeTestCase $field->submit('2'); } - public function testConfigureQueryBuilderWithClosureReturningNull() + public function testConfigureQueryBuilderWithClosureReturningNullUseDefault() { + $entity1 = new SingleIntIdEntity(1, 'Foo'); + $entity2 = new SingleIntIdEntity(2, 'Bar'); + + $this->persist(array($entity1, $entity2)); + $field = $this->factory->createNamed('name', 'Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array( 'em' => 'default', 'class' => self::SINGLE_IDENT_CLASS, @@ -232,7 +237,7 @@ class EntityTypeTest extends TypeTestCase }, )); - $this->assertEquals(array(), $field->createView()->vars['choices']); + $this->assertEquals(array(1 => new ChoiceView($entity1, '1', 'Foo'), 2 => new ChoiceView($entity2, '2', 'Bar')), $field->createView()->vars['choices']); } public function testSetDataSingleNull() From 0d5db658a432bbff58596a4fccfa727b4f47adab Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 15 Jun 2016 07:58:54 +0200 Subject: [PATCH 2/8] updated CHANGELOG for 3.1.1 --- CHANGELOG-3.1.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/CHANGELOG-3.1.md b/CHANGELOG-3.1.md index eb6cb03840..6bd6eeab39 100644 --- a/CHANGELOG-3.1.md +++ b/CHANGELOG-3.1.md @@ -7,6 +7,32 @@ in 3.1 minor versions. To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v3.1.0...v3.1.1 +* 3.1.1 (2016-06-15) + + * bug #19048 [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5 (nicolas-grekas) + * bug #19042 [Cache] Fix double fetch in ProxyAdapter (nicolas-grekas) + * bug #19038 Fix feature detection for IE (Alsciende) + * bug #18915 [DependencyInjection] force enabling the external XML entity loaders (xabbuh) + * bug #19020 [Form] Fixed collapsed choice attributes (HeahDude) + * bug #19028 [Yaml] properly count skipped comment lines (xabbuh) + * bug #19009 [WebProfilerBundle] Fix invalid CSS style (romainneutron) + * bug #17733 [Yaml] Fix wrong line number when comments are inserted in the middle of a block. (paradajozsef) + * bug #18909 Fixed singular of committee (peterrehm) + * bug #18911 Fixed singular of committee (peterrehm) + * bug #18971 Do not inject web debug toolbar on attachments (peterrehm) + * bug #18944 [Ldap] Fixed issue with legacy client initialisation (csarrazi) + * bug #18974 Added missing APCU CacheProvider of doctrine/cache 1.6.x (Carsten Eilers) + * bug #18954 [HttpKernel] Fix RequestDataCollector starting the session (romainneutron) + * bug #18949 [Security] Fix DebugAccessDecisionManager when object is not a scalar (romainneutron) + * bug #18959 [WebProfilerBundle] Fixed forwarded request data in templates (HeahDude) + * bug #18943 [Ldap][Security] The Ldap user provider abstract service now has the correct number of arguments (csarrazi) + * bug #18925 [Console] Fix BC break introduced by #18101 (dunglas) + * bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh) + * bug #18893 [DependencyInjection] Skip deep reference check for 'service_container' (RobertMe) + * bug #18812 Catch \Throwable (fprochazka) + * bug #18821 [Form] Removed UTC specification with timestamp (francisbesset) + * bug #18861 Fix for #18843 (inso) + * 3.1.0 (2016-05-30) * bug #18889 [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments (chalasr) From 75209e27b888e06b1fd1633a46e677b82054a9a3 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 15 Jun 2016 07:59:04 +0200 Subject: [PATCH 3/8] updated VERSION for 3.1.1 --- src/Symfony/Component/HttpKernel/Kernel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 9657138b6a..5b0a1a21b0 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '3.1.1-DEV'; + const VERSION = '3.1.1'; const VERSION_ID = 30101; const MAJOR_VERSION = 3; const MINOR_VERSION = 1; const RELEASE_VERSION = 1; - const EXTRA_VERSION = 'DEV'; + const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '01/2017'; const END_OF_LIFE = '07/2017'; From 343c0da7fbab79029ffb38e1953be520133c1375 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 15 Jun 2016 08:20:59 +0200 Subject: [PATCH 4/8] bumped Symfony version to 3.1.2 --- src/Symfony/Component/HttpKernel/Kernel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 5b0a1a21b0..7fcd72e254 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -59,12 +59,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '3.1.1'; - const VERSION_ID = 30101; + const VERSION = '3.1.2-DEV'; + const VERSION_ID = 30102; const MAJOR_VERSION = 3; const MINOR_VERSION = 1; - const RELEASE_VERSION = 1; - const EXTRA_VERSION = ''; + const RELEASE_VERSION = 2; + const EXTRA_VERSION = 'DEV'; const END_OF_MAINTENANCE = '01/2017'; const END_OF_LIFE = '07/2017'; From c46519b40b28d73dd1a40915ba115ca7ce28b69a Mon Sep 17 00:00:00 2001 From: Johan DESMYTER Date: Mon, 9 May 2016 19:57:57 +0300 Subject: [PATCH 5/8] [PropertyAccess][DX] Enhance exception that say that some methods are missing if they don't --- .../Component/PropertyAccess/PropertyAccessor.php | 11 +++++++++++ .../Tests/PropertyAccessorCollectionTest.php | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index a1ff632231..23fc68e33d 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -714,6 +714,17 @@ class PropertyAccessor implements PropertyAccessorInterface // we call the getter and hope the __call do the job $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_MAGIC; $access[self::ACCESS_NAME] = $setter; + } elseif (null !== $methods = $this->findAdderAndRemover($reflClass, $singulars)) { + $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_NOT_FOUND; + $access[self::ACCESS_NAME] = sprintf( + 'The property "%s" in class "%s" can be defined with the methods "%s()" but '. + 'the new value must be an array or an instance of \Traversable, '. + '"%s" given.', + $property, + $reflClass->name, + implode('()", "', $methods), + is_object($value) ? get_class($value) : gettype($value) + ); } else { $access[self::ACCESS_TYPE] = self::ACCESS_TYPE_NOT_FOUND; $access[self::ACCESS_NAME] = sprintf( diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php index be8aba80d3..17518468eb 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorCollectionTest.php @@ -194,4 +194,15 @@ abstract class PropertyAccessorCollectionTest extends PropertyAccessorArrayAcces $this->assertFalse($this->propertyAccessor->isWritable($car, 'axes', $axes)); } + + /** + * @expectedException \Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException + * expectedExceptionMessageRegExp /The property "axes" in class "Mock_PropertyAccessorCollectionTest_Car[^"]*" can be defined with the methods "addAxis()", "removeAxis()" but the new value must be an array or an instance of \Traversable, "string" given./ + */ + public function testSetValueFailsIfAdderAndRemoverExistButValueIsNotTraversable() + { + $car = $this->getMock(__CLASS__.'_Car'); + + $this->propertyAccessor->setValue($car, 'axes', 'Not an array or Traversable'); + } } From b91008fb574c0ed21b793ff6e3df56345665be0f Mon Sep 17 00:00:00 2001 From: Jules Pietri Date: Thu, 14 Apr 2016 17:57:13 +0200 Subject: [PATCH 6/8] [Form] fixed DateTime transformers --- .../DateTimeToArrayTransformer.php | 11 ++----- .../DateTimeToLocalizedStringTransformer.php | 13 +++----- .../DateTimeToRfc3339Transformer.php | 31 +++++++++++++------ .../DateTimeToStringTransformer.php | 28 +++++++---------- .../DateTimeToTimestampTransformer.php | 13 ++++---- 5 files changed, 45 insertions(+), 51 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php index 07070952f5..9e5d06b12b 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php @@ -56,8 +56,7 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer * @return array Localized date. * * @throws TransformationFailedException If the given value is not an - * instance of \DateTime or if the - * output timezone is not supported. + * instance of \DateTime or \DateTimeInterface */ public function transform($dateTime) { @@ -81,11 +80,7 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer $dateTime = clone $dateTime; } - try { - $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } + $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); } $result = array_intersect_key(array( @@ -118,8 +113,6 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer * * @throws TransformationFailedException If the given value is not an array, * if the value could not be transformed - * or if the input timezone is not - * supported. */ public function reverseTransform($value) { diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php index 5418f7feae..585e6d2471 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToLocalizedStringTransformer.php @@ -75,8 +75,8 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer * @return string|array Localized date string/array. * * @throws TransformationFailedException If the given value is not an instance - * of \DateTime or if the date could not - * be transformed. + * of \DateTime or \DateTimeInterface or + * if the date could not be transformed. */ public function transform($dateTime) { @@ -105,8 +105,7 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer * @return \DateTime Normalized date * * @throws TransformationFailedException if the given value is not a string, - * if the date could not be parsed or - * if the input timezone is not supported + * if the date could not be parsed */ public function reverseTransform($value) { @@ -132,11 +131,7 @@ class DateTimeToLocalizedStringTransformer extends BaseDateTimeTransformer } if ('UTC' !== $this->inputTimezone) { - try { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } + $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); } return $dateTime; diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php index c78d80401a..9a80cb2b9b 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToRfc3339Transformer.php @@ -19,7 +19,14 @@ use Symfony\Component\Form\Exception\TransformationFailedException; class DateTimeToRfc3339Transformer extends BaseDateTimeTransformer { /** - * {@inheritdoc} + * Transforms a normalized date into a localized date. + * + * @param \DateTime|\DateTimeInterface $dateTime A DateTime object + * + * @return string The formatted date. + * + * @throws TransformationFailedException If the given value is not an + * instance of \DateTime or \DateTimeInterface */ public function transform($dateTime) { @@ -32,7 +39,10 @@ class DateTimeToRfc3339Transformer extends BaseDateTimeTransformer } if ($this->inputTimezone !== $this->outputTimezone) { - $dateTime = clone $dateTime; + if (!$dateTime instanceof \DateTimeImmutable) { + $dateTime = clone $dateTime; + } + $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); } @@ -40,7 +50,14 @@ class DateTimeToRfc3339Transformer extends BaseDateTimeTransformer } /** - * {@inheritdoc} + * Transforms a formatted string following RFC 3339 into a normalized date. + * + * @param string $rfc3339 Formatted string + * + * @return \DateTime Normalized date + * + * @throws TransformationFailedException If the given value is not a string, + * if the value could not be transformed */ public function reverseTransform($rfc3339) { @@ -58,12 +75,8 @@ class DateTimeToRfc3339Transformer extends BaseDateTimeTransformer throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); } - if ($this->outputTimezone !== $dateTime->getTimezone()->getName()) { - try { - $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } + if ($this->inputTimezone !== $dateTime->getTimezone()->getName()) { + $dateTime->setTimezone(new \DateTimeZone($this->inputTimezone)); } if (preg_match('/(\d{4})-(\d{2})-(\d{2})/', $rfc3339, $matches)) { diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php index 30b73ad83c..56dee35027 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToStringTransformer.php @@ -86,35 +86,30 @@ class DateTimeToStringTransformer extends BaseDateTimeTransformer * Transforms a DateTime object into a date string with the configured format * and timezone. * - * @param \DateTime|\DateTimeInterface $value A DateTime object + * @param \DateTime|\DateTimeInterface $dateTime A DateTime object * * @return string A value as produced by PHP's date() function * - * @throws TransformationFailedException If the given value is not a \DateTime - * instance or if the output timezone - * is not supported. + * @throws TransformationFailedException If the given value is not an + * instance of \DateTime or \DateTimeInterface */ - public function transform($value) + public function transform($dateTime) { - if (null === $value) { + if (null === $dateTime) { return ''; } - if (!$value instanceof \DateTime && !$value instanceof \DateTimeInterface) { + if (!$dateTime instanceof \DateTime && !$dateTime instanceof \DateTimeInterface) { throw new TransformationFailedException('Expected a \DateTime or \DateTimeInterface.'); } - if (!$value instanceof \DateTimeImmutable) { - $value = clone $value; + if (!$dateTime instanceof \DateTimeImmutable) { + $dateTime = clone $dateTime; } - try { - $value = $value->setTimezone(new \DateTimeZone($this->outputTimezone)); - } catch (\Exception $e) { - throw new TransformationFailedException($e->getMessage(), $e->getCode(), $e); - } + $dateTime = $dateTime->setTimezone(new \DateTimeZone($this->outputTimezone)); - return $value->format($this->generateFormat); + return $dateTime->format($this->generateFormat); } /** @@ -125,8 +120,7 @@ class DateTimeToStringTransformer extends BaseDateTimeTransformer * @return \DateTime An instance of \DateTime * * @throws TransformationFailedException If the given value is not a string, - * if the date could not be parsed or - * if the input timezone is not supported. + * or could not be transformed */ public function reverseTransform($value) { diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php index b8f5f381a5..7ae30ebbb1 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToTimestampTransformer.php @@ -29,20 +29,19 @@ class DateTimeToTimestampTransformer extends BaseDateTimeTransformer * @return int A timestamp * * @throws TransformationFailedException If the given value is not an instance - * of \DateTime or if the output - * timezone is not supported. + * of \DateTime or \DateTimeInterface */ - public function transform($value) + public function transform($dateTime) { - if (null === $value) { + if (null === $dateTime) { return; } - if (!$value instanceof \DateTime && !$value instanceof \DateTimeInterface) { + if (!$dateTime instanceof \DateTime && !$dateTime instanceof \DateTimeInterface) { throw new TransformationFailedException('Expected a \DateTime or \DateTimeInterface.'); } - return $value->getTimestamp(); + return $dateTime->getTimestamp(); } /** @@ -53,7 +52,7 @@ class DateTimeToTimestampTransformer extends BaseDateTimeTransformer * @return \DateTime A \DateTime object * * @throws TransformationFailedException If the given value is not a timestamp - * or if the given timestamp is invalid. + * or if the given timestamp is invalid */ public function reverseTransform($value) { From ff1f5f80d267cd8cd9c1a4f9e809b3a493a6a51c Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 15 Jun 2016 12:17:39 +0200 Subject: [PATCH 7/8] [HttpFoundation] Fix UPSERT for PgSql >= 9.5 --- .../Bridge/Doctrine/HttpFoundation/DbalSessionHandler.php | 2 +- .../Session/Storage/Handler/PdoSessionHandler.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandler.php b/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandler.php index c3570da7da..92c7b6bf40 100644 --- a/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandler.php +++ b/src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandler.php @@ -243,7 +243,7 @@ class DbalSessionHandler implements \SessionHandlerInterface return "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time)"; case 'postgresql' === $platform && version_compare($this->con->getServerVersion(), '9.5', '>='): return "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time) ". - "ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->timeCol) = (:data, :time) WHERE $this->idCol = :id"; + "ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->timeCol)"; } } } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php index 1aad67960a..54d94f7c05 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php @@ -678,7 +678,7 @@ class PdoSessionHandler implements \SessionHandlerInterface return "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)"; case 'pgsql' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '9.5', '>='): return "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time) ". - "ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (:data, :lifetime, :time) WHERE $this->idCol = :id"; + "ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; } } From dd481d223383c5c0c3c855443de51bcc2ae158d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Tou=C5=A1ek?= Date: Wed, 15 Jun 2016 23:06:35 +0200 Subject: [PATCH 8/8] [TwigBridge] Add missing type hint to TwigRenderer --- src/Symfony/Bridge/Twig/Form/TwigRenderer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/Twig/Form/TwigRenderer.php b/src/Symfony/Bridge/Twig/Form/TwigRenderer.php index ac139e44a1..2f526100f5 100644 --- a/src/Symfony/Bridge/Twig/Form/TwigRenderer.php +++ b/src/Symfony/Bridge/Twig/Form/TwigRenderer.php @@ -12,6 +12,7 @@ namespace Symfony\Bridge\Twig\Form; use Symfony\Component\Form\FormRenderer; +use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; /** * @author Bernhard Schussek @@ -23,7 +24,7 @@ class TwigRenderer extends FormRenderer implements TwigRendererInterface */ private $engine; - public function __construct(TwigRendererEngineInterface $engine, $csrfTokenManager = null) + public function __construct(TwigRendererEngineInterface $engine, CsrfTokenManagerInterface $csrfTokenManager = null) { parent::__construct($engine, $csrfTokenManager);