Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 26061a1

Browse filesBrowse files
committed
Dont lock tables or start transactions
1 parent f72d516 commit 26061a1
Copy full SHA for 26061a1

File tree

2 files changed

+2
-10
lines changed
Filter options

2 files changed

+2
-10
lines changed

‎src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/PostgreSqlConnectionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/PostgreSqlConnectionTest.php
+2-8Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,10 @@ public function testGetExtraSetupSql()
5151
$table->addOption('_symfony_messenger_table_name', 'queue_table');
5252
$sql = implode("\n", $connection->getExtraSetupSqlForTable($table));
5353

54-
/*
55-
* We need to start a transaction for the following commands to work properly:
56-
* doctrine:schema:create
57-
* messenger:setup-transports
58-
* doctrine:migrations:diff and doctrine:migrations:migrate
59-
*/
60-
$this->assertStringContainsString('BEGIN;', $sql);
6154
$this->assertStringContainsString('CREATE TRIGGER', $sql);
6255

63-
// We MUST NOT commit, that will mess with the PDO in PHP 8
56+
// We MUST NOT use transaction, that will mess with the PDO in PHP 8
57+
$this->assertStringNotContainsString('BEGIN;', $sql);
6458
$this->assertStringNotContainsString('COMMIT;', $sql);
6559
}
6660

‎src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/PostgreSqlConnection.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/PostgreSqlConnection.php
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ public function getExtraSetupSqlForTable(Table $createdTable): array
109109
private function getTriggerSql(): array
110110
{
111111
return [
112-
'BEGIN;',
113-
sprintf('LOCK TABLE %s;', $this->configuration['table_name']),
114112
// create trigger function
115113
sprintf(<<<'SQL'
116114
CREATE OR REPLACE FUNCTION notify_%1$s() RETURNS TRIGGER AS $$

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.