From c65c6ea75de5e950970d8f8ed4981db9f728800a Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Tue, 20 Oct 2020 00:13:18 +0200 Subject: [PATCH] Don't skip Doctrine tests on php 8. --- .../Component/Cache/Tests/Adapter/PdoAdapterTest.php | 5 ----- .../Component/Lock/Tests/Store/PdoDbalStoreTest.php | 5 ----- src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php | 5 ----- .../Tests/Transport/Doctrine/DoctrineIntegrationTest.php | 8 -------- 4 files changed, 23 deletions(-) diff --git a/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php index 9056c84871..dbd93bdd71 100644 --- a/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php +++ b/src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Cache\Tests\Adapter; -use Doctrine\DBAL\Version; use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\Cache\Adapter\PdoAdapter; use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait; @@ -31,10 +30,6 @@ class PdoAdapterTest extends AdapterTestCase self::markTestSkipped('Extension pdo_sqlite required.'); } - if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); $pool = new PdoAdapter('sqlite:'.self::$dbFile); diff --git a/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php index 829e8ec9f7..264c99829c 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Lock\Tests\Store; use Doctrine\DBAL\DriverManager; -use Doctrine\DBAL\Version; use Symfony\Component\Lock\PersistingStoreInterface; use Symfony\Component\Lock\Store\PdoStore; @@ -31,10 +30,6 @@ class PdoDbalStoreTest extends AbstractStoreTest { self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock'); - if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - $store = new PdoStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); $store->createTable(); } diff --git a/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php index f694363045..800397d153 100644 --- a/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php +++ b/src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Lock\Tests\Store; -use Doctrine\DBAL\Version; use Symfony\Component\Lock\Key; use Symfony\Component\Lock\PersistingStoreInterface; use Symfony\Component\Lock\Store\PdoStore; @@ -31,10 +30,6 @@ class PdoStoreTest extends AbstractStoreTest { self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock'); - if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - $store = new PdoStore('sqlite:'.self::$dbFile); $store->createTable(); } diff --git a/src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineIntegrationTest.php b/src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineIntegrationTest.php index b0f8e8f911..e88e003647 100644 --- a/src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineIntegrationTest.php @@ -14,7 +14,6 @@ namespace Symfony\Component\Messenger\Tests\Transport\Doctrine; use Doctrine\DBAL\Driver\Result as DriverResult; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Result; -use Doctrine\DBAL\Version; use PHPUnit\Framework\TestCase; use Symfony\Component\Messenger\Tests\Fixtures\DummyMessage; use Symfony\Component\Messenger\Transport\Doctrine\Connection; @@ -31,13 +30,6 @@ class DoctrineIntegrationTest extends TestCase /** @var string */ private $sqliteFile; - public static function setUpBeforeClass(): void - { - if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) { - self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.'); - } - } - protected function setUp(): void { $this->sqliteFile = sys_get_temp_dir().'/symfony.messenger.sqlite';