Skip to content

Class "xxx" is not a valid entity or mapped super class #2166

@renjinsk

Description

@renjinsk

Bug Report

Q A
Version 2.18.1
Previous Version if the bug is a regression 2.18.0

Summary

If a class has an annotation @MappedSuperclass Symfony throws the following error
Class "xxx\yyy\zzz" is not a valid entity or mapped super class.

Current behavior

Throws exception Class "XXX" is not a valid entity or mapped super class

Expected behavior

Not throw the error.

How to reproduce

Create a class and annotate it with @MappedSuperclass like the following

<?php

namespace xxx\yyy\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @package xxx\yyy\Entity
 * @ORM\MappedSuperclass(repositoryClass="xxx\yyy\Repository\SomeClass")
 */
class SomeClass
{

}

I think the change in this PR #2115 has broken the detection of MappedSuperclass annotations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions