Skip to content

Commit 3cb172a

Browse files
authored
Merge pull request #6895 from doctrine/4.2.x
Merge 4.2.x up into 4.3.x
2 parents 8a1acdc + a11db88 commit 3cb172a

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/Platforms/SQLitePlatform.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
use function strpos;
4040
use function strtolower;
4141
use function substr;
42-
use function trim;
4342

4443
/**
4544
* The SQLitePlatform class describes the specifics and dialects of the SQLite
@@ -295,9 +294,7 @@ protected function _getCreateTableSQL(string $name, array $columns, array $optio
295294

296295
$tableComment = '';
297296
if (isset($options['comment'])) {
298-
$comment = trim($options['comment'], " '");
299-
300-
$tableComment = $this->getInlineTableCommentSQL($comment);
297+
$tableComment = $this->getInlineTableCommentSQL($options['comment']);
301298
}
302299

303300
$query = ['CREATE TABLE ' . $name . ' ' . $tableComment . '(' . $queryFields . ')'];

tests/Functional/Driver/PDO/SQLSrv/DriverTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
1414

1515
use function array_merge;
16+
use function array_replace;
1617

1718
#[RequiresPhpExtension('pdo_sqlsrv')]
1819
class DriverTest extends AbstractDriverTestCase
@@ -44,7 +45,7 @@ private function getConnection(array $driverOptions): Connection
4445
$params = TestUtil::getConnectionParams();
4546

4647
if (isset($params['driverOptions'])) {
47-
$driverOptions = array_merge($params['driverOptions'], $driverOptions);
48+
$driverOptions = array_replace($params['driverOptions'], $driverOptions);
4849
}
4950

5051
return (new Driver())->connect(

tests/Functional/Schema/SchemaManagerFunctionalTestCase.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1144,11 +1144,11 @@ public function testCommentInTable(): void
11441144
{
11451145
$table = new Table('table_with_comment');
11461146
$table->addColumn('id', Types::INTEGER);
1147-
$table->setComment('Foo with control characters \'\\');
1147+
$table->setComment('\'\\ Foo with control characters \'\\');
11481148
$this->dropAndCreateTable($table);
11491149

11501150
$table = $this->schemaManager->introspectTable('table_with_comment');
1151-
self::assertSame('Foo with control characters \'\\', $table->getComment());
1151+
self::assertSame('\'\\ Foo with control characters \'\\', $table->getComment());
11521152
}
11531153

11541154
public function testIntrospectReservedKeywordTableViaListTableDetails(): void

0 commit comments

Comments
 (0)