Skip to content

Commit b0dbd4c

Browse files
Merge branch '5.0' into 5.1
* 5.0: Parse and render anonymous classes correctly on php 8 Enable APCu for the php 8 build. [Process] Fix failing test on php 8. [HttpKernel] fix test Make PHP 8 green on Travis Revert "[Cache] allow DBAL v3" [PropertyAccessor] Added missing property path on php 8. Don't execute tests with DBAL 2.x on php 8.
2 parents fea5f3a + b211159 commit b0dbd4c

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Tests/Store/PdoDbalStoreTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Doctrine\DBAL\Connection;
1515
use Doctrine\DBAL\DriverManager;
1616
use Doctrine\DBAL\Schema\Schema;
17+
use Doctrine\DBAL\Version;
1718
use Symfony\Component\Lock\PersistingStoreInterface;
1819
use Symfony\Component\Lock\Store\PdoStore;
1920

@@ -32,6 +33,10 @@ public static function setUpBeforeClass(): void
3233
{
3334
self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_lock');
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
$store = new PdoStore(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]));
3641
$store->createTable();
3742
}

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
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"symfony/polyfill-php80": "^1.15"
2222
},
2323
"require-dev": {
24-
"doctrine/dbal": "~2.5",
24+
"doctrine/dbal": "^2.5|^3.0",
2525
"mongodb/mongodb": "~1.1",
2626
"predis/predis": "~1.0"
2727
},

0 commit comments

Comments
 (0)