Don't execute tests with DBAL 2.x on php 8.
This commit is contained in:
parent
a14d8f9da4
commit
7dc3f9cb42
@ -11,6 +11,7 @@
|
||||
|
||||
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;
|
||||
@ -30,6 +31,10 @@ 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);
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||
|
||||
use Doctrine\DBAL\DriverManager;
|
||||
use Doctrine\DBAL\Version;
|
||||
use Psr\Cache\CacheItemPoolInterface;
|
||||
use Symfony\Component\Cache\Adapter\PdoAdapter;
|
||||
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
|
||||
@ -31,6 +32,10 @@ class PdoDbalAdapterTest 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');
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Component\Cache\Tests\Simple;
|
||||
|
||||
use Doctrine\DBAL\DriverManager;
|
||||
use Doctrine\DBAL\Version;
|
||||
use Psr\SimpleCache\CacheInterface;
|
||||
use Symfony\Component\Cache\Simple\PdoCache;
|
||||
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
|
||||
@ -32,6 +33,10 @@ class PdoDbalCacheTest extends CacheTestCase
|
||||
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 PdoCache(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]));
|
||||
|
@ -12,6 +12,7 @@
|
||||
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;
|
||||
|
||||
@ -30,6 +31,10 @@ 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();
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
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;
|
||||
@ -30,6 +31,10 @@ 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();
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
"psr/log": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/dbal": "~2.5",
|
||||
"doctrine/dbal": "^2.5|^3.0",
|
||||
"predis/predis": "~1.0"
|
||||
},
|
||||
"conflict": {
|
||||
|
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Component\Messenger\Tests\Transport\Doctrine;
|
||||
|
||||
use Doctrine\DBAL\DriverManager;
|
||||
use Doctrine\DBAL\Version;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Messenger\Tests\Fixtures\DummyMessage;
|
||||
use Symfony\Component\Messenger\Transport\Doctrine\Connection;
|
||||
@ -28,6 +29,13 @@ 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';
|
||||
|
@ -20,7 +20,7 @@
|
||||
"psr/log": "~1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/dbal": "^2.6",
|
||||
"doctrine/dbal": "^2.6|^3.0",
|
||||
"psr/cache": "~1.0",
|
||||
"doctrine/persistence": "^1.3",
|
||||
"symfony/console": "^3.4|^4.0|^5.0",
|
||||
|
Reference in New Issue
Block a user