? Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
18 Nov 2018

Summary of Changes

The patch add use of WebAsset for JHtmlJquery, JHtmlSearchtools scripts.

Testing Instructions

The site should work as before, without errors and visible changes.

For reference #22435

avatar Fedik Fedik - open - 18 Nov 2018
avatar Fedik Fedik - change - 18 Nov 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Nov 2018
Category Repository Libraries
avatar laoneo laoneo - change - 20 Nov 2018
Labels Added: ?
avatar Fedik
Fedik - comment - 20 Nov 2018

@laoneo updated, thanks!

avatar mbabker
mbabker - comment - 20 Nov 2018

We shouldn't be using code snippets like this for deprecation statements. Remember these render on docs pages like the API site. So a @deprecated 5.0 Use $app->getDocument()->getWebAssetManager()->enableAsset('jquery.ui.core'); tag has absolutely no context, WTF is $app? A magic global? A stdClass object?

If you're suggesting an alternative it should always be in the format of Use <class>::<method> instead. Use the documentation for full code examples of how to use an API.

avatar Fedik
Fedik - comment - 20 Nov 2018

@mbabker then Factory::getApplication()->.... is fine, or?

avatar mbabker
mbabker - comment - 20 Nov 2018

You know what, just use Factory::getApplication()->whatever.

The right way to do it would be to say Use Joomla\CMS\WebAsset\WebAssetRegistry::enableAsset() and leave it at that (because it's not a deprecation tag's or log message's responsibility to give anyone an exact copy/paste snippet on what the replacement is, the tag and notice are there to tell people what the replacement is and the core documentation would be the resource developers go to to learn how to actually use a feature/API, but we all know the docs are purely end user facing resources and the actual code has nothing but the automatically generated references from the doc blocks). But people seem to think the doc blocks have to be self documenting on how to actually use the code, so whatever.

avatar wilsonge wilsonge - change - 9 Dec 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-12-09 23:11:36
Closed_By wilsonge
avatar wilsonge wilsonge - close - 9 Dec 2018
avatar wilsonge wilsonge - merge - 9 Dec 2018
avatar wilsonge
wilsonge - comment - 9 Dec 2018

Sorry for the delay here. And thanks :)

Add a Comment

Login with GitHub to post a comment