Resonance provides integration with Doctrine's DBAL and ORM.

Doctrine integration uses the same database configuration as Swoole database integration.

Under the Hood

The integration is opinionated, so we picked the configuration defaults to best match the Swoole environment.

Those are:

  1. Doctrine uses in-memory local cache. No file cache nor Redis cache is necessary because all the metadata is loaded just once, and Doctrine keeps it in a PHP array.
  2. Doctrine uses only attribute mapping. That is in line with other Resonance's features.
  3. Doctrine integration uses Connection Pools and it does so transparently.

If you just want to make a plain SQL query and you don't need a query builder you might consider using plain Database Queries withtout the overhead of Doctrine.

Edit on GitHub