RTC Composer Dependency Changed PHP 8.x bug PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
10 May 2025

Pull Request for Issue # .

Summary of Changes

This pull request (PR) updates the composer dependency "joomla/database" from version 3.4.1 to the latest version 3.4.2.

The only change between these 2 versions is the one from joomla-framework/database#324 .

See https://github.com/joomla-framework/database/releases/tag/3.4.2 .

This fixes a PHP deprecation notice you get on PHP 8.4 when using the MySQLi driver and calling its MysqliDriver::connected() method, which happens e.g. when installing Testing Sample Data..

Testing Instructions

Requirements: It needs to use the database type "MySQLi" in global configuration. With "MySQL (PDO)" or "PostgreSQL (PDO)" the issue doesn't happen. And it needs to be on PHP 8.4.

  1. Make sure that PHP errors are logged into a log file with following entries in your php.ini file:
log_errors = On
  1. Set error reporting to maximum in global configuration.
  2. Install Testing Sample Data.
  3. Check your PHP error log (or depending on your environment the webserver error log).

Actual result BEFORE applying this Pull Request

The installation of Testing Sample Data fails, and you get a deprecation notice in the PHP error log:

PHP Deprecated:  Method mysqli::ping() is deprecated since 8.4, because the reconnect feature has been removed in PHP 8.2 and this method is now redundant in /home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php on line 378, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP Stack trace:, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP   1. {main}() /home/richard/lamp/public_html/joomla-cms-5.3-dev/administrator/index.php:0, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP   2. require_once() /home/richard/lamp/public_html/joomla-cms-5.3-dev/administrator/index.php:32, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP   3. Joomla\\CMS\\Application\\CMSApplication->execute() /home/richard/lamp/public_html/joomla-cms-5.3-dev/administrator/includes/app.php:58, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP   4. Joomla\\CMS\\Application\\AdministratorApplication->doExecute() /home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/src/Application/CMSApplication.php:304, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP   5. Joomla\\CMS\\Application\\AdministratorApplication->dispatch($component = *uninitialized*) /home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/src/Application/AdministratorApplication.php:205, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP   6. Joomla\\CMS\\Component\\ComponentHelper::renderComponent($option = 'com_ajax', $params = *uninitialized*) /home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/src/Application/AdministratorApplication.php:150, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP   7. Joomla\\CMS\\Dispatcher\\LegacyComponentDispatcher->dispatch() /home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/src/Component/ComponentHelper.php:361, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP   8. Joomla\\CMS\\Dispatcher\\LegacyComponentDispatcher::{closure:/home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/src/Dispatcher/LegacyComponentDispatcher.php:70-72}($path = '/home/richard/lamp/public_html/joomla-cms-5.3-dev/administrator/components/com_ajax/ajax.php') /home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP   9. require_once() /home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP  10. require_once() /home/richard/lamp/public_html/joomla-cms-5.3-dev/administrator/components/com_ajax/ajax.php:13, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP  11. Joomla\\Event\\Dispatcher->dispatch($name = 'onAjaxSampledataApplyStep7', $event = class Joomla\\CMS\\Event\\Plugin\\AjaxEvent { protected $name = 'onAjaxSampledataApplyStep7'; protected $arguments = ['subject' => class Joomla\\CMS\\Application\\AdministratorApplication { ... }]; protected $stopped = FALSE; private ${Joomla\\CMS\\Event\\AbstractImmutableEvent}constructed = TRUE }) /home/richard/lamp/public_html/joomla-cms-5.3-dev/components/com_ajax/ajax.php:137, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP  12. Joomla\\Plugin\\SampleData\\Testing\\Extension\\Testing->onAjaxSampledataApplyStep7($event = class Joomla\\CMS\\Event\\Plugin\\AjaxEvent { protected $name = 'onAjaxSampledataApplyStep7'; protected $arguments = ['subject' => class Joomla\\CMS\\Application\\AdministratorApplication { ... }]; protected $stopped = FALSE; private ${Joomla\\CMS\\Event\\AbstractImmutableEvent}constructed = TRUE }) /home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/vendor/joomla/event/src/Dispatcher.php:454, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP  13. Joomla\\Component\\Menus\\Administrator\\Model\\MenuModel->save($data = ['id' => 0, 'title' => 'PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_7_TITLE', 'description' => 'PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_7_DESCRIPTION', 'menutype' => 'plg-sampledata-testing-sampledata-menus-menu-7-title']) /home/richard/lamp/public_html/joomla-cms-5.3-dev/plugins/sampledata/testing/src/Extension/Testing.php:1533, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP  14. Joomla\\CMS\\Table\\MenuType->store($updateNulls = *uninitialized*) /home/richard/lamp/public_html/joomla-cms-5.3-dev/administrator/components/com_menus/src/Model/MenuModel.php:272, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP  15. Joomla\\CMS\\Table\\Table->store($updateNulls = FALSE) /home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/src/Table/MenuType.php:185, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP  16. Joomla\\Database\\Mysqli\\MysqliDriver->insertObject($table = '#__menu_types', $object = class Joomla\\CMS\\Table\\MenuType { protected $_tbl = '#__menu_types'; protected $_tbl_key = 'id'; protected $_tbl_keys = [0 => 'id']; protected $_db = class Joomla\\Database\\Mysqli\\MysqliDriver { private ${Joomla\\Database\\DatabaseDriver}database = 'joomladb1'; public $name = 'mysqli'; public $serverType = 'mysql'; protected $connection = class mysqli { ... }; protected $count = 149; protected $cursor = NULL; protected $executed = FALSE; protected $limit = 0; protected $nameQuote = '`'; protected $nullDate = '0000-00-00 00:00:00'; protected $offset = 0; protected $options = [...]; protected $sql = class Joomla\\Database\\Mysqli\\MysqliQuery { ... }; protected $statement = class Joomla\\Database\\Mysqli\\MysqliStatement { ... }; protected $tablePrefix = 'j3ux0_'; protected $utf = TRUE; protected $errorNum = 0; protected $errorMsg = NULL; protected $transactionDepth = 0; protected $factory = class Joomla\\Database\\DatabaseFactory { ... }; protected $monitor = class Joomla\\Database\\Monitor\\DebugMonitor { ... }; private ${Joomla\\Database\\DatabaseDriver}dispatcher = class Joomla\\Event\\Dispatcher { ... }; protected $utf8mb4 = TRUE; protected $mariadb = FALSE }; protected $_trackAssets = TRUE; protected $_rules = NULL; protected $_locked = FALSE; protected $_autoincrement = TRUE; protected $_columnAlias = []; protected $_jsonEncode = []; protected $_supportNullValue = FALSE; public $typeAlias = *uninitialized*; private ${Joomla\\CMS\\Table\\Table}dispatcher = class Joomla\\Event\\Dispatcher { protected $events = [...]; protected $listeners = [...] }; protected $_errors = []; private $currentUser = NULL; public $id = 0; public $menutype = 'plg-sampledata-testing-sampledata-menus-menu-7-title'; public $title = 'PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_7_TITLE'; public $description = 'PLG_SAMPLEDATA_TESTING_SAMPLEDATA_MENUS_MENU_7_DESCRIPTION'; public $client_id = 0; public $ordering = 0 }, $key = 'id') /home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/src/Table/Table.php:876, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP  17. Joomla\\Database\\DatabaseDriver->execute() /home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:719, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php
PHP  18. Joomla\\Database\\Mysqli\\MysqliDriver->connected() /home/richard/lamp/public_html/joomla-cms-5.3-dev/libraries/vendor/joomla/database/src/DatabaseDriver.php:666, referer: https://www.joomla-53-dev.vmubu03.vmnet2.local/administrator/index.php

Expected result AFTER applying this Pull Request

No such deprecation notice.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar richard67 richard67 - open - 10 May 2025
avatar richard67 richard67 - change - 10 May 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 May 2025
Category External Library Composer Change
avatar richard67 richard67 - change - 10 May 2025
The description was changed
avatar richard67 richard67 - edited - 10 May 2025
avatar richard67 richard67 - change - 10 May 2025
The description was changed
avatar richard67 richard67 - edited - 10 May 2025
avatar richard67 richard67 - change - 10 May 2025
Title
[5.3] Composer update joomla/database to 3.4.2
[5.3] Composer update joomla/database to 3.4.2 to fix PHP 8.4 deprecation
avatar richard67 richard67 - edited - 10 May 2025
avatar brianteeman brianteeman - test_item - 12 May 2025 - Tested successfully
avatar brianteeman
brianteeman - comment - 12 May 2025

I have tested this item ✅ successfully on 1856a01

Confirmed the error before this PR
Confirmed that the update in this PR resolves the error


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45457.

avatar laoneo laoneo - test_item - 12 May 2025 - Tested successfully
avatar laoneo
laoneo - comment - 12 May 2025

I have tested this item ✅ successfully on 1856a01

Installing the DPCalendar sample data works as well now.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45457.

avatar richard67 richard67 - change - 12 May 2025
Status Pending Ready to Commit
Labels Added: bug Composer Dependency Changed PHP 8.x PR-5.3-dev
avatar richard67
richard67 - comment - 12 May 2025

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45457.

avatar rdeutz rdeutz - change - 12 May 2025
Labels Added: RTC
avatar rdeutz rdeutz - change - 12 May 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-05-12 16:41:28
Closed_By rdeutz
avatar rdeutz rdeutz - close - 12 May 2025
avatar rdeutz rdeutz - merge - 12 May 2025
avatar rdeutz
rdeutz - comment - 12 May 2025

Thanks

Add a Comment

Login with GitHub to post a comment