PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar heelc29
heelc29
2 Mar 2025

Redo of Pull Request #42344.

DRAFT: due temporary update of joomla-framework/database#325

Summary of Changes

Replaced all fuction calls getQuery(true) with createQuery() but only in database related context.
Note: There is also a getQuery(true) functionality in Joomla\CMS\Uri\Uri that must remain untouched.

Testing Instructions

code review or check logs

Actual result BEFORE applying this Pull Request

Since joomla/database 2.2.0: The parameter $new is deprecated and will be removed in 4.0, use Joomla\Database\DatabaseDriver::createQuery() instead.

Expected result AFTER applying this Pull Request

No warnings for getQuery(true) from core files (still some in session framework)

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar heelc29 heelc29 - open - 2 Mar 2025
avatar heelc29 heelc29 - change - 2 Mar 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Mar 2025
Category Administration com_admin com_associations com_banners com_categories com_checkin com_config
avatar heelc29 heelc29 - change - 2 Mar 2025
Labels Added: PR-5.3-dev
avatar exlemor
exlemor - comment - 15 Mar 2025

@heelc29 Sadly, I see hundreds of use Joomla\Database\DatabaseDriver::createQuery() instead. - [ROOT]/libraries/vendor/symfony/deprecation-contracts/function.php - Line 25 BEFORE or AFTER the Patch...

I did many different things in the backend such as copy an article, upload an extension, etc etc WITH and WITHOUT the Patch applied and I sifted through ~8mg of deprecated.php log with no foreseeable difference...

What am I doing wrong?

PHP 8.3.19, MariaDB 10.6.15, Joomla 5.3 ßeta 2

avatar laoneo
laoneo - comment - 15 Mar 2025

The problem is that getDatabase() returns a DatabaseInterface which doesn't have that function as it is only part of the DatabaseDriver class. So this pr would bind us to the concrete implementation.

avatar HLeithner
HLeithner - comment - 15 Mar 2025

@heelc29 can you please add this function to the framework database interface for version 4 and rebase this pr on 6.0.

avatar heelc29
heelc29 - comment - 15 Mar 2025

@heelc29 Sadly, I see hundreds of use Joomla\Database\DatabaseDriver::createQuery() instead. - [ROOT]/libraries/vendor/symfony/deprecation-contracts/function.php - Line 25 BEFORE or AFTER the Patch...

I did many different things in the backend such as copy an article, upload an extension, etc etc WITH and WITHOUT the Patch applied and I sifted through ~8mg of deprecated.php log with no foreseeable difference...

What am I doing wrong?

It is also used for example in joomla framework session so this tries to replace that one caused directly from the cms

Yes the deprecated.php log grows quickly

avatar heelc29
heelc29 - comment - 15 Mar 2025

@heelc29 can you please add this function to the framework database interface for version 4 and rebase this pr on 6.0.

Sure

avatar heelc29 heelc29 - change - 15 Mar 2025
Title
[5.3][joomla/database] use createQuery
[6.0][joomla/database] use createQuery
avatar heelc29 heelc29 - edited - 15 Mar 2025
avatar joomla-cms-bot joomla-cms-bot - change - 15 Mar 2025
Category Administration com_admin com_associations com_banners com_categories com_checkin com_config Unit Tests Administration com_admin SQL Postgresql com_associations com_banners com_categories
avatar heelc29 heelc29 - change - 15 Mar 2025
The description was changed
avatar heelc29 heelc29 - edited - 15 Mar 2025
avatar heelc29 heelc29 - change - 15 Mar 2025
Labels Added: Unit/System Tests PR-6.0-dev
avatar joomla-cms-bot joomla-cms-bot - change - 15 Mar 2025
Category Administration com_admin com_associations com_banners com_categories Unit Tests SQL Postgresql Administration com_admin com_associations com_banners com_categories com_checkin com_config
avatar heelc29 heelc29 - change - 16 Mar 2025
Labels Removed: Unit/System Tests
avatar heelc29 heelc29 - change - 19 May 2025
Labels Removed: PR-5.3-dev
avatar heelc29 heelc29 - change - 25 Jun 2025
The description was changed
avatar heelc29 heelc29 - edited - 25 Jun 2025

Add a Comment

Login with GitHub to post a comment