Skip to content

Commit

Permalink
Merge pull request doctrine#10971 from greg0ire/restore-prefer-lowest
Browse files Browse the repository at this point in the history
Restore job with --prefer-lowest
  • Loading branch information
greg0ire authored Oct 8, 2023
2 parents e71868f + 2700998 commit 343afda
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
- "pdo_sqlite"
proxy:
- "common"
deps:
- "highest"
include:
- php-version: "8.2"
dbal-version: "3@dev"
Expand All @@ -55,6 +57,10 @@ jobs:
dbal-version: "default"
proxy: "lazy-ghost"
extension: "pdo_sqlite"
- php-version: "8.1"
dbal-version: "default"
deps: "lowest"
extension: "pdo_sqlite"

steps:
- name: "Checkout"
Expand All @@ -78,6 +84,7 @@ jobs:
uses: "ramsey/composer-install@v2"
with:
composer-options: "--ignore-platform-req=php+"
dependency-versions: "${{ matrix.deps }}"

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


upload_coverage:
name: "Upload coverage to Codecov"
runs-on: "ubuntu-22.04"
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
"doctrine/coding-standard": "^12.0",
"phpbench/phpbench": "^1.0",
"phpstan/phpstan": "1.10.35",
"phpunit/phpunit": "^10.0.14",
"phpunit/phpunit": "^10.4.0",
"psr/log": "^1 || ^2 || ^3",
"squizlabs/php_codesniffer": "3.7.2",
"symfony/cache": "^5.4 || ^6.2",
"symfony/var-exporter": "^5.4 || ^6.2",
"symfony/var-exporter": "^6.2.13",
"vimeo/psalm": "5.15.0"
},
"suggest": {
Expand Down
14 changes: 10 additions & 4 deletions tests/Doctrine/Tests/ORM/Query/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,11 +514,14 @@ public function testGetParameterColonNormalize(): void

public function testGetQueryCacheDriverWithDefaults(): void
{
$cache = $this->createMock(CacheItemPoolInterface::class);
$cache = $this->createMock(CacheItemPoolInterface::class);
$cacheItemMock = $this->createMock(CacheItemInterface::class);
$cacheItemMock->method('set')->willReturnSelf();
$cacheItemMock->method('expiresAfter')->willReturnSelf();
$cache
->expects(self::atLeastOnce())
->method('getItem')
->willReturn($this->createMock(CacheItemInterface::class));
->willReturn($cacheItemMock);

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

public function testGetQueryCacheDriverWithCacheExplicitlySet(): void
{
$cache = $this->createMock(CacheItemPoolInterface::class);
$cache = $this->createMock(CacheItemPoolInterface::class);
$cacheItemMock = $this->createMock(CacheItemInterface::class);
$cacheItemMock->method('set')->willReturnSelf();
$cacheItemMock->method('expiresAfter')->willReturnSelf();
$cache
->expects(self::atLeastOnce())
->method('getItem')
->willReturn($this->createMock(CacheItemInterface::class));
->willReturn($cacheItemMock);

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

0 comments on commit 343afda

Please sign in to comment.