diff --git a/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php b/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php index acef17b62..874050d9b 100644 --- a/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php +++ b/lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadata.php @@ -1845,7 +1845,7 @@ public function getFieldMapping(string $fieldName): array /** * Gets mappings of fields holding embedded document(s). * - * @psalm-return array + * @psalm-return array */ public function getEmbeddedFieldsMappings(): array { diff --git a/psalm-baseline.xml b/psalm-baseline.xml index bc854ae73..fe37bade6 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + @@ -60,14 +60,9 @@ - associationMappings, - static fn ($assoc) => ! empty($assoc['embedded']) - )]]> - ]]> @@ -305,11 +300,6 @@ name])]]> - - - - - diff --git a/tests/Doctrine/ODM/MongoDB/Tests/Mapping/BasicInheritanceMappingTest.php b/tests/Doctrine/ODM/MongoDB/Tests/Mapping/BasicInheritanceMappingTest.php index f4ea08679..832a208fe 100644 --- a/tests/Doctrine/ODM/MongoDB/Tests/Mapping/BasicInheritanceMappingTest.php +++ b/tests/Doctrine/ODM/MongoDB/Tests/Mapping/BasicInheritanceMappingTest.php @@ -8,7 +8,6 @@ use Doctrine\ODM\MongoDB\Mapping\ClassMetadataFactory; use Doctrine\ODM\MongoDB\Mapping\MappingException; use Doctrine\ODM\MongoDB\Tests\BaseTestCase; -use Doctrine\ODM\MongoDB\Tests\Functional\MappedSuperclassRelated1; use function serialize; use function unserialize; @@ -132,6 +131,18 @@ class MappedSuperclassBase private $transient; } +#[ODM\Document] +class MappedSuperclassRelated1 +{ + /** @var int|null */ + #[ODM\Id(strategy: 'none')] + private $id; + + /** @var string|null */ + #[ODM\Field(type: 'string')] + private $name; +} + #[ODM\Document] class DocumentSubClass2 extends MappedSuperclassBase {