8000 Don't execute tests with DBAL 2.x on php 8. · symfony/symfony@9a413bd · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a413bd

Browse files
committed
Don't execute tests with DBAL 2.x on php 8.
1 parent a14d8f9 commit 9a413bd

File tree

7 files changed

+33
-1
lines changed

7 files changed

+33
-1
lines changed

src/Symfony/Component/Cache/Tests/Adapter/PdoAdapterTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Cache\Tests\Adapter;
1313

14+
use Doctrine\DBAL\Version;
1415
use Psr\Cache\CacheItemPoolInterface;
1516
use Symfony\Component\Cache\Adapter\PdoAdapter;
1617
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
@@ -30,6 +31,10 @@ public static function setUpBeforeClass(): void
3031
self::markTestSkipped('Extension pdo_sqlite required.');
3132
}
3233

34+
if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) {
35+
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
36+
}
37+
3338
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache');
3439

3540
$pool = new PdoAdapter('sqlite:'.self::$dbFile);

src/Symfony/Component/Cache/Tests/Adapter/PdoDbalAdapterTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Cache\Tests\Adapter;
1313

1414
use Doctrine\DBAL\DriverManager;
15+
use Doctrine\DBAL\Version;
1516
use Psr\Cache\CacheItemPoolInterface;
1617
use Symfony\Component\Cache\Adapter\PdoAdapter;
1718
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
@@ -31,6 +32,10 @@ public static function setUpBeforeClass(): void
3132
self::markTestSkipped('Extension pdo_sqlite required.');
3233
}
3334

35+
if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) {
36+
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
37+
}
38+
3439
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache');
3540
}
3641

src/Symfony/Component/Cache/Tests/Simple/PdoDbalCacheTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Cache\Tests\Simple;
1313

1414
use Doctrine\DBAL\DriverManager;
15+
use Doctrine\DBAL\Version;
1516
use Psr\SimpleCache\CacheInterface;
1617
use Symfony\Component\Cache\Simple\PdoCache;
1718
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
@@ -32,6 +33,10 @@ public static function setUpBeforeClass(): void
3233
self::markTestSkipped('Extension pdo_sqlite required.');
3334
}
3435

36+
if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) {
37+
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
38+
}
39+
3540
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache');
3641

3742
$pool = new PdoCache(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]));

src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php

Lines changed: 5 additions & 0 deletions
6D40
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Lock\Tests\Store;
1313

1414
use Doctrine\DBAL\DriverManager;
15+
use Doctrine\DBAL\Version;
1516
use Symfony\Component\Lock\PersistingStoreInterface;
1617
use Symfony\Component\Lock\Store\PdoStore;
1718

@@ -30,6 +31,10 @@ public static function setUpBeforeClass(): void
3031
{
3132
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock');
3233

34+
if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) {
35+
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
36+
}
37+
3338
$store = new PdoStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]));
3439
$store->createTable();
3540
}

src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Lock\Tests\Store;
1313

14+
use Doctrine\DBAL\Version;
1415
use Symfony\Component\Lock\Key;
1516
use Symfony\Component\Lock\PersistingStoreInterface;
1617
use Symfony\Component\Lock\Store\PdoStore;
@@ -30,6 +31,10 @@ public static function setUpBeforeClass(): void
3031
{
3132
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock');
3233

34+
if (\PHP_VERSION_ID >= 80000 && class_exists(Version::class)) {
35+
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
36+
}
37+
3338
$store = new PdoStore('sqlite:'.self::$dbFile);
3439
$store->createTable();
3540
}

src/Symfony/Component/Lock/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"psr/log": "~1.0"
2121
},
2222
"require-dev": {
23-
"doctrine/dbal": "~2.5",
23+
"doctrine/dbal": "^2.5|^3.0",
2424
"predis/predis": "~1.0"
2525
},
2626
"conflict": {

src/Symfony/Component/Messenger/Tests/Transport/Doctrine/DoctrineIntegrationTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ class DoctrineIntegrationTest extends TestCase
2828
/** @var string */
2929
private $sqliteFile;
3030

31+
public static function setUpBeforeClass(): void
32+
{
33+
if (\PHP_VERSION_ID >= 80000) {
34+
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
35+
}
36+
}
37+
3138
protected function setUp(): void
3239
{
3340
$this->sqliteFile = sys_get_temp_dir().'/symfony.messenger.sqlite';

0 commit comments

Comments
 (0)
0