8000 [DomCrawler] add upgrade hint on interface changes · symfony/symfony@e80e5dc · GitHub
[go: up one dir, main page]

Skip to content

Commit e80e5dc

Browse files
committed
[DomCrawler] ad 8000 d upgrade hint on interface changes
1 parent 7b8865b commit e80e5dc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

UPGRADE-3.0.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,22 @@ UPGRADE FROM 2.x to 3.0
105105
removed: `ContainerBuilder::synchronize()`, `Definition::isSynchronized()`,
106106
and `Definition::setSynchronized()`.
107107

108+
### DomCrawler
109+
110+
* The interface of the `Symfony\Component\DomCrawler\Crawler` changed. It does no longer implement `\Iterator` but `\IteratorAggregate`. If you rely on methods of the `\Iterator` interface, call the `getIterator` method of the `\IteratorAggregate` interface before. No changes are required in a `\Traversable`-aware control structure, such as `foreach`.
111+
112+
Before:
113+
114+
```php
115+
$crawler->current();
116+
```
117+
118+
After:
119+
120+
```php
121+
$crawler->getIterator()->current();
122+
```
123+
108124
### EventDispatcher
109125

110126
* The method `getListenerPriority($eventName, $listener)` has been added to the

0 commit comments

Comments
 (0)
0