PHP 8.2 Compatibility Fixes

Created on 10 April 2024, 8 months ago
Updated 8 June 2024, 6 months ago

Problem/Motivation

When testing on PHP 8.2, the tests fail with deprecation notices.

For example:

11) Drupal\Tests\feeds_ex\Functional\Feeds\Parser\QueryPathXmlParserTest::testAddQueryPathXmlSourceFailsWithoutMachineName
Exception: Deprecated function: Creation of dynamic property QueryPath\CSS\Parser::$originalString is deprecated
QueryPath\CSS\Parser->__construct()() (Line: 45)
/builds/issue/feeds_ex-3439881/web/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php:55
/builds/issue/feeds_ex-3439881/vendor/guzzlehttp/promises/src/Promise.php:209
/builds/issue/feeds_ex-3439881/vendor/guzzlehttp/promises/src/Promise.php:158
/builds/issue/feeds_ex-3439881/vendor/guzzlehttp/promises/src/TaskQueue.php:52
/builds/issue/feeds_ex-3439881/vendor/guzzlehttp/promises/src/Promise.php:251
/builds/issue/feeds_ex-3439881/vendor/guzzlehttp/promises/src/Promise.php:227
/builds/issue/feeds_ex-3439881/vendor/guzzlehttp/promises/src/Promise.php:272
/builds/issue/feeds_ex-3439881/vendor/guzzlehttp/promises/src/Promise.php:229
/builds/issue/feeds_ex-3439881/vendor/guzzlehttp/promises/src/Promise.php:69
/builds/issue/feeds_ex-3439881/vendor/guzzlehttp/guzzle/src/Client.php:189
/builds/issue/feeds_ex-3439881/web/core/tests/Drupal/Tests/DrupalTestBrowser.php:139
/builds/issue/feeds_ex-3439881/vendor/symfony/browser-kit/AbstractBrowser.php:385
/builds/issue/feeds_ex-3439881/vendor/symfony/browser-kit/AbstractBrowser.php:305
/builds/issue/feeds_ex-3439881/vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php:718
/builds/issue/feeds_ex-3439881/vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php:494
/builds/issue/feeds_ex-3439881/vendor/behat/mink/src/Element/NodeElement.php:176
/builds/issue/feeds_ex-3439881/vendor/behat/mink/src/Element/NodeElement.php:186
/builds/issue/feeds_ex-3439881/web/core/tests/Drupal/Tests/UiHelperTrait.php:101
/builds/issue/feeds_ex-3439881/tests/src/Functional/Feeds/Parser/ContextTestTrait.php:84
/builds/issue/feeds_ex-3439881/tests/src/Functional/Feeds/Parser/QueryPathXmlParserTest.php:185
/builds/issue/feeds_ex-3439881/vendor/phpunit/phpunit/src/Framework/TestResult.php:729

These deprecations appear to be coming from the QueryPath library, which may no longer be active, as shown by this MR with PHP 8.1 incompatibility fixes.. So we should migrate away from that library.

Steps to reproduce

PHP 8.2
D10 10.2.5
Feeds Beta 4.0
QueryPath XML Parser

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024