? PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar sandewt
sandewt
4 Apr 2023

Pull Request for Issue # .

Summary of Changes

Rebuild mod_breadcrumbs with new Joomla 4 structure

  • The method setSeparator has been dropped deprecated, it was not used in J4. (A nice feature in itself.)

  • The function public static function getList becomes public function getBreadcrumbs (non-static)

  • The function public static function getHome becomes public function getHomeItem (non-static)

  • A system test has been added (Cypress)

Testing Instructions

  • Code review
  • System test
  • Just try to use it as usual

Actual result BEFORE applying this Pull Request

  • Module works

Expected result AFTER applying this Pull Request

  • Module works

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

ping @laoneo

avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2023
Category Modules Front End JavaScript Unit Tests
avatar sandewt sandewt - open - 4 Apr 2023
avatar sandewt sandewt - change - 4 Apr 2023
Status New Pending
avatar sandewt sandewt - change - 4 Apr 2023
Labels Added: ? PR-4.4-dev
avatar sandewt
sandewt - comment - 5 Apr 2023

Drone fails

AssertionError: Timed out retrying after 4000ms:

avatar sandewt sandewt - change - 6 Apr 2023
Labels Added: ?
avatar sandewt
sandewt - comment - 11 Apr 2023

In my php editor, appears the following message in the Dispatcher.php file:

Method 'getBreadcrumbs' not found in \Joomla\Database\DatabaseAwareInterface|null|\stdClass
Method 'getHomeItem' not found in \Joomla\Database\DatabaseAwareInterface|null|\stdClass

This error disappears when I change in the BreadcrumbsHelper.php file:

class BreadcrumbsHelper
{

to:

use Joomla\Database\DatabaseAwareInterface;
use Joomla\Database\DatabaseAwareTrait;

class BreadcrumbsHelper implements DatabaseAwareInterface
{
	use DatabaseAwareTrait;

The database is not called in this file. So that's why I don't understand this message.
What to do? Ignore notification or what is desirable?

avatar carlitorweb
carlitorweb - comment - 11 Apr 2023

@sandewt I applied the patch, but I did not see any warning message in the editor or in the site about the DatabaseAwareInterface. Also, I do not think this is needed inside this helper.

avatar sandewt
sandewt - comment - 12 Apr 2023

Also, I do not think this is needed inside this helper.

Agree, but that means that the underlying code of the Dispatcher.php is not quite correct. And so it is a point of attention.

avatar sandewt sandewt - change - 18 Apr 2023
The description was changed
avatar sandewt sandewt - edited - 18 Apr 2023
avatar laoneo laoneo - change - 24 Apr 2023
Labels Removed: ?
avatar laoneo laoneo - close - 25 Apr 2023
avatar laoneo laoneo - merge - 25 Apr 2023
avatar laoneo laoneo - change - 25 Apr 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-04-25 05:53:02
Closed_By laoneo
avatar laoneo
laoneo - comment - 25 Apr 2023

Thanks!

avatar sandewt
sandewt - comment - 25 Apr 2023

Thanks all, and @laoneo special thanks for your support.

avatar laoneo
laoneo - comment - 25 Apr 2023

I hope you guys do continue the good work and convert more modules. This is very important work for the future. Especially when system tests are added...

avatar sandewt
sandewt - comment - 25 Apr 2023

I like to do that. As soon as I have time, I will convert a new module / plugin.

avatar laoneo
laoneo - comment - 25 Apr 2023

Thanks, plugins are done I guess with #40216, #40205 and #40190.

Add a Comment

Login with GitHub to post a comment