And start using them instead of wfGetDB(), LB/LBF connection methods or
worse, $this->getDB().
$this->getDB() reuses the database object regardless of whether you're
calling a replica or primary, leading to returning a replica on a
primary and other way around.
Bug: T330641
Change-Id: I9e2cf85ca277022284fc26b9f37db57bd12aaa81
Make phan stricter about conditional variable declaration
Remaining false positive issues are suppressed.
The suppression and the setting change can only be done together
Bug: T259172
Change-Id: I1f200ac37df7448453688bf464a8250c97313e5d
A "currently-existing category" is defined as a category that either
contains any pages or has a description page. Thus:
* Category::initialize() now schedules an update to insert a row if the
title exits but the row is missing.
* Category::refreshCounts() now removes the row if the title doesn't
exist and the category is empty.
* WikiPage::onArticleCreate() loads the Category object, to trigger
bullet #1.
* WikiPage::updateCategoryCounts() refreshes the counts if it results in
the row showing 0 pages, to trigger bullet #2.
* LinksDeletionUpdate refreshes the counts if the row shows 0 pages, to
trigger bullet #2.
A maintenance script is provided to update the category table for this
new definition.
Bug: T28411
Bug: T50824
Change-Id: I0f0adf124c181ae5d3c7c95b3b5fb275a725794c