[Messenger] Disable the SchemaAssetsFilter when setup the transport
This commit is contained in:
parent
a423badbe5
commit
8cbb8f89ad
@ -108,7 +108,10 @@ class ConnectionTest extends TestCase
|
||||
$platform = $this->getMockBuilder(AbstractPlatform::class)
|
||||
->getMock();
|
||||
$platform->method('getWriteLockSQL')->willReturn('FOR UPDATE');
|
||||
$configuration = $this->getMockBuilder(\Doctrine\DBAL\Configuration::class)
|
||||
->getMock();
|
||||
$driverConnection->method('getDatabasePlatform')->willReturn($platform);
|
||||
$driverConnection->method('getConfiguration')->willReturn($configuration);
|
||||
|
||||
return $driverConnection;
|
||||
}
|
||||
|
@ -197,7 +197,25 @@ class Connection
|
||||
|
||||
public function setup(): void
|
||||
{
|
||||
$configuration = $this->driverConnection->getConfiguration();
|
||||
// Since Doctrine 2.9 the getFilterSchemaAssetsExpression is deprecated
|
||||
$hasFilterCallback = method_exists($configuration, 'getSchemaAssetsFilter');
|
||||
|
||||
if ($hasFilterCallback) {
|
||||
$assetFilter = $this->driverConnection->getConfiguration()->getSchemaAssetsFilter();
|
||||
$this->driverConnection->getConfiguration()->setSchemaAssetsFilter(null);
|
||||
} else {
|
||||
$assetFilter = $this->driverConnection->getConfiguration()->getFilterSchemaAssetsExpression();
|
||||
$this->driverConnection->getConfiguration()->setFilterSchemaAssetsExpression(null);
|
||||
}
|
||||
|
||||
$this->schemaSynchronizer->updateSchema($this->getSchema(), true);
|
||||
|
||||
if ($hasFilterCallback) {
|
||||
$this->driverConnection->getConfiguration()->setSchemaAssetsFilter($assetFilter);
|
||||
} else {
|
||||
$this->driverConnection->getConfiguration()->setFilterSchemaAssetsExpression($assetFilter);
|
||||
}
|
||||
}
|
||||
|
||||
public function getMessageCount(): int
|
||||
|
Reference in New Issue
Block a user