This package allows you to define custom schema on top of your ORM model. For instance, creating foreign keys without the need of JoinColumn.
composer require nalgoo/doctrine-custom-schema
$entityManager = EntityManager::create(...);
CustomSchemaListener::register($entityManager);
class Entity
{
/**
* @ORM\Column(name="user_id", type="integer", nullable=false)
* @ForeignKey(refTable="user", refColumn="id", onUpdate="CASCADE", onDelete="CASCADE")
*/
public int $userId;
}