? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
18 Aug 2018

PR for #12415

If I understood correctly then the deprecation notice only needs to be in this one file

avatar brianteeman brianteeman - open - 18 Aug 2018
avatar brianteeman brianteeman - change - 18 Aug 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Aug 2018
Category Libraries
6f8c89c 18 Aug 2018 avatar brianteeman space
avatar brianteeman brianteeman - change - 18 Aug 2018
Labels Added: ?
avatar HLeithner
HLeithner - comment - 18 Aug 2018

Shouldn't this pr also change all core usages as allon mentioned?

avatar HLeithner
HLeithner - comment - 18 Aug 2018

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...."

avatar laoneo
laoneo - comment - 18 Aug 2018

I wouldn't do them in one pr, because I think we need to test then every removal.

avatar mbabker
mbabker - comment - 18 Aug 2018

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.

avatar brianteeman
brianteeman - comment - 18 Aug 2018

Is that better for you @mbabker

avatar mbabker
mbabker - comment - 18 Aug 2018

It should be right above the define() line, not the if (defined()) check. Otherwise, yes, that's better.

avatar HLeithner
HLeithner - comment - 18 Aug 2018

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

avatar wilsonge
wilsonge - comment - 18 Aug 2018

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.

avatar brianteeman
brianteeman - comment - 18 Aug 2018

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?

avatar brianteeman
brianteeman - comment - 18 Aug 2018

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

avatar mbabker
mbabker - comment - 18 Aug 2018

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).

avatar HLeithner
HLeithner - comment - 18 Aug 2018

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 >"

avatar laoneo
laoneo - comment - 20 Sep 2018

Would be nice to get an agreement here about the message to deprecate it.

avatar mbabker
mbabker - comment - 20 Sep 2018

I added full doc blocks for many of the library defined constants in 0bfb0b5

Just copy those, add @deprecated tag as you would a method, and have a nice day.

avatar laoneo
laoneo - comment - 27 Sep 2018

@brianteeman can you add the suggestion from @mbabker and then we are good to go here

avatar brianteeman
brianteeman - comment - 10 Oct 2018

@laoneo done as requested

avatar wilsonge wilsonge - change - 14 Oct 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-10-14 21:36:36
Closed_By wilsonge
avatar wilsonge wilsonge - close - 14 Oct 2018
avatar wilsonge wilsonge - merge - 14 Oct 2018
avatar brianteeman
brianteeman - comment - 14 Oct 2018

Thanks

Add a Comment

Login with GitHub to post a comment