Table of Contents
Refactoring 2024
Update of this page is in Progress
This page lists changes from February 2024 to May 2025. For older changes see refactor2023, refactor2022, refactor2021 and refactor2020, for newer refactor2025.
| Welcome to add more notes/examples/etc on this page, to make updating of plugins and templates easy! Please share all remarks and possible improvements. See forum topic. Thank you very much! Klap-in |
|---|
How to find deprecated code
A lot of code has been marked as deprecated. Which means it will be removed in future releases of DokuWiki. While this does (normally) not cause plugins to malfunction now, it may lead to nasty surprises after future updates.
Plugin/template authors can easily check if they use any deprecated functions, classes or methods:
Since the Igor 2022 release:
- logging of deprecated messages is default enabled, otherwise you need to uncheck
deprecatedin the dontlog configuration setting - use the plugin
- check LogViewer (or
data/log/deprecated/<date>.log).
Since Kaos 2024 release:
- Setup GitHub Action (or setup Rector locally), to get code improvement suggestions. Plugin authors who want to use the new workflow can easily add it using the dev plugin:

\PHP81_BC\strftime()
4164 Replace strftime with Intl ICU using PHP81_BC\strftime().
In general is recommended to use dformat().
If that does not fit, you can use:
+ use function PHP81_BC\strftime; return strftime($format, $dt);
Or https://php.watch/versions/8.1/strftime-gmstrftime-deprecated.
FeedParser
| Old | Renamed |
|---|---|
| FeedParser | dokuwiki\Feed\FeedParser |
| FeedParserFile | dokuwiki\Feed\FeedParserFile |
| New | |
| dokuwiki\Feed\FeedParserItem | |
Inline scripts
4220 CSP nonce handling. Inline scripts will use any nonce provided in the environment variable 'NONCE' if added with tpl_inlineScript()
- echo '<script>/*<![CDATA[*/textChanged = ' . ($mod ? 'true' : 'false') . '/*!]]>*/</script>'; + tpl_inlineScript('textChanged = ' . ($mod ? 'true' : 'false') . ';');
