DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:releases:refactor2024

developer changelog

Refactoring 2024

FIXME 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 deprecated in 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: Remove old workflow and add the new one

\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

4164

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') . ';');
devel/releases/refactor2024.txt · Last modified: by saggi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki