New Deprecations
Developer Note
Since this version of Joomla has not been released yet, this page can change anytime.
All the new deprecations you should be aware of — and what you should use instead.
Deprecation of registerListeners()
43395 – CMSPlugin: deprecation for registerListeners
- ❌
registerListeners()
is deprecated in bothJoomla\CMS\Extension\PluginInterface
andJoomla\CMS\Plugin\CMSPlugin
. - ✅ Instead, implement the
SubscriberInterface
. The method is no longer required in this case.
Deprecation of $_db
, getDbo()
, and setDbo()
45165 – Replace table _db with DatabaseAwareTrait
- ❌ Do not access the
Joomla\CMS\Table\Table::_db
property directly — it will be removed in the future. - ❌ Avoid using the
getDbo()
andsetDbo()
methods — they will also be removed. - ✅ Use
getDatabase()
andsetDatabase()
instead. Sample:$db = $this->getDatabase();
$this->setDatabase($db);