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.2] Refactored JDatabaseDriver in some params #44750

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

pe7er
Copy link
Contributor

@pe7er pe7er commented Jan 18, 2025

Refactored JDatabaseDriver to Joomla\Database\DatabaseDriver

Summary of Changes

Refactored some params to use Joomla\Database\DatabaseDriver instead

Testing Instructions

Code review

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

@Hackwar
Copy link
Member

Hackwar commented Jan 18, 2025

Are you sure that it should be DatabaseDriver and not DatabaseDriverInterface?

@richard67
Copy link
Member

I have tested this item ✅ successfully on c855172


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

@richard67
Copy link
Member

I have not tested this item.

Reverting my test result as I hadn't seen @Hackwar 's comment.


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

@pe7er
Copy link
Contributor Author

pe7er commented Jan 19, 2025

Are you sure that it should be DatabaseDriver and not DatabaseDriverInterface?

No, I'm not. I chose to replace JDatabaseDriver with DatabaseDriver because
plugins/behaviour/compat/src/classmap/classmap.php states

JLoader::registerAlias('JDatabaseDriver', '\Joomla\Database\DatabaseDriver', '6.0');

If it should be DatabaseDriverInterface, could you please correct it?

@laoneo
Copy link
Member

laoneo commented Jan 20, 2025

Yes please change it to the interface as the model doesn't get the concrete class injected.

@pe7er
Copy link
Contributor Author

pe7er commented Jan 20, 2025

Yes please change it to the interface as the model doesn't get the concrete class injected.

Thanks!

I've refactored \JDatabaseDriver to DatabaseInterface

@Hackwar Hackwar merged commit c8a5474 into joomla:5.2-dev Jan 20, 2025
2 of 3 checks passed
@Hackwar Hackwar added this to the Joomla! 5.2.4 milestone Jan 20, 2025
@pe7er pe7er deleted the refactoring-jdatabasedriver branch January 21, 2025 08:37
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.

4 participants