Skip to content

Commit

Permalink
Merge branch '5.4' into 6.2
Browse files Browse the repository at this point in the history
* 5.4:
  [DependencyInjection] Skip errored definitions deep-referenced as runtime exceptions
  [Messenger] Preserve existing Doctrine schema
  [HttpClient] Explicitly exclude CURLOPT_POSTREDIR
  • Loading branch information
nicolas-grekas committed Jun 24, 2023
2 parents 1d86964 + ed4055b commit 20e2169
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
3 changes: 1 addition & 2 deletions Store/DoctrineDbalPostgreSqlStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory;
use Doctrine\DBAL\Tools\DsnParser;
use Doctrine\ORM\ORMSetup;
use Symfony\Component\Lock\BlockingSharedLockStoreInterface;
use Symfony\Component\Lock\BlockingStoreInterface;
use Symfony\Component\Lock\Exception\InvalidArgumentException;
Expand Down Expand Up @@ -69,7 +68,7 @@ public function __construct(Connection|string $connOrUrl)
$params = ['url' => $this->filterDsn($connOrUrl)];
}

$config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration() : new Configuration();
$config = new Configuration();
if (class_exists(DefaultSchemaManagerFactory::class)) {
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
}
Expand Down
3 changes: 1 addition & 2 deletions Store/DoctrineDbalStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Tools\DsnParser;
use Doctrine\ORM\ORMSetup;
use Symfony\Component\Lock\Exception\InvalidArgumentException;
use Symfony\Component\Lock\Exception\InvalidTtlException;
use Symfony\Component\Lock\Exception\LockConflictedException;
Expand Down Expand Up @@ -88,7 +87,7 @@ public function __construct(Connection|string $connOrUrl, array $options = [], f
$params = ['url' => $connOrUrl];
}

$config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration() : new Configuration();
$config = new Configuration();
if (class_exists(DefaultSchemaManagerFactory::class)) {
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
}
Expand Down
3 changes: 1 addition & 2 deletions Tests/Store/DoctrineDbalPostgreSqlStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Doctrine\DBAL\Exception as DBALException;
use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory;
use Doctrine\DBAL\Tools\DsnParser;
use Doctrine\ORM\ORMSetup;
use Symfony\Component\Lock\Exception\InvalidArgumentException;
use Symfony\Component\Lock\Exception\LockConflictedException;
use Symfony\Component\Lock\Key;
Expand Down Expand Up @@ -173,7 +172,7 @@ public function testWaitAndSaveReadAfterConflictReleasesLockFromInternalStore()
private static function getDbalConnection(string $dsn): Connection
{
$params = class_exists(DsnParser::class) ? (new DsnParser(['sqlite' => 'pdo_sqlite']))->parse($dsn) : ['url' => $dsn];
$config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration();
$config = new Configuration();
if (class_exists(DefaultSchemaManagerFactory::class)) {
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
}
Expand Down
5 changes: 2 additions & 3 deletions Tests/Store/DoctrineDbalStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Doctrine\DBAL\Exception\TableNotFoundException;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory;
use Doctrine\ORM\ORMSetup;
use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\PersistingStoreInterface;
use Symfony\Component\Lock\Store\DoctrineDbalStore;
Expand All @@ -39,7 +38,7 @@ public static function setUpBeforeClass(): void
{
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock');

$config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration();
$config = new Configuration();
if (class_exists(DefaultSchemaManagerFactory::class)) {
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
}
Expand All @@ -60,7 +59,7 @@ protected function getClockDelay()

public function getStore(): PersistingStoreInterface
{
$config = class_exists(ORMSetup::class) ? ORMSetup::createConfiguration(true) : new Configuration();
$config = new Configuration();
if (class_exists(DefaultSchemaManagerFactory::class)) {
$config->setSchemaManagerFactory(new DefaultSchemaManagerFactory());
}
Expand Down

0 comments on commit 20e2169

Please sign in to comment.