See https://www.doctrine-project.org/projects/doctrine-orm/en/3.5/reference/architecture.html#entities "An entity class must not be final" should be updated to take into account the use of lazy objects. It's now possible to have final entity classes.