While testing without aliases in the core phpunit tests (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/800799) the tests in DatabaseTest::testFactory returns the unnamespaced DatabaseMysqli, which does not exists in my patch set and the assertion gets null and a failure
I would assume that the optional driver class in the array is used instead
static $builtinTypes = [ 'mysql' => [ 'mysqli' => DatabaseMysqli::class ], 'sqlite' => DatabaseSqlite::class, 'postgres' => DatabasePostgres::class, ];
But the default fallback is used:
if ( !isset( $builtinTypes[$dbType] ) ) { // Not a built in type, assume standard naming scheme return 'Database' . ucfirst( $dbType ); }
This is not a problem in production because the alias exists, but it blocks a possible removable of the deprecated class alias