PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
22 May 2024

Summary of Changes

Toolbar::getInstance() has been deprecated for quite some time now, but the alternative wasn't really clear yet. This PR replaces all occurences with $this->getDocument()->getToolbar() instead. This leaves the Toolbar::getInstance() in the ToolbarHelper class.

Testing Instructions

Codereview

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

avatar Hackwar Hackwar - open - 22 May 2024
avatar Hackwar Hackwar - change - 22 May 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 May 2024
Category Administration com_admin com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_cpanel com_fields com_finder
avatar HLeithner
HLeithner - comment - 22 May 2024

What the issue @brianteeman ?

avatar brianteeman
brianteeman - comment - 22 May 2024

What the issue @brianteeman ?

  1. obvious errors due to blindly search/replace (picked up by drone)
  2. stating that no documentation is required.
avatar Hackwar Hackwar - change - 23 May 2024
Labels Added: PR-5.2-dev
avatar HLeithner
HLeithner - comment - 15 Jul 2024

I checked all files but can't find a search replace issue. if you mean the conversation from Toolbar::getInstance('toolbar'); to $this->getDocument()->getToolbar(); without the parameter toolbar this is ok because the default toolbar is toolbar.

on the side I checked some file for missing removal of the use statement for the toolbar which can be removed if not used, as it has been done for some view.

avatar brianteeman
brianteeman - comment - 15 Jul 2024

Sorry no idea as its been 10 weeks but based on my comment it must have been something shown up in drone so maybe retrigger drone and see

avatar pe7er
pe7er - comment - 16 Jul 2024

@Hackwar Could you please remove the unused use Joomla\CMS\Toolbar\Toolbar; statements?

avatar Hackwar
Hackwar - comment - 16 Jul 2024

Done

avatar Quy
Quy - comment - 10 Aug 2024

Done

I flagged some. There are more to remove.

avatar Hackwar
Hackwar - comment - 10 Aug 2024

Done

I flagged some. There are more to remove.

No, I thoroughly went through them all at that time and all other instances are still in use.

avatar laoneo
laoneo - comment - 14 Aug 2024

@Quy the code style checker should also throw an error when there are unused imports. So I guess we are fine here, or?

avatar Quy
Quy - comment - 14 Aug 2024

@laoneo Yes. Please discard my comments.

avatar laoneo laoneo - change - 14 Aug 2024
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-08-14 11:49:00
Closed_By laoneo
avatar laoneo laoneo - close - 14 Aug 2024
avatar laoneo laoneo - merge - 14 Aug 2024
avatar laoneo
laoneo - comment - 14 Aug 2024

Thanks!

Add a Comment

Login with GitHub to post a comment