Skip to content

[4.4] Rebuild module Breadcrumbs with new Joomla 4 structure#40328

Merged
laoneo merged 19 commits intojoomla:4.4-devfrom
sandewt:patch-11
Apr 25, 2023
Merged

[4.4] Rebuild module Breadcrumbs with new Joomla 4 structure#40328
laoneo merged 19 commits intojoomla:4.4-devfrom
sandewt:patch-11

Conversation

@sandewt
Copy link
Copy Markdown
Contributor

@sandewt sandewt commented Apr 4, 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

@sandewt
Copy link
Copy Markdown
Contributor Author

sandewt commented Apr 5, 2023

Drone fails

AssertionError: Timed out retrying after 4000ms:

@laoneo laoneo self-assigned this Apr 5, 2023
@laoneo laoneo added the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Apr 5, 2023
sandewt added 4 commits April 6, 2023 10:06
BreadcrumbsHelper has no constructor.
Please restore it and deprecate it
Needed for setSeparator
@sandewt
Copy link
Copy Markdown
Contributor Author

sandewt commented Apr 11, 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?

@carlitorweb
Copy link
Copy Markdown
Member

@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.

@sandewt
Copy link
Copy Markdown
Contributor Author

sandewt commented Apr 12, 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.

sandewt added 2 commits April 17, 2023 09:38
$this->getHome => $this->getHomeItem
@laoneo
Copy link
Copy Markdown
Member

laoneo commented Apr 25, 2023

Thanks!

@sandewt
Copy link
Copy Markdown
Contributor Author

sandewt commented Apr 25, 2023

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

@laoneo
Copy link
Copy Markdown
Member

laoneo commented Apr 25, 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...

@sandewt
Copy link
Copy Markdown
Contributor Author

sandewt commented Apr 25, 2023

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

@laoneo
Copy link
Copy Markdown
Member

laoneo commented Apr 25, 2023

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

@sandewt sandewt deleted the patch-11 branch April 26, 2023 08:47
richard67 added a commit to richard67/joomla-cms that referenced this pull request May 1, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request May 1, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request May 9, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request May 22, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request May 23, 2023
laoneo pushed a commit that referenced this pull request May 23, 2023
* Add deleted files from #40066 , #40092 , #40142 and #40146

* Add deleted files from #40180 and #40174

* Add deleted files from #39527 , #39535 , #40169 and #40173

* Add deleted files from #39552 , #39931 , #39628 and #40328

* Add deleted files from #40216

* Add deleted files from #40561 , #40190 and #40205
richard67 added a commit to richard67/joomla-cms that referenced this pull request May 27, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Jun 3, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Jun 8, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Jun 23, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Jul 3, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Jul 23, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Aug 12, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Aug 19, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Aug 20, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Aug 22, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 1, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 4, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 4, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 14, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 19, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Sep 26, 2023
richard67 added a commit to richard67/joomla-cms that referenced this pull request Oct 1, 2023
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.

5 participants