Page MenuHomePhabricator

De-duplicate Less_Tree_Color::fromKeyword method
Closed, ResolvedPublic

Description

During https://gerrit.wikimedia.org/r/c/mediawiki/libs/less.php/+/981308/ we found that the fromKeyword function is duplicated for unclear reasons.

I suggest we:

  1. Find when it was duplicated (git blame).
  2. If no compelling reason is apparent from that change, then remove the Less_Parser method and call the public Less_Tree_Color::fromKeyword in both places instead. We prefer this version, because that matches where it is defined in less-2.5.3.js.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 987824 had a related patch set uploaded (by Hokwelum; author: Hokwelum):

[mediawiki/libs/less.php@master] De-duplicate Less_Tree_Color::fromKeyword method

https://gerrit.wikimedia.org/r/987824

This patch added the duplicate. Right now, there's no need for the duplicate function since we no longer use the old cache method which was removed Here.

Change 987824 merged by jenkins-bot:

[mediawiki/libs/less.php@master] Less_Parser: De-duplicate Less_Tree_Color::fromKeyword method

https://gerrit.wikimedia.org/r/987824