A very typical error if you work with Doctrine is the following one:
Unable to create a proxy for a final class "App\Module\Aaa\Domain\Aaa."
Doctrine it uses reflection to hydrate the entities, this force us to not protect the classes with
I personally have configured PHPStorm to add
final in any new class I create to force myself to just open for extension a class if I really want that. This makes me face this error very often if I forget to remote this final which would make totally sense being an entity.
So remember to not add final for entities that Doctrine needs to hydrate.