ParserOutput: Convert category name back to a LinkTarget when merging CMC
commitf2d910844f280da346586cba812e05d5beea0ae5
authorC. Scott Ananian <cscott@cscott.net>
Mon, 18 Dec 2023 19:33:54 +0000 (18 14:33 -0500)
committerC. Scott Ananian <cananian@wikimedia.org>
Mon, 18 Dec 2023 21:01:51 +0000 (18 21:01 +0000)
treed69033b6756c9e02a661b5146b5014742d5c5192
parentdf1f18cc9dcb40fd8a8a88025bb2757a9d093ad0
ParserOutput: Convert category name back to a LinkTarget when merging CMC

When we are merging a ParserOutput into a ContentMetadataCollector,
convert categories to LinkTarget, which is the preferred parameter
type of CMC::addCategory().

This also reverts the temporary fix in
I0715f4fbc870e401e5759dd7c7a3c19077c40a6a.

Note that the category names *should* be in dbkey form for proper
deduplication, but both TitleValue:tryNew() and
CategoryLinksTable::setParserOutput() will renormalize if needed
(see I2b08edd90666e0fa4eafe91444a58806909b02d6 / T328477).

Depends-On: Iea894aa2cee90f4ca5c7688493b0654e4605ce23
Change-Id: I5a903396edb4da0900ecef37cb3bf4bd03b5ba68
includes/parser/ParserOutput.php