Topic on Extension talk:Variables/Archive 2

Deprecated hook (InternalParseBeforeSanitize)

12
Cavila (talkcontribs)

This extension needs an update for 1.35.

Use of InternalParseBeforeSanitize hook (used in VariablesHooks::onInternalParseBeforeSanitize) was deprecated in MediaWiki 1.35.

(used for '#var_final' parser function)

MGChecker (talkcontribs)
Cavila (talkcontribs)

Thanks. Personally, I can live without #var_final, but it's good to have things cleared up.

MGChecker (talkcontribs)

The thing is, apparently there are not even plans for hook removal. And complete Parsoid compatibility is out of reach anyway without a complete rewrite, which might very well be impossible and I won't do.

Kghbln (talkcontribs)

So in the end the code for #var_final will be removed from the extension. This does make sense or is it better to do so once the hook was removed completely from MediaWiki core? I am assuming here that this parser function still works on MW 1.35.x though I may be wrong.

MGChecker (talkcontribs)

The problem lays deeper.

According to the points of the parsing team, this hook might actually continue to work indefinitely even though the deprecation.

On the other hand, I do not feel like listening to these deprecations will help us in the long run, because the whole principle of this extension is uncertain in the context of Parsoid.

Kghbln (talkcontribs)

Thanks for the information. Still I do not know if the parser function will work or not for 1.35. I guess this is the question people will ask in the short run.

Apparently in the long run the situation appears to not look to bright.

MGChecker (talkcontribs)

It will work, but there will be deprecation notices on upgrade.

MGChecker (talkcontribs)

It would be possible to make deprecation warnings disappear, I think, by migrating back to InternalParseBeforeLinks and sanitize inside this extension. However, the only reason InternalParseBeforeLinks is not deprecated yet, is its use inside SemanticMediaWiki, which is even more widely used than Variables. I could not achieve a similar exception for Variables, but might have got one if I would have been aware of this process earlier.

It stands to reason that the migration to InternalParseBeforeLinks would bring no fruit anyway, since it will probably be removed at the same point as InternalParseBeforeSanitize. I will try averting a removal of the hook from the old parser if possible, pointing out my discussions with the Parsing-Team regarding this point, but I can not promise anything.

Kghbln (talkcontribs)

Thank you! I appreciate your effort!

Cavila (talkcontribs)

Thanks for looking into this!

MGChecker (talkcontribs)
Reply to "Deprecated hook (InternalParseBeforeSanitize)"