Skip to content

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

Closed
Fedik wants to merge 8 commits intojoomla:5.2-devfrom
Fedik:plugin-dinamic-subscriber
Closed

[5.2][RFC] CMSPlugin: DynamicSubscriberInterface as replacement for deprecated registerListeners#43462
Fedik wants to merge 8 commits intojoomla:5.2-devfrom
Fedik:plugin-dinamic-subscriber

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 RFC Request for Comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants