We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon + Doctrine

Is there any phalcon + doctrine tutorial you recommend?

Is anyone already doing this?



3.5k
Accepted
answer

You do not need any special tutorial. Just use Doctrine (ORM and DBAL) as any other service and this is all.

Exactly, but not sure why you want to use slowest orm instead of fastest orm for php.

The point is not just to make querys. I would like to use it because of migration. I'm working with a complex database structure and deploy is getting harder and harder.

Exactly, but not sure why you want to use slowest orm instead of fastest orm for php.

Phalcon ORM implement Active Record pattern. Yes ORM is fast, model's class is simply and it's good but not for all projects. For complicated projects i prefer use Doctrine and Data Mapper pattern.

The point is not just to make querys. I would like to use it because of migration. I'm working with a complex database structure and deploy is getting harder and harder.

Hm, Phalcon have migrations https://docs.phalcon.io/en/latest/reference/migrations.html

If you don't like Phalcon's migrations check Phinx https://phinx.org/ .

edited Nov '17

The point is not just to make querys. I would like to use it because of migration. I'm working with a complex database structure and deploy is getting harder and harder.

Hm, Phalcon have migrations https://docs.phalcon.io/en/latest/reference/migrations.html

If you don't like Phalcon's migrations check Phinx https://phinx.org/ .

A question about migrations in Phalcon.

Let's say that there is a migration on the server, and its id = 3. Two developers work in parallel, and both get different migrations with id = 4. And what should they do?