I think this would be good with an additional `System::isLegacyMode()` check e.g.

    if (System::isLegacyMode() && (is_string($where) || is_string($orderBy))) {