Skip to content

Commit 343afda

Browse files
authored
Merge pull request doctrine#10971 from greg0ire/restore-prefer-lowest
Restore job with --prefer-lowest
2 parents e71868f + 2700998 commit 343afda

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
- "pdo_sqlite"
4242
proxy:
4343
- "common"
44+
deps:
45+
- "highest"
4446
include:
4547
- php-version: "8.2"
4648
dbal-version: "3@dev"
@@ -55,6 +57,10 @@ jobs:
5557
dbal-version: "default"
5658
proxy: "lazy-ghost"
5759
extension: "pdo_sqlite"
60+
- php-version: "8.1"
61+
dbal-version: "default"
62+
deps: "lowest"
63+
extension: "pdo_sqlite"
5864

5965
steps:
6066
- name: "Checkout"
@@ -78,6 +84,7 @@ jobs:
7884
uses: "ramsey/composer-install@v2"
7985
with:
8086
composer-options: "--ignore-platform-req=php+"
87+
dependency-versions: "${{ matrix.deps }}"
8188

8289
- name: "Run PHPUnit"
8390
run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage-no-cache.xml"
@@ -314,7 +321,6 @@ jobs:
314321
name: "${{ github.job }}-${{ matrix.mysql-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage"
315322
path: "coverage*.xml"
316323

317-
318324
upload_coverage:
319325
name: "Upload coverage to Codecov"
320326
runs-on: "ubuntu-22.04"

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
"doctrine/coding-standard": "^12.0",
4040
"phpbench/phpbench": "^1.0",
4141
"phpstan/phpstan": "1.10.35",
42-
"phpunit/phpunit": "^10.0.14",
42+
"phpunit/phpunit": "^10.4.0",
4343
"psr/log": "^1 || ^2 || ^3",
4444
"squizlabs/php_codesniffer": "3.7.2",
4545
"symfony/cache": "^5.4 || ^6.2",
46-
"symfony/var-exporter": "^5.4 || ^6.2",
46+
"symfony/var-exporter": "^6.2.13",
4747
"vimeo/psalm": "5.15.0"
4848
},
4949
"suggest": {

tests/Doctrine/Tests/ORM/Query/QueryTest.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,11 +514,14 @@ public function testGetParameterColonNormalize(): void
514514

515515
public function testGetQueryCacheDriverWithDefaults(): void
516516
{
517-
$cache = $this->createMock(CacheItemPoolInterface::class);
517+
$cache = $this->createMock(CacheItemPoolInterface::class);
518+
$cacheItemMock = $this->createMock(CacheItemInterface::class);
519+
$cacheItemMock->method('set')->willReturnSelf();
520+
$cacheItemMock->method('expiresAfter')->willReturnSelf();
518521
$cache
519522
->expects(self::atLeastOnce())
520523
->method('getItem')
521-
->willReturn($this->createMock(CacheItemInterface::class));
524+
->willReturn($cacheItemMock);
522525

523526
$this->entityManager->getConfiguration()->setQueryCache($cache);
524527
$this->entityManager
@@ -528,11 +531,14 @@ public function testGetQueryCacheDriverWithDefaults(): void
528531

529532
public function testGetQueryCacheDriverWithCacheExplicitlySet(): void
530533
{
531-
$cache = $this->createMock(CacheItemPoolInterface::class);
534+
$cache = $this->createMock(CacheItemPoolInterface::class);
535+
$cacheItemMock = $this->createMock(CacheItemInterface::class);
536+
$cacheItemMock->method('set')->willReturnSelf();
537+
$cacheItemMock->method('expiresAfter')->willReturnSelf();
532538
$cache
533539
->expects(self::atLeastOnce())
534540
->method('getItem')
535-
->willReturn($this->createMock(CacheItemInterface::class));
541+
->willReturn($cacheItemMock);
536542

537543
$this->entityManager
538544
->createQuery('select u from ' . CmsUser::class . ' u')

0 commit comments

Comments
 (0)