The target-entity "some entity" cannot be found
In our case, the file name was not the same as the class name: it was just a typo.
Your entity declaration is incorrect:
* @ORM\ManyToOne(targetEntity="Entity\User", inversedBy="subjects")
This should be either this:
* @ORM\ManyToOne(targetEntity="Subject\Entity\User", inversedBy="subjects")
Or, since the two classes share the same namespace, you can also use this:
* @ORM\ManyToOne(targetEntity="User", inversedBy="subjects")
The targetEntity
has to be the fully qualified class name (FQCN), except if referring to a class in the same namespace, in which case the short name may be used (as per the last example above).