Skip to content

Commit 6c1f8eb

Browse files
Merge branch '7.4' into 8.0
* 7.4: [DomCrawler] Use the native HTM5 parser on PHP 8.4 revert patching of PHPUnit about memleak reports [Notifier][Discord] Remove length checks
2 parents 8e89a7b + abec2fa commit 6c1f8eb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

AbstractBrowser.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ abstract class AbstractBrowser
4646
/** @psalm-var TResponse */
4747
protected object $response;
4848
protected Crawler $crawler;
49+
/** @deprecated since Symfony 7.4, to be removed in Symfony 8 */
4950
protected bool $useHtml5Parser = true;
5051
protected bool $insulated = false;
5152
protected ?string $redirect;
@@ -204,10 +205,16 @@ public function getCrawler(): Crawler
204205
/**
205206
* Sets whether parsing should be done using "masterminds/html5".
206207
*
208+
* @deprecated since Symfony 7.4, Symfony 8 will unconditionally use the native HTML5 parser
209+
*
207210
* @return $this
208211
*/
209212
public function useHtml5Parser(bool $useHtml5Parser): static
210213
{
214+
if (\PHP_VERSION_ID >= 80400) {
215+
trigger_deprecation('symfony/browser-kit', '7.4', 'Method "%s()" is deprecated. Symfony 8 will unconditionally use the native HTML5 parser.', __METHOD__);
216+
}
217+
211218
$this->useHtml5Parser = $useHtml5Parser;
212219

213220
return $this;

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CHANGELOG
66

77
* Add `isFirstPage()` and `isLastPage()` methods to the History class for checking navigation boundaries
88
* Add PHPUnit constraints: `BrowserHistoryIsOnFirstPage` and `BrowserHistoryIsOnLastPage`
9+
* Deprecate `AbstractBrowser::useHtml5Parser()`; Symfony 8 will unconditionally use the native HTML5 parser
910

1011
6.4
1112
---

0 commit comments

Comments
 (0)