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;
|
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Version;
|
||||||
use Psr\Cache\CacheItemPoolInterface;
|
use Psr\Cache\CacheItemPoolInterface;
|
||||||
use Symfony\Component\Cache\Adapter\PdoAdapter;
|
use Symfony\Component\Cache\Adapter\PdoAdapter;
|
||||||
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
|
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
|
||||||
@ -30,6 +31,10 @@ class PdoAdapterTest extends AdapterTestCase
|
|||||||
self::markTestSkipped('Extension pdo_sqlite required.');
|
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');
|
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache');
|
||||||
|
|
||||||
$pool = new PdoAdapter('sqlite:'.self::$dbFile);
|
$pool = new PdoAdapter('sqlite:'.self::$dbFile);
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
namespace Symfony\Component\Cache\Tests\Adapter;
|
namespace Symfony\Component\Cache\Tests\Adapter;
|
||||||
|
|
||||||
use Doctrine\DBAL\DriverManager;
|
use Doctrine\DBAL\DriverManager;
|
||||||
|
use Doctrine\DBAL\Version;
|
||||||
use Psr\Cache\CacheItemPoolInterface;
|
use Psr\Cache\CacheItemPoolInterface;
|
||||||
use Symfony\Component\Cache\Adapter\PdoAdapter;
|
use Symfony\Component\Cache\Adapter\PdoAdapter;
|
||||||
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
|
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
|
||||||
@ -31,6 +32,10 @@ class PdoDbalAdapterTest extends AdapterTestCase
|
|||||||
self::markTestSkipped('Extension pdo_sqlite required.');
|
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');
|
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
namespace Symfony\Component\Cache\Tests\Simple;
|
namespace Symfony\Component\Cache\Tests\Simple;
|
||||||
|
|
||||||
use Doctrine\DBAL\DriverManager;
|
use Doctrine\DBAL\DriverManager;
|
||||||
|
use Doctrine\DBAL\Version;
|
||||||
use Psr\SimpleCache\CacheInterface;
|
use Psr\SimpleCache\CacheInterface;
|
||||||
use Symfony\Component\Cache\Simple\PdoCache;
|
use Symfony\Component\Cache\Simple\PdoCache;
|
||||||
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
|
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
|
||||||
@ -32,6 +33,10 @@ class PdoDbalCacheTest extends CacheTestCase
|
|||||||
self::markTestSkipped('Extension pdo_sqlite required.');
|
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');
|
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache');
|
||||||
|
|
||||||
$pool = new PdoCache(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]));
|
$pool = new PdoCache(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]));
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
namespace Symfony\Component\Lock\Tests\Store;
|
namespace Symfony\Component\Lock\Tests\Store;
|
||||||
|
|
||||||
use Doctrine\DBAL\DriverManager;
|
use Doctrine\DBAL\DriverManager;
|
||||||
|
use Doctrine\DBAL\Version;
|
||||||
use Symfony\Component\Lock\PersistingStoreInterface;
|
use Symfony\Component\Lock\PersistingStoreInterface;
|
||||||
use Symfony\Component\Lock\Store\PdoStore;
|
use Symfony\Component\Lock\Store\PdoStore;
|
||||||
|
|
||||||
@ -30,6 +31,10 @@ class PdoDbalStoreTest extends AbstractStoreTest
|
|||||||
{
|
{
|
||||||
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock');
|
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 = new PdoStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]));
|
||||||
$store->createTable();
|
$store->createTable();
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Component\Lock\Tests\Store;
|
namespace Symfony\Component\Lock\Tests\Store;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Version;
|
||||||
use Symfony\Component\Lock\Key;
|
use Symfony\Component\Lock\Key;
|
||||||
use Symfony\Component\Lock\PersistingStoreInterface;
|
use Symfony\Component\Lock\PersistingStoreInterface;
|
||||||
use Symfony\Component\Lock\Store\PdoStore;
|
use Symfony\Component\Lock\Store\PdoStore;
|
||||||
@ -30,6 +31,10 @@ class PdoStoreTest extends AbstractStoreTest
|
|||||||
{
|
{
|
||||||
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock');
|
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 = new PdoStore('sqlite:'.self::$dbFile);
|
||||||
$store->createTable();
|
$store->createTable();
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
"psr/log": "~1.0"
|
"psr/log": "~1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/dbal": "~2.5",
|
"doctrine/dbal": "^2.5|^3.0",
|
||||||
"predis/predis": "~1.0"
|
"predis/predis": "~1.0"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
namespace Symfony\Component\Messenger\Tests\Transport\Doctrine;
|
namespace Symfony\Component\Messenger\Tests\Transport\Doctrine;
|
||||||
|
|
||||||
use Doctrine\DBAL\DriverManager;
|
use Doctrine\DBAL\DriverManager;
|
||||||
|
use Doctrine\DBAL\Version;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Symfony\Component\Messenger\Tests\Fixtures\DummyMessage;
|
use Symfony\Component\Messenger\Tests\Fixtures\DummyMessage;
|
||||||
use Symfony\Component\Messenger\Transport\Doctrine\Connection;
|
use Symfony\Component\Messenger\Transport\Doctrine\Connection;
|
||||||
@ -28,6 +29,13 @@ class DoctrineIntegrationTest extends TestCase
|
|||||||
/** @var string */
|
/** @var string */
|
||||||
private $sqliteFile;
|
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
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
$this->sqliteFile = sys_get_temp_dir().'/symfony.messenger.sqlite';
|
$this->sqliteFile = sys_get_temp_dir().'/symfony.messenger.sqlite';
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
"psr/log": "~1.0"
|
"psr/log": "~1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/dbal": "^2.6",
|
"doctrine/dbal": "^2.6|^3.0",
|
||||||
"psr/cache": "~1.0",
|
"psr/cache": "~1.0",
|
||||||
"doctrine/persistence": "^1.3",
|
"doctrine/persistence": "^1.3",
|
||||||
"symfony/console": "^3.4|^4.0|^5.0",
|
"symfony/console": "^3.4|^4.0|^5.0",
|
||||||
|
Reference in New Issue
Block a user