Skip to content

Commit 439eb27

Browse files
committed
Test on lowest dependencies
1 parent 8017e2b commit 439eb27

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/unit-tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ jobs:
1919
doctrine-orm: ['^2.14', '^3.0']
2020
composer-flags: ['--prefer-stable']
2121
can-fail: [false]
22+
include:
23+
- php: "8.1"
24+
symfony: "5.4.*"
25+
doctrine-orm: "^2.14"
26+
composer-flags: '--prefer-stable --prefer-lowest'
27+
can-fail: false
2228
exclude:
2329
- php: "8.1"
2430
symfony: "7.0.*"
@@ -36,7 +42,7 @@ jobs:
3642
run: "dev/bin/docker-compose build --build-arg PHP_VERSION=${{ matrix.php }} --build-arg XDEBUG_VERSION='3.3.1' php"
3743

3844
- name: "require specific Doctrine ORM version"
39-
run: "dev/bin/php composer require --ansi ${{ matrix.composer-flags }} doctrine/orm:${{ matrix.doctrine-orm }}"
45+
run: "dev/bin/php composer require --ansi ${{ matrix.composer-flags }} --no-install doctrine/orm:${{ matrix.doctrine-orm }}"
4046

4147
- name: "install dependencies"
4248
run: "dev/bin/php composer update --ansi ${{ matrix.composer-flags }}"

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"require": {
1919
"php": "^8.1",
20-
"doctrine/doctrine-bundle": "^2.0.8",
20+
"doctrine/doctrine-bundle": "^2.8.0",
2121
"doctrine/orm": "^2.14|^3.0",
2222
"league/oauth2-server": "^8.3",
2323
"nyholm/psr7": "^1.4",

tests/TestKernel.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace League\Bundle\OAuth2ServerBundle\Tests;
66

77
use Doctrine\DBAL\Platforms\SqlitePlatform;
8-
use Doctrine\ORM\Configuration as OrmConfiguration;
8+
use Doctrine\ORM\Mapping\Annotation;
99
use League\Bundle\OAuth2ServerBundle\Manager\AccessTokenManagerInterface;
1010
use League\Bundle\OAuth2ServerBundle\Manager\AuthorizationCodeManagerInterface;
1111
use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface;
@@ -80,9 +80,7 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
8080
],
8181
];
8282

83-
if (method_exists(OrmConfiguration::class, 'setLazyGhostObjectEnabled')) {
84-
$doctrine['orm'] = ['enable_lazy_ghost_objects' => true];
85-
}
83+
$doctrine['orm'] = ['enable_lazy_ghost_objects' => !interface_exists(Annotation::class)];
8684

8785
$container->loadFromExtension('doctrine', $doctrine);
8886

0 commit comments

Comments
 (0)