@trigger_error('In drupal:10.0.0 not setting the $identifierQuotes property in the concrete Connection class will result in an RuntimeException. See https://www.drupal.org/node/2986894',E_USER_DEPRECATED);
$this->identifierQuotes=['',''];
}
assert(count($this->identifierQuotes)===2&&Inspector::assertAllStrings($this->identifierQuotes),'\Drupal\Core\Database\Connection::$identifierQuotes must contain 2 string values');
// The 'transactions' option is deprecated.
if(isset($connection_options['transactions'])){
@trigger_error('Passing a \'transactions\' connection option to '.__METHOD__.' is deprecated in drupal:9.1.0 and is removed in drupal:10.0.0. All database drivers must support transactions. See https://www.drupal.org/node/2278745',E_USER_DEPRECATED);
...
...
@@ -329,7 +346,7 @@ protected function setPrefix($prefix) {
// Set up a map of prefixed => un-prefixed tables.
foreach($this->prefixesas$table_name=>$prefix){
...
...
@@ -360,20 +377,6 @@ protected function setPrefix($prefix) {
}
}
/**
* Returns the identifier quote character for the database type.
*
* The ANSI SQL standard identifier quote character is a double quotation
* mark.
*
* @return string
* The identifier quote character for the database type.
*/
protectedfunctionidentifierQuote(){
@trigger_error('In drupal:10.0.0 this method will be abstract and contrib and custom drivers will have to implement it. See https://www.drupal.org/node/2986894',E_USER_DEPRECATED);
return'';
}
/**
* Appends a database prefix to all tables in a query.
*
...
...
@@ -413,7 +416,7 @@ public function prefixTables($sql) {
* This method should only be called by database API code.
* @expectedDeprecation In drupal:10.0.0 not setting the $identifierQuotes property in the concrete Connection class will result in an RuntimeException. See https://www.drupal.org/node/2986894
* @group legacy
*/
publicfunctiontestIdentifierQuotesDeprecation(){
$mock_pdo=$this->createMock(StubPDO::class);
newStubConnection($mock_pdo,[],NULL);
}
/**
* @covers ::__construct
*/
publicfunctiontestIdentifierQuotesAssertCount(){
$this->expectException(\AssertionError::class);
$this->expectExceptionMessage('\Drupal\Core\Database\Connection::$identifierQuotes must contain 2 string values');
$mock_pdo=$this->createMock(StubPDO::class);
newStubConnection($mock_pdo,[],['"']);
}
/**
* @covers ::__construct
*/
publicfunctiontestIdentifierQuotesAssertString(){
$this->expectException(\AssertionError::class);
$this->expectExceptionMessage('\Drupal\Core\Database\Connection::$identifierQuotes must contain 2 string values');