$this->profiler = new ProfilerStub( [] );
$this->trxProfiler = new TransactionProfiler();
- $this->cliMode = isset( $opts['cliMode'] ) ? $opts['cliMode'] : true;
+ $this->cliMode = $opts['cliMode'] ?? true;
$this->connLogger = new \Psr\Log\NullLogger();
$this->queryLogger = new \Psr\Log\NullLogger();
$this->errorLogger = function ( Exception $e ) {
wfWarn( get_class( $e ) . ": {$e->getMessage()}" );
};
+ $this->deprecationLogger = function ( $msg ) {
+ wfWarn( $msg );
+ };
$this->currentDomain = DatabaseDomain::newUnspecified();
$this->open( 'localhost', 'testuser', 'password', 'testdb' );
}
}
protected function wasKnownStatementRollbackError() {
- return isset( $this->lastError['wasKnownStatementRollbackError'] )
- ? $this->lastError['wasKnownStatementRollbackError']
- : false;
+ return $this->lastError['wasKnownStatementRollbackError'] ?? false;
}
function fieldInfo( $table, $field ) {