[BUG]: edge case: Powers inside Powers not validated #1229
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What Happened?
I am refactoring and i am replacing all my ComponentHelper with the corresponding Joomla Power SPK.
I have custom codes for every function i use inside my helper class. So i was calling another function before.
But since this is called inside the Helper class it adds a use statement that breaks things. I've changed it to self:: now instead. But that makes the custom code a bit less flexible. Of course this would not be an issue if i moved my helpers to it's own powers.
I just wanted to let you know of this use case. Please close the bug report if you find that this is expected behaviour and it's not something that should be catched during replacement of these SPK's.
Steps to reproduce the Bug
add Joomla___cf3b95c1_ba56_4193_8eb4_9164582b7f55___Power class to a custom code and add this to the component powers area.
It'll add a use Statement (to be expected) but in this file it breaks stuff.
Which Joomla version are you compiling in?
5
Which PHP version are you compiling in?
8.3
Which Joomla versions are you targeting?
5
Which PHP version are you targeting?
8.3
Which Web server is JCB running on?
litespeed
Which Relational Database is JCB running on?
mariadb 10.11
Which OS is JCB running on?
almalinux 9
Which JCB version are you using?
latest 5.1 alpha 5
Where in JCB did this issue occur?
Compilation of a component
On which browsers did you encounter the issue?
Firefox
Additional Comments
No response
Thanks... yes you will need to avoid using the class name in a helper class but instead use
self::
would ensure this does not happen. There is really no automated JCB way to predict this and avoid this.