From 188e3ec553e9d62b39f0c958251237acfba4bc13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Morales=20Valldep=C3=A9rez?= Date: Sat, 29 Nov 2014 11:49:07 +0100 Subject: [PATCH 1/3] issue 12604 --- .../Component/Form/Util/VirtualFormAwareIterator.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php index 581e3540e40be..1ba5ecb1bead9 100644 --- a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php +++ b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php @@ -30,6 +30,10 @@ class VirtualFormAwareIterator extends \IteratorIterator implements \RecursiveIt */ public function getChildren() { + if ('Symfony\Component\Form\Util\VirtualFormAwareIterator' === get_class()) { + trigger_error('class VirtualFormAwareIterator is deprecated since version 2.7 and will be removed in 3.0. Use InheritDataAwareIterator instead.', E_USER_DEPRECATED); + } + return new static($this->current()); } @@ -38,6 +42,10 @@ public function getChildren() */ public function hasChildren() { + if ('Symfony\Component\Form\Util\VirtualFormAwareIterator' === get_class()) { + trigger_error('class VirtualFormAwareIterator is deprecated since version 2.7 and will be removed in 3.0. Use InheritDataAwareIterator instead.', E_USER_DEPRECATED); + } + return (bool) $this->current()->getConfig()->getInheritData(); } } From f1532fa327535df7af684bfb044a009ec0151772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Morales=20Valldep=C3=A9rez?= Date: Sat, 29 Nov 2014 14:53:46 +0100 Subject: [PATCH 2/3] moved the notice to the constructor --- .../Form/Util/VirtualFormAwareIterator.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php index 1ba5ecb1bead9..1e05133c7ec45 100644 --- a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php +++ b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php @@ -25,15 +25,21 @@ */ class VirtualFormAwareIterator extends \IteratorIterator implements \RecursiveIterator { - /** - * {@inheritdoc} - */ - public function getChildren() + + public function __construct(\Traversable $iterator) { + parent::__construct($iterator); + if ('Symfony\Component\Form\Util\VirtualFormAwareIterator' === get_class()) { trigger_error('class VirtualFormAwareIterator is deprecated since version 2.7 and will be removed in 3.0. Use InheritDataAwareIterator instead.', E_USER_DEPRECATED); } + } + /** + * {@inheritdoc} + */ + public function getChildren() + { return new static($this->current()); } @@ -42,10 +48,6 @@ public function getChildren() */ public function hasChildren() { - if ('Symfony\Component\Form\Util\VirtualFormAwareIterator' === get_class()) { - trigger_error('class VirtualFormAwareIterator is deprecated since version 2.7 and will be removed in 3.0. Use InheritDataAwareIterator instead.', E_USER_DEPRECATED); - } - return (bool) $this->current()->getConfig()->getInheritData(); } } From 7044489f550c9df3ee83636d19c10f8dec87d343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Morales=20Valldep=C3=A9rez?= Date: Sat, 29 Nov 2014 14:58:35 +0100 Subject: [PATCH 3/3] php-cs-fixer --- src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php index 1e05133c7ec45..16dbe86e2c433 100644 --- a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php +++ b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php @@ -25,7 +25,6 @@ */ class VirtualFormAwareIterator extends \IteratorIterator implements \RecursiveIterator { - public function __construct(\Traversable $iterator) { parent::__construct($iterator); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy