Skip Doctrine DBAL on php 8 until we have a compatible version.

This commit is contained in:
Alexander M. Turek 2020-05-22 09:54:48 +02:00
parent 410b6214ea
commit 1090738264
7 changed files with 39 additions and 1 deletions

View File

@ -61,6 +61,13 @@ class EntityTypeTest extends BaseTypeTest
protected static $supportedFeatureSetVersion = 304;
public static function setUpBeforeClass()
{
if (\PHP_VERSION_ID >= 80000) {
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
}
}
protected function setUp()
{
$this->em = DoctrineTestHelper::createTestEntityManager();

View File

@ -23,6 +23,13 @@ use Symfony\Bridge\Doctrine\Tests\Fixtures\User;
class EntityUserProviderTest extends TestCase
{
public static function setUpBeforeClass()
{
if (\PHP_VERSION_ID >= 80000) {
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
}
}
public function testRefreshUserGetsUserByPrimaryKey()
{
$em = DoctrineTestHelper::createTestEntityManager();

View File

@ -63,6 +63,13 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase
protected $repositoryFactory;
public static function setUpBeforeClass()
{
if (\PHP_VERSION_ID >= 80000) {
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
}
}
protected function setUp()
{
$this->repositoryFactory = new TestRepositoryFactory();

View File

@ -40,6 +40,13 @@ class SetAclCommandTest extends AbstractWebTestCase
const OBJECT_CLASS = 'Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity\Car';
const SECURITY_CLASS = 'Symfony\Component\Security\Core\User\User';
public static function setUpBeforeClass()
{
if (\PHP_VERSION_ID >= 80000) {
self::markTestSkipped('Doctrine DBAL 2.x is incompatible with PHP 8.');
}
}
public function testSetAclUser()
{
$objectId = 1;

View File

@ -12,6 +12,7 @@
namespace Symfony\Component\Cache\Tests\Adapter;
use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Version;
use Symfony\Component\Cache\Adapter\PdoAdapter;
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
@ -30,6 +31,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');
$pool = new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]));

View File

@ -12,6 +12,7 @@
namespace Symfony\Component\Cache\Tests\Simple;
use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Version;
use Symfony\Component\Cache\Simple\PdoCache;
use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait;
@ -30,6 +31,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]));

View File

@ -29,7 +29,7 @@
"require-dev": {
"cache/integration-tests": "dev-master",
"doctrine/cache": "~1.6",
"doctrine/dbal": "~2.4",
"doctrine/dbal": "~2.4|~3.0",
"predis/predis": "~1.0"
},
"conflict": {