?
avatar sakiss
sakiss
26 Oct 2020

Steps to reproduce the issue

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.

Additional comments

Does the @since tag refers to the Joomla version?
Is there code inspection for that, beyond the code's logic?

avatar sakiss sakiss - open - 26 Oct 2020
avatar joomla-cms-bot joomla-cms-bot - change - 26 Oct 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 26 Oct 2020
avatar sakiss sakiss - change - 26 Oct 2020
The description was changed
avatar sakiss sakiss - edited - 26 Oct 2020
avatar sakiss sakiss - change - 26 Oct 2020
The description was changed
avatar sakiss sakiss - edited - 26 Oct 2020
avatar SharkyKZ
SharkyKZ - comment - 26 Oct 2020

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.

avatar jwaisner jwaisner - change - 26 Oct 2020
Status New Confirmed
avatar sakiss
sakiss - comment - 26 Oct 2020

@SharkyKZ Thanks.
Though JToolbarHelper and ToolbarHelper are different classes.

avatar sakiss sakiss - change - 26 Oct 2020
Title
DocBlock @since accuracy
DocBlock @since credibility ?
avatar sakiss sakiss - edited - 26 Oct 2020
avatar wilsonge
wilsonge - comment - 26 Oct 2020

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.

avatar SharkyKZ
SharkyKZ - comment - 27 Oct 2020

Yes, but you can't use namespaced classes on 1.5 even though @since tag says it was available in that version. Very misleading.

avatar sakiss
sakiss - comment - 27 Oct 2020

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.

avatar Bakual
Bakual - comment - 27 Oct 2020

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.

avatar PhilETaylor
PhilETaylor - comment - 30 Apr 2021

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.

avatar brianteeman
brianteeman - comment - 21 May 2021

Maintainers see above - can't see this ever going to be changed so no point in it being kept open

avatar chmst chmst - change - 21 May 2021
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2021-05-21 21:38:36
Closed_By chmst
avatar chmst chmst - close - 21 May 2021
avatar chmst
chmst - comment - 21 May 2021

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.

Add a Comment

Login with GitHub to post a comment