PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
30 Sep 2024

Summary of Changes

While reviewing the AbstractView class, I stumbled upon the use of the reflection class in the getName() method of AbstractView. This PR refactors the method to not use reflection.

Testing Instructions

Codereview

Actual result BEFORE applying this Pull Request

Everything should work identical to before.

Expected result AFTER applying this Pull Request

Everything should work identical to before.

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

avatar Hackwar Hackwar - open - 30 Sep 2024
avatar Hackwar Hackwar - change - 30 Sep 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Sep 2024
Category Libraries
avatar Hackwar Hackwar - change - 30 Sep 2024
Labels Added: PR-5.3-dev
avatar wilsonge
wilsonge - comment - 1 Oct 2024

This one scares me more than the others - mainly because we've treated this differently to the model and controllers getName().

I think I at least want to see a unit test for this one (sorry) - both for a namespaced and non-namespaced child class.

avatar laoneo
laoneo - comment - 1 Oct 2024

What's wrong with reflection?

avatar Hackwar
Hackwar - comment - 1 Oct 2024

To be honest, it just feels overkill to use this and not exactly performant when you could also simplify it like I did above. I'm not married to this PR. If you disagree, please close it. It is just a proposal.

avatar laoneo laoneo - close - 1 Oct 2024
avatar laoneo
laoneo - comment - 1 Oct 2024

Ok, then I feel free to close as I see little to none benefit and it should be covered with proper unit tests to make sure we do not introduce here a regression. You can reopen anytime if this gets decent coverage as speed improvements are always welcome. Even when I doubt that we gain here much.

But keep up the good work with the cleanup as this is very important work. Thanks!

avatar laoneo laoneo - change - 1 Oct 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-10-01 14:03:32
Closed_By laoneo

Add a Comment

Login with GitHub to post a comment