Skip to content

Commit 18a3801

Browse files
authored
Merge pull request #651 from greg0ire/fix-build-minimal
Fix build minimal
2 parents 5a08ff8 + 1d04de6 commit 18a3801

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"doctrine/doctrine-bundle": "^2.4 || ^3.0",
2929
"doctrine/migrations": "^3.2",
3030
"symfony/deprecation-contracts": "^2.1 || ^3",
31-
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0 || ^8.0"
31+
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0 || ^8.0",
32+
"symfony/http-kernel": "^5.4 || ^6.0 || ^7.0"
3233
},
3334
"require-dev": {
3435
"composer/semver": "^3.0",

phpstan-baseline.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,3 @@ parameters:
1111
identifier: class.notFound
1212
count: 2
1313
path: src/MigrationsFactory/ContainerAwareMigrationFactory.php
14-
15-
-
16-
message: '#^Comparison operation "\<" between int\<50207, 80399\> and 80400 is always true\.$#'
17-
identifier: smaller.alwaysTrue
18-
count: 1
19-
path: tests/DependencyInjection/DoctrineMigrationsExtensionTest.php

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
/** @final */
2323
class Configuration implements ConfigurationInterface
2424
{
25+
/** @return TreeBuilder<'array'> */
2526
public function getConfigTreeBuilder(): TreeBuilder
2627
{
2728
$treeBuilder = new TreeBuilder('doctrine_migrations');

tests/DependencyInjection/DoctrineMigrationsExtensionTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Composer\Semver\VersionParser;
99
use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\CacheCompatibilityPass;
1010
use Doctrine\Bundle\DoctrineBundle\DependencyInjection\DoctrineExtension;
11+
use Doctrine\Bundle\DoctrineBundle\Mapping\DisconnectedMetadataFactory;
1112
use Doctrine\Bundle\DoctrineBundle\Registry;
1213
use Doctrine\Bundle\MigrationsBundle\DependencyInjection\CompilerPass\RegisterMigrationsPass;
1314
use Doctrine\Bundle\MigrationsBundle\DependencyInjection\DoctrineMigrationsExtension;
@@ -304,7 +305,7 @@ public function testPrefersEntityManagerOverConnection(): void
304305
$ormConfig['controller_resolver'] = ['auto_mapping' => false];
305306
}
306307

307-
if (PHP_VERSION_ID >= 80400) {
308+
if (PHP_VERSION_ID >= 80400 && class_exists(DisconnectedMetadataFactory::class)) {
308309
$ormConfig['enable_native_lazy_objects'] = true;
309310
}
310311

@@ -376,7 +377,7 @@ public function testCustomEntityManager(): void
376377
$ormConfig['controller_resolver'] = ['auto_mapping' => false];
377378
}
378379

379-
if (PHP_VERSION_ID >= 80400) {
380+
if (PHP_VERSION_ID >= 80400 && class_exists(DisconnectedMetadataFactory::class)) {
380381
$ormConfig['enable_native_lazy_objects'] = true;
381382
} elseif (PHP_VERSION_ID < 80400 && trait_exists(LazyGhostTrait::class) && class_exists(CacheCompatibilityPass::class)) {
382383
// For PHP 8.0 and 8.1 we need to check for the interface as the trait is only used when the interface exists

0 commit comments

Comments
 (0)