History log of /dokuwiki/inc/legacy.php (Results 1 – 6 of 6)
Revision Date Author Comments
# 21d6f176 05-Jul-2026 Andreas Gohr <andi@splitbrain.org>

fix(parser): restore BC for manual Handler/Parser construction

The parser rework made ModeRegistry a required constructor argument on
Handler and Parser and dropped the Doku_Parser class alias, brea

fix(parser): restore BC for manual Handler/Parser construction

The parser rework made ModeRegistry a required constructor argument on
Handler and Parser and dropped the Doku_Parser class alias, breaking the
long-documented manual sub-parsing pattern used by many plugins
(new Doku_Handler(); new Parser($handler); ...): both threw
ArgumentCountError and new Doku_Parser() fatalled as an unknown class.

Default the ModeRegistry argument on both constructors: Handler builds a
registry for the configured syntax, Parser takes it from the handler.
Re-add the Doku_Parser alias. Constructing without a registry emits a
deprecation pointing at p_get_instructions().

show more ...


# 71096e46 18-Apr-2026 Andreas Gohr <andi@splitbrain.org>

move handler methods into ParserMode classes and rename Handler

Each ParserMode class now implements handle() from ModeInterface,
containing the token handling logic that previously lived as individ

move handler methods into ParserMode classes and rename Handler

Each ParserMode class now implements handle() from ModeInterface,
containing the token handling logic that previously lived as individual
methods on Doku_Handler.

The Handler class (formerly Doku_Handler) is the single dispatch point:
Lexer passes tokens to Handler::handleToken() which routes to mode
objects, plugins, or returns false. The Lexer only tokenizes and
resolves mapHandler aliases.

Key changes:
- Add handle() to ModeInterface, implemented by all mode classes
- Move Doku_Handler to dokuwiki\Parsing\Handler namespace
- File extends Code (shared parsing via $type property)
- Quotes uses mapHandler() + Handler::getModeName() for sub-modes
- Media::parseMedia() replaces Doku_Handler_Parse_Media()
- Code::parseHighlightOptions() replaces parse_highlight_options()
- Per-parse state (footnote, doublequote) stays on Handler
- Deprecated wrappers kept for base/header/internallink/media
- Class alias and rector rules added for backward compatibility

show more ...


# db926724 26-Jan-2024 Andreas Gohr <andi@splitbrain.org>

Replace strftime with Intl ICU. Fixes #3573

This uses a class that maps strftime placeholders to the appropriate ICU
patterns. I am using the fallback-intl branch here which provides an
English-only

Replace strftime with Intl ICU. Fixes #3573

This uses a class that maps strftime placeholders to the appropriate ICU
patterns. I am using the fallback-intl branch here which provides an
English-only fallback when the intl extension is not available.

Core has only two places where strftime is used: dformat() and the
SimplePie feed parser. Both are adjusted with this patch. For the latter
a custom Item class had to be registered. For better separation all our
FeedParser classes have been moved to the Feed namespace where our
FeedCreator classes already reside.

Note that this will currently be a degration for users without intl as
it will fall back to date and not to the still available strftime.

show more ...


# d4f83172 31-Aug-2023 Andreas Gohr <andi@splitbrain.org>

code style: line breaks


# a0aeafaa 30-Aug-2023 Andreas Gohr <andi@splitbrain.org>

define custom renames

Automatically rename occurances of deprecated functions and classes.
These renames will come in even more handy when rector is applied to 3rd
party plugins.


# e1d9dcc8 15-Jun-2018 Andreas Gohr <andi@splitbrain.org>

First go at moving the plugin classes into their own namespace