Q
Q
Qwyu_4iLofK2021-10-19 21:46:23
Yii
Qwyu_4iLofK, 2021-10-19 21:46:23

What is better to use doctrine, ActiveRecord and Migrations in yii2?

Good day!
I understand that doctrine (composer require doctrine/orm , composer require doctrine/migrations)
or activeRecord are the same thing.
1) The question is what is better to use in yii2, and why? Everywhere they write that the doctrine is better.

2) It is not clear to me how to prescribe the doctrine module in the config. (they write it in /app/config/web.php ), we write the entities in the model, I need info on connecting the doctrine to yii2, there is little information about this on the net? I saw here the info about the doctrine in yii2, but I don’t see about connecting the doctrine in yii2.

3) Is it possible to first write an entity based on doctrine or activeRecord, and then apply migrations accordingly (from doctrine or standard migrations from yii2, to remember what you changed in the database.).

the purpose of using the framework is to use rest requests for a third-party service.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question