I am basing part of my code's requirements to the @since
docblock attribute, found in the Joomla's core files.
Though recently i was fooled by that.
I was using the ToolbarHelper class without changing my extension's min. requirements, as the @since
tag was pointing to 1.5.
Though this class was added there in Joomla 3.9.0
Having as a result, some systems to break.
Does the @since
tag refers to the Joomla version?
Is there code inspection for that, beyond the code's logic?
Labels |
Added:
?
|
Status | New | ⇒ | Confirmed |
Title |
|
We didn't choose to change the since tags when we namespaced all our classes - as they are a class_alias they are actually the same class ;) . Other than that they largely should be good - although occasionally people have copy/paste errors.
Yes, but you can't use namespaced classes on 1.5 even though @since
tag says it was available in that version. Very misleading.
Other than that they largely should be good - although occasionally people have copy/paste errors.
It is good when the alias is used. If a developer decides to use the namespaced class, has no clue about it's introduction date/version in Joomla.
It still is true that the namespaced class can't have a "since 1.5", because it didn't exist in 1.5.
The purpose of that tag is to show in which version that element (class) became available.
You could try to add a since tag to the alias (don't know if that is possible), there it would be correct. But not for the namespaced class.
I would say close this issue - no one in their right mind is going to visit each and every since tag and ensure its credibility and update the wrong ones now.
Maintainers see above - can't see this ever going to be changed so no point in it being kept open
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-05-21 21:38:36 |
Closed_By | ⇒ | chmst |
It still is true that the namespaced class can't have a "since 1.5", because it didn't exist in 1.5.
The purpose of that tag is to show in which version that element (class) became available.
It's referring to the version when this class was originally introduced as
JToolbarHelper
. It was moved to a namespace in 3.9.It's a valid concern though.