Problem/Motivation
Two new deprecation skips added in Symfony 7.4:
Since symfony/browser-kit 7.4: Method "Symfony\Component\BrowserKit\AbstractBrowser::useHtml5Parser()" is deprecated. Symfony 8 will unconditionally use the native HTML5 parser.
Since symfony/dom-crawler 7.4: Disabling HTML5 parsing is deprecated. Symfony 8 will unconditionally use the native HTML5 parser.
This triggered some test failures the first time round, including uncovering possible bugs in Symfony:
https://github.com/symfony/symfony/issues/62233
https://github.com/symfony/symfony/issues/62236
Steps to reproduce
Proposed resolution
Upgrade to at least Symfony 7.4.0-BETA2 or RC1.
Enable the HTML5 parser.
Fix any tests cases that fail - note that the HTML5 parser is only enabled on PHP 8.4 and above.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3555527
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3555527-since-symfonydom-crawler-7.4
changes, plain diff MR !13697
Comments
Comment #2
longwaveComment #4
longwaveComment #5
longwaveComment #6
longwaveI thought we had some fails in the original 7.4 upgrade MR but the upstream fixes must have resolved them, everything seems fine here.
Comment #7
andypostWould be great to check it with https://github.com/symfony/symfony/releases/tag/v7.4.0-RC1
Comment #8
longwaveThanks for the heads-up, opened #3557639: Update to Symfony 7.4.0-RC1
Comment #9
smustgrave commentedNo test failures so seems like a good cleanup.
Comment #10
longwaveRebased.
Comment #11
catchWhat happened to the original test failure that https://github.com/symfony/symfony/issues/62236 was opened to fix - looks like neither of the symfony issues landed.
Comment #12
longwaveIt no longer crashes:
It's possible the test (and similar ones with malformed HTML) are not really testing the same thing any more? But I am not sure DomCrawler is ever going to operate exactly like a real browser would...
Comment #16
catchOK fair enough, we have to do this anyway, and figuring out why we couldn't with previous rcs of symfony is not really the priority.
Committed/pushed to 11.x and cherry-picked to 11.3.x, thanks!