User tests: Successful: Unsuccessful:
As with everywhere in Joomla, we shouldn't be implementing custom database object setters and getters and instead use the DatabaseAwareTrait instead. The Table class has the methods getDbo(), setDbo(), getDatabase() and setDatabase() to retrieve the db object. The first 2 are supposed to be removed and the later 2 are only there to make the transition to the trait smoother. With the removal of the former 2, we can completely rely on the trait and remove the later 2 as well.
Codereview
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org: joomla/Manual#600
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
| Labels |
Added:
PR-7.0-dev
|
||
| Labels |
Added:
Feature
b/c break
|
||
Yes, replacing $table->getDbo() with Factory::getDbo() is bad, but since getDatabase() is not public and since the Tagshelper class already contains 13 other cases where it uses Factory::getDbo(), I'm willing to take the fall here and replace one deprecated method with another deprecated method. At least then we have one issue solved entirely.
What exactly do you mean?