Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.0] Add PluginHelper::getPlugins() and deprecate old behavior #44282

Open
wants to merge 3 commits into
base: 6.0-dev
Choose a base branch
from

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Oct 16, 2024

Pull Request for Issue #44270.

Summary of Changes

PluginHelper::getPlugin() currently returns either an (empty) array of objects or a single object. This is the first step towards cleaning that code up by splitting the code up into a method to retrieve a single plugin (getPlugin()) and an array of plugins (getPlugins()).

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

$result[] = $p;
}
}
return self::getPlugins($type);
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove else and reduce indentation.

@brbrbr
Copy link

brbrbr commented Oct 16, 2024

This pull request does not solve the issue of:

Warning: Attempt to read property "params" on array in [ROOT]libraries/src/Component/Router/Rules/MenuRules.php

The sef plugin must be enabled, always.

@fgsw
Copy link

fgsw commented Oct 24, 2024

This pull request does not solve the issue of:

Warning: Attempt to read property "params" on array in [ROOT]libraries/src/Component/Router/Rules/MenuRules.php

@brbrbr Test #44283

@laoneo
Copy link
Member

laoneo commented Nov 18, 2024

When I see this code, then the plugin should either be booted or the PluginsModel should be used instead of introducing another static function with deprecated global static Factory calls.

@HLeithner HLeithner changed the base branch from 5.3-dev to 6.0-dev March 4, 2025 17:19
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 6.0-dev.

@HLeithner HLeithner changed the title [5.3] Add PluginHelper::getPlugins() and deprecate old behavior [6.0] Add PluginHelper::getPlugins() and deprecate old behavior Mar 4, 2025
@rdeutz rdeutz removed the PR-5.3-dev label Mar 5, 2025
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.

8 participants