objectcache: Fix DI for MultiWriteBagOStuff sub caches
Follows-up Ia893ddb36427eb5, which added unreachable code because is_subclass_of is strictly for matching subclasses. Test plan: * Add the following to your LocalSettings: $wgParserCacheType = 'mysql-multiwrite'; $wgObjectCaches['mysql-multiwrite'] = [ 'class' => 'MultiWriteBagOStuff', 'caches' => [ 0 => [ 'factory' => [ 'ObjectCache', 'getInstance' ], 'args' => [ CACHE_DB ] ], 1 => [ 'class' => SqlBagOStuff::class, 'loggroup' => 'SQLBagOStuff', 'server' => [ 'type' => 'sqlite', 'dbname' => 'wikicache', 'tablePrefix' => '', 'variables' => [ 'synchronous' => 'NORMAL' ], 'dbDirectory' => $wgSQLiteDataDir, 'trxMode' => 'IMMEDIATE', 'flags' => 0 ] ], ], 'replication' => 'async', ]; * Main_Page fatals without this patch, renders with. Bug: T327158 Change-Id: I59266726ad72e78c9f99d3cc8f9c8838fabed3b5
This commit is contained in:
parent
d4bd457684
commit
4e596f5112
1 changed files with 1 additions and 1 deletions
|
|
@ -204,7 +204,7 @@ class ObjectCache {
|
|||
}
|
||||
|
||||
// Normalization and DI for MultiWriteBagOStuff
|
||||
if ( is_subclass_of( $class, MultiWriteBagOStuff::class ) ) {
|
||||
if ( is_a( $class, MultiWriteBagOStuff::class, true ) ) {
|
||||
// Phan warns about foreach with non-array because it
|
||||
// thinks any key can be Closure|IBufferingStatsdDataFactory
|
||||
'@phan-var array{caches:array[]} $params';
|
||||
|
|
|
|||
Loading…
Reference in a new issue