Is there a series of out-of-the-box replacing to fix scripts? Vito
2016-03-26 0:19 GMT+01:00 Krinkle <[email protected]>: > TL;DR: > * Review site scripts to verify that no wikibits methods[1] are used. > * If you find usage of wikibits, refactor the code to use newer > methods instead, or add a dependency on the 'mediawiki.legacy.wikibits' > module. > > Hi all, > > The deprecation and eventual removal of the legacy "wikibits" JavaScript > module has been a long time coming. This announces another step in that > direction. > > In 2011, wikibits was deprecated following the introduction of > ResourceLoader in MediaWiki 1.17. To accommodate pre-ResourceLoader code > that doesn't have a concept of dependencies, $wgIncludeLegacyJavaScript was > created to allow existing sites (such as Wikimedia wikis) to load > "mediawiki.legacy.wikibits" by default on all pages. While most code no > longer uses wikibits, it remains set to this day. > > In 2013, we introduced mw.log.deprecate in MediaWiki 1.23 to help you > detect any use of deprecated methods in the browser's developer console.[2] > We have seen a big reduction in the use of such methods.[3] > > In 2015, we made significant performance improvements in MediaWiki 1.26, > by running JavaScript asynchronously rather than blocking page rendering. > To avoid breaking undeclared use of wikibits, we made an exception for > wikibits and kept it as blocking other JavaScript modules on page views, > re-purposing $wgIncludeLegacyJavaScript to mean "always load wikibits > before other modules". > > Now, as the last step before removing wikibits from MediaWiki, it will > first no longer load by default in MediaWiki 1.27. This change will roll > out on Wikimedia wikis in April 2016. If you find usage of wikibits > features without a dependency, please refactor this code to use the modern > replacements[1], or add an explicit dependency as temporary stop-gap while > figuring out how to refactor the code. > > Before re-factoring, please remember to first check whether the associated > code is working. Many wikibits methods have become empty placeholders to > avoid cascading failures. As such, blind updates may cause old or broken > code that is currently invisible to re-activate itself. Removing dead code > speeds up wikis for all users, and reduces the risk of things going wrong > in future. > > For third-party wikis, this will ship in MediaWiki 1.27.0. If needed, you > can alter LocalSettings.php and set $wgIncludeLegacyJavaScript to true. > This will give you time to fix missing dependencies on wikibits. In > MediaWiki 1.28, to be released in November 2016, the wikibits module will > be removed entirely. > > -- Krinkle > > > [1] https://www.mediawiki.org/wiki/ResourceLoader/Legacy_JavaScript > [2] > https://lists.wikimedia.org/pipermail/wikitech-l/2013-October/072776.html > [3] > https://grafana.wikimedia.org/dashboard/db/mw-js-deprecate?from=now-10M > > > _______________________________________________ > Wikitech-ambassadors mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikitech-ambassadors > >
_______________________________________________ Wikitech-ambassadors mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-ambassadors
