Page MenuHomePhorge

Ineffective instanceof check in PhabricatorMySQLSetupCheck:shouldUseMySQLSearchEngine()
Open, Needs TriagePublic

Description

Per PHPStan static code analysis,
Instanceof between PhabricatorSearchService and PhabricatorMySQLSearchHost will always evaluate to false
in https://we.phorge.it/source/phorge/browse/master/src/applications/config/check/PhabricatorMySQLSetupCheck.php$392

This code was introduced by rPe41c25de5050d69b720424dadbe3d8680362ceaf.

Event Timeline

Ah. Maybe PhabricatorSearchHost should extend PhabricatorSearchService? Boh

I think line 392 should be:

if ($service->engine instanceof PhabricatorFerretFulltextStorageEngine) {