Skip to content

[5.2] Router: Check directly for RouterInterface#43119

Merged
wilsonge merged 1 commit intojoomla:5.2-devfrom
Hackwar:5.2-router-component
Mar 22, 2024
Merged

[5.2] Router: Check directly for RouterInterface#43119
wilsonge merged 1 commit intojoomla:5.2-devfrom
Hackwar:5.2-router-component

Conversation

@Hackwar
Copy link
Member

@Hackwar Hackwar commented Mar 22, 2024

Summary of Changes

I have no idea why I took this complicated approach of using Reflection to see if the given object implements the RouterInterface. This PR changes the code to be simpler and to just use the instanceof operator.

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

@Fedik
Copy link
Member

Fedik commented Mar 22, 2024

I have tested this item ✅ successfully on 062d2f9


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43119.

@Hackwar
Copy link
Member Author

Hackwar commented Mar 22, 2024

For 6.0 we should enforce the interface by typehinting the input vars properly.

@wilsonge wilsonge merged commit c23fdab into joomla:5.2-dev Mar 22, 2024
@wilsonge
Copy link
Contributor

Trivial change so merging with a single good test + my code review

@wilsonge wilsonge added this to the Joomla! 5.2.0 milestone Mar 22, 2024
dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Oct 17, 2024
@Hackwar Hackwar deleted the 5.2-router-component branch June 10, 2025 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments