Skip to content

Commit a8638c6

Browse files
author
Hugo Hamon
committed
Fixes more deprecation notices as per @stof review.
1 parent 12a8879 commit a8638c6

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

Util/InheritDataAwareIterator.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,4 @@
2525
*/
2626
class InheritDataAwareIterator extends VirtualFormAwareIterator
2727
{
28-
public function __construct(\Traversable $iterator)
29-
{
30-
// Do not trigger deprecation notice in parent construct method
31-
// when using this class instead of the deprecated parent one.
32-
parent::__construct($iterator, false);
33-
}
3428
}

Util/VirtualFormAwareIterator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
*/
2626
class VirtualFormAwareIterator extends \IteratorIterator implements \RecursiveIterator
2727
{
28-
public function __construct(\Traversable $iterator, $triggerDeprecationNotice = true)
28+
public function __construct(\Traversable $iterator)
2929
{
30-
/**
30+
/*
3131
* Prevent to trigger deprecation notice when already using the
3232
* InheritDataAwareIterator class that extends this deprecated one.
3333
* The {@link Symfony\Component\Form\Util\InheritDataAwareIterator::__construct} method
3434
* forces this argument to false.
3535
*/
36-
if ($triggerDeprecationNotice) {
36+
if (__CLASS__ === get_class($this)) {
3737
trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Util\InheritDataAwareIterator class instead.', E_USER_DEPRECATED);
3838
}
3939

0 commit comments

Comments
 (0)