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

[5.2][RFC] CMSPlugin: DynamicSubscriberInterface as replacement for deprecated registerListeners #43462

Draft
wants to merge 8 commits into
base: 5.2-dev
Choose a base branch
from

Conversation

Fedik
Copy link
Member

@Fedik Fedik commented May 12, 2024

Summary of Changes

A replacement for deprecated registerListeners() (see #43395)

Current limitation of SubscriberInterface is that it does not allow to return listeners depend from runtime.
It has own pros and cons. However in CMS it is sometimes need to have a diffrenet listeners depend from the Application type.

I think DynamicSubscriberInterface will be a good for it.
The difference from SubscriberInterface is that it uses non-static method, which allows subscriber to configure listeners depending on runtime. Additionally, it supports callables.

Testing Instructions

Code review.
Check GuidedTours and ScheduleRunner plugins still works.

Actual result BEFORE applying this Pull Request

Works

Expected result AFTER applying this Pull Request

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: TBD
  • No documentation changes for manual.joomla.org needed

References:

@Fedik Fedik marked this pull request as draft May 12, 2024 10:30
@joomla-cms-bot joomla-cms-bot added PR-5.2-dev RFC Request for Comment labels May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature PR-5.2-dev RFC Request for Comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants