From 3d7f6c69c252030ff9f90b42c2d6b49539ff06cc Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Wed, 10 Feb 2016 13:25:51 +0000 Subject: [PATCH] [DomCrawler] Remove the overridden getHash() method to prevent problems when cloning the crawler Overriding the SplObjectStorage::getHash() is affected by a PHP bug (https://bugs.php.net/bug.php?id=67582), which makes the Crawler unusable in Symfony 2.8 for anyone who relied on SplObjectStorage methods. Removing the getHash() method means we will no longer trigger the deprecation error. Given this method is unlikely to be used directly and other SplObjectStorage methods will trigger the error, it is the simplest thing we can do to maintain BC. --- src/Symfony/Component/DomCrawler/Crawler.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index 66f93721af99e..c6d328e569e8b 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -950,16 +950,6 @@ public function offsetGet($object) return parent::offsetGet($object); } - /** - * @deprecated Using the SplObjectStorage API on the Crawler is deprecated as of 2.8 and will be removed in 3.0. - */ - public function getHash($object) - { - $this->triggerDeprecation(__METHOD__, true); - - return parent::getHash($object); - } - /** * Filters the list of nodes with an XPath expression. *