User tests: Successful: Unsuccessful:
The patch add use of WebAsset for JHtmlJquery, JHtmlSearchtools scripts.
The site should work as before, without errors and visible changes.
For reference #22435
Status | New | ⇒ | Pending |
Category | ⇒ | Repository Libraries |
Labels |
Added:
?
|
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.
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.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-12-09 23:11:36 |
Closed_By | ⇒ | wilsonge |
Sorry for the delay here. And thanks :)
@laoneo updated, thanks!