Установка Доктрин

Composer Список

composer require symfony/orm-pack
composer require --dev symfony/maker-bundle
composer require --dev doctrine/doctrine-fixtures-bundle
composer require symfony/apache-pack
composer require annotations
composer require symfony/twig-bundle
composer require symfony/debug
composer require symfony/profiler-pack

Документация

https://symfony.com/doc/current/setup/web_server_configuration.html
https://symfony.com/doc/current/doctrine.html

Как работает Lifecycle Callbacks в Doctrine
Создание сущность в доктрине
Советую почитать