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 5870623
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .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 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 5870623

Please sign in to comment.