Skip to content

Commit

Permalink
Test on lowest dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgarlag committed Mar 12, 2024
1 parent 8017e2b commit 439eb27
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ jobs:
doctrine-orm: ['^2.14', '^3.0']
composer-flags: ['--prefer-stable']
can-fail: [false]
include:
- php: "8.1"
symfony: "5.4.*"
doctrine-orm: "^2.14"
composer-flags: '--prefer-stable --prefer-lowest'
can-fail: false
exclude:
- php: "8.1"
symfony: "7.0.*"
Expand All @@ -36,7 +42,7 @@ jobs:
run: "dev/bin/docker-compose build --build-arg PHP_VERSION=${{ matrix.php }} --build-arg XDEBUG_VERSION='3.3.1' php"

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

- name: "install dependencies"
run: "dev/bin/php composer update --ansi ${{ matrix.composer-flags }}"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"require": {
"php": "^8.1",
"doctrine/doctrine-bundle": "^2.0.8",
"doctrine/doctrine-bundle": "^2.8.0",
"doctrine/orm": "^2.14|^3.0",
"league/oauth2-server": "^8.3",
"nyholm/psr7": "^1.4",
Expand Down
6 changes: 2 additions & 4 deletions tests/TestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace League\Bundle\OAuth2ServerBundle\Tests;

use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\ORM\Configuration as OrmConfiguration;
use Doctrine\ORM\Mapping\Annotation;
use League\Bundle\OAuth2ServerBundle\Manager\AccessTokenManagerInterface;
use League\Bundle\OAuth2ServerBundle\Manager\AuthorizationCodeManagerInterface;
use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface;
Expand Down Expand Up @@ -80,9 +80,7 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
],
];

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

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

Expand Down

0 comments on commit 439eb27

Please sign in to comment.