diff --git a/Resources/config/schema/doctrine-1.0.xsd b/Resources/config/schema/doctrine-1.0.xsd index 74ee16b6c..62da80718 100644 --- a/Resources/config/schema/doctrine-1.0.xsd +++ b/Resources/config/schema/doctrine-1.0.xsd @@ -147,6 +147,7 @@ + diff --git a/Tests/DependencyInjection/Compiler/IdGeneratorPassTest.php b/Tests/DependencyInjection/Compiler/IdGeneratorPassTest.php index 2220919c1..83ccdb317 100644 --- a/Tests/DependencyInjection/Compiler/IdGeneratorPassTest.php +++ b/Tests/DependencyInjection/Compiler/IdGeneratorPassTest.php @@ -95,7 +95,8 @@ public function testRepositoryServiceWiring(): void 'annotations' => [ 'enabled' => class_exists(AnnotationReader::class) && Kernel::VERSION_ID < 64000, ], - ], + 'php_errors' => ['log' => true], + ] + (Kernel::VERSION_ID >= 62000 ? ['handle_all_throwables' => true] : []), ], $container); $extension = new DoctrineExtension(); @@ -107,7 +108,10 @@ public function testRepositoryServiceWiring(): void 'charset' => 'UTF8', 'schema_manager_factory' => 'doctrine.dbal.default_schema_manager_factory', ], - 'orm' => ['mappings' => $mappings, 'report_fields_where_declared' => true], + 'orm' => [ + 'mappings' => $mappings, + 'report_fields_where_declared' => true, + ], ], ], $container); diff --git a/Tests/DependencyInjection/Fixtures/TestKernel.php b/Tests/DependencyInjection/Fixtures/TestKernel.php index 3e48c4980..84b632c03 100644 --- a/Tests/DependencyInjection/Fixtures/TestKernel.php +++ b/Tests/DependencyInjection/Fixtures/TestKernel.php @@ -42,11 +42,9 @@ public function registerContainerConfiguration(LoaderInterface $loader): void $container->loadFromExtension('framework', [ 'secret' => 'F00', 'http_method_override' => false, - 'annotations' => [ - 'enabled' => class_exists(Annotation::class) && Kernel::VERSION_ID <= 64000, - ], - ]); - + 'annotations' => class_exists(Annotation::class) && Kernel::VERSION_ID <= 64000, + 'php_errors' => ['log' => true], + ] + (Kernel::VERSION_ID >= 62000 ? ['handle_all_throwables' => true] : [])); $container->loadFromExtension('doctrine', [ 'dbal' => [ 'driver' => 'pdo_sqlite', diff --git a/Tests/LockStoreSchemaListenerTest.php b/Tests/LockStoreSchemaListenerTest.php index 8e026e26d..b8e2989fd 100644 --- a/Tests/LockStoreSchemaListenerTest.php +++ b/Tests/LockStoreSchemaListenerTest.php @@ -9,6 +9,7 @@ use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Component\HttpKernel\Kernel; use function class_exists; use function interface_exists; @@ -51,7 +52,13 @@ public function testLockStoreSchemaSubscriberWiring(array $config, int $expected $extension = new FrameworkExtension(); $container->registerExtension($extension); - $extension->load(['framework' => ['http_method_override' => false] + $config], $container); + $extension->load( + [ + 'framework' => ['http_method_override' => false, 'php_errors' => ['log' => true]] + + (Kernel::VERSION_ID >= 62000 ? ['handle_all_throwables' => true] : []) + $config, + ], + $container + ); $extension = new DoctrineExtension(); $container->registerExtension($extension); diff --git a/Tests/ServiceRepositoryTest.php b/Tests/ServiceRepositoryTest.php index 3796d370e..f359c0d45 100644 --- a/Tests/ServiceRepositoryTest.php +++ b/Tests/ServiceRepositoryTest.php @@ -72,10 +72,11 @@ public function testRepositoryServiceWiring(): void $extension->load([ 'framework' => [ 'http_method_override' => false, + 'php_errors' => ['log' => true], 'annotations' => [ 'enabled' => class_exists(AnnotationReader::class) && Kernel::VERSION_ID < 64000, ], - ], + ] + (Kernel::VERSION_ID >= 62000 ? ['handle_all_throwables' => true] : []), ], $container); $extension = new DoctrineExtension(); @@ -102,7 +103,7 @@ public function testRepositoryServiceWiring(): void $def = $container->register(TestCustomServiceRepoRepository::class, TestCustomServiceRepoRepository::class) ->setPublic(false); - // create a public alias so we can use it below for testing + // create a public alias, so we can use it below for testing $container->setAlias('test_alias__' . TestCustomServiceRepoRepository::class, new Alias(TestCustomServiceRepoRepository::class, true)); $def->setAutowired(true); diff --git a/Tests/baseline-ignore b/Tests/baseline-ignore new file mode 100644 index 000000000..c20ab3ad2 --- /dev/null +++ b/Tests/baseline-ignore @@ -0,0 +1 @@ +%Not enabling lazy ghost objects is deprecated and will not be supported in Doctrine ORM 3% \ No newline at end of file diff --git a/composer.json b/composer.json index cfcbc4c2d..a6db4269e 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,7 @@ "doctrine/annotations": "^1 || ^2", "doctrine/coding-standard": "^9.0", "doctrine/deprecations": "^1.0", - "doctrine/orm": "^2.11 || ^3.0", + "doctrine/orm": "^2.14 || ^3.0", "friendsofphp/proxy-manager-lts": "^1.0", "phpunit/phpunit": "^9.5.26 || ^10.0", "psalm/plugin-phpunit": "^0.18.4", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e48328406..59a8f7c96 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -7,6 +7,10 @@ + + + + .