Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] use DatabaseFactory in DatabaseServiceProvider #45057

Open
wants to merge 2 commits into
base: 5.3-dev
Choose a base branch
from

Conversation

heelc29
Copy link
Contributor

@heelc29 heelc29 commented Mar 2, 2025

Summary of Changes

DatabaseDriver::getInstance is deprecated and should be replaced with DatabaseFactory->getDriver()
https://github.com/joomla-framework/database/blob/d13a7504471b4730a8107e3566c6fe6d476706fc/src/DatabaseDriver.php#L269-L288

Testing Instructions

install Joomla and visit frontend/backend and see if you can do anything (connection to database is preset)

Actual result BEFORE applying this Pull Request

Warning in deprecated log: DatabaseDriver::getInstance is deprecated and will be removed in 3.0, use DatabaseFactory::getDriver() instead.

 ------ -------------------------------------------------- 
  Line   libraries/src/Service/Provider/Database.php       
 ------ -------------------------------------------------- 
  123    Call to deprecated method getInstance() of class  
         Joomla\Database\DatabaseDriver:                   
         3.0  Use DatabaseFactory::getDriver() instead     
         🪪  staticMethod.deprecated                       
 ------ -------------------------------------------------- 

Expected result AFTER applying this Pull Request

Warning gone

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed

@heelc29
Copy link
Contributor Author

heelc29 commented Mar 2, 2025

Failing CI related to #45059

 Error: Unwanted PHP Deprecated: "  htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in <b>/tests/www/cmysql/administrator/modules/mod_logged/tmpl/default.php</b> on line <b>36</b>"

Co-Authored-By: Oleg Voronkovich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants