From 843bff497104574e238cf417254c06f271cf5e1c Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Thu, 26 Jan 2023 19:04:57 +0100 Subject: [PATCH] Fix some tests that were missed in #10431 (#10464) In #10431, some invalid inheritance declarations in our test base were fixed. However, the change missed to update XML, PHP and static PHP mapping configurations as well. Apparently, this did not raise any flags because the misconfiguration only caused a deprecation notice in 2.15.x. Running the tests against 3.0 (where the misconfiguration will be an error) unveiled the mistake. --- tests/Doctrine/Tests/Models/DDC5934/DDC5934BaseContract.php | 2 ++ .../php/Doctrine.Tests.Models.DDC5934.DDC5934BaseContract.php | 2 ++ .../Doctrine.Tests.Models.DDC5934.DDC5934BaseContract.dcm.xml | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Doctrine/Tests/Models/DDC5934/DDC5934BaseContract.php b/tests/Doctrine/Tests/Models/DDC5934/DDC5934BaseContract.php index 13f7fda9e24..0e06ab575ab 100644 --- a/tests/Doctrine/Tests/Models/DDC5934/DDC5934BaseContract.php +++ b/tests/Doctrine/Tests/Models/DDC5934/DDC5934BaseContract.php @@ -42,6 +42,8 @@ public function __construct() public static function loadMetadata(ClassMetadata $metadata): void { + $metadata->isMappedSuperclass = true; + $metadata->mapField([ 'id' => true, 'fieldName' => 'id', diff --git a/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.Models.DDC5934.DDC5934BaseContract.php b/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.Models.DDC5934.DDC5934BaseContract.php index 3680a69a4a5..0fda161ca2e 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.Models.DDC5934.DDC5934BaseContract.php +++ b/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.Models.DDC5934.DDC5934BaseContract.php @@ -4,6 +4,8 @@ use Doctrine\ORM\Mapping\ClassMetadata; +$metadata->isMappedSuperclass = true; + $metadata->mapField([ 'id' => true, 'fieldName' => 'id', diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC5934.DDC5934BaseContract.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC5934.DDC5934BaseContract.dcm.xml index 07809813177..f0bf0ebf4fa 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC5934.DDC5934BaseContract.dcm.xml +++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.Models.DDC5934.DDC5934BaseContract.dcm.xml @@ -4,12 +4,12 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + - +