User tests: Successful: Unsuccessful:
PR for #12415
If I understood correctly then the deprecation notice only needs to be in this one file
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
Also I not sure if the IDEs dedtect the deprecation die position, I will check this when I'm home or someone else can do this.
I would change the deprecation should be something more help full like: "Use JPATH_SITE .'/components/com_....' or JPATH_ADMINISTRATOR...."
I wouldn't do them in one pr, because I think we need to test then every removal.
We should do these as doc blocks, like _QQ_
has. The phpDocumentor pass picks these up and we can show the deprecations on the API docs site, see https://api.joomla.org/cms-3/packages/default.html and how it has many of the global constants that are found in the libraries.
It should be right above the define()
line, not the if (defined())
check. Otherwise, yes, that's better.
Could we please get a useful deprecation message? A bit better documentation is not wrong.
I hate the deprecation notices in J3 with no replacement and in reality there was never a new way and you have to use the deprecated functions.
thx
Could we please get a useful deprecation message? A bit better documentation is not wrong.
Please give a suggestion - there is no intended replacement here??
I hate the deprecation notices in J3 with no replacement and in reality there was never a new way and you have to use the deprecated functions.
I've edited out your bad language above. This is a public tracker. Please no swearing and be polite to the other volunteers here.
It should be right above the define() line, not the if (defined()) check. Otherwise, yes, that's better.
so in that case I should do it for each of the variants?
Hey at least I am adding a comment to the code that is actually referring to the correct thing. Unlike some other pull requests I can mention that have beautiful comments copy pasted from something completely different
so in that case I should do it for each of the variants?
Yes please. On https://api.joomla.org/framework-1/packages/default.html if you click the _QQ_
constant it actually does show the @deprecated
tag from the file's doc block. So having a proper doc block for each define()
will do the same with the rendering for these constants (and in general it wouldn't be a bad idea to do proper doc blocks for all the constants found in the libraries, another PR for someone who's interested in improving docs).
I've edited out your bad language above. This is a public tracker. Please no swearing and be polite to the other volunteers here.
thx
Please give a suggestion - there is no intended replacement here??
I already did an example. Here a more complete one.
"Use JPATH_SITE or JPATH_ADMINISTRATOR concationed with /components/< your component >"
Would be nice to get an agreement here about the message to deprecate it.
@brianteeman can you add the suggestion from @mbabker and then we are good to go here
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-10-14 21:36:36 |
Closed_By | ⇒ | wilsonge |
Thanks
Shouldn't this pr also change all core usages as allon mentioned?