Skip to content

Commit

Permalink
Fix some tests that were missed in #10431 (#10464)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mpdude authored Jan 26, 2023
1 parent d679292 commit 843bff4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tests/Doctrine/Tests/Models/DDC5934/DDC5934BaseContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public function __construct()

public static function loadMetadata(ClassMetadata $metadata): void
{
$metadata->isMappedSuperclass = true;

$metadata->mapField([
'id' => true,
'fieldName' => 'id',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use Doctrine\ORM\Mapping\ClassMetadata;

$metadata->isMappedSuperclass = true;

$metadata->mapField([
'id' => true,
'fieldName' => 'id',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
https://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd">

<entity name="Doctrine\Tests\Models\DDC5934\DDC5934BaseContract">
<mapped-superclass name="Doctrine\Tests\Models\DDC5934\DDC5934BaseContract">
<id name="id" type="integer">
<generator strategy="AUTO" />
</id>

<many-to-many target-entity="DDC5934Member" inversed-by="contract" fetch="LAZY" field="members" />
</entity>
</mapped-superclass>

</doctrine-mapping>

0 comments on commit 843bff4

Please sign in to comment.