hailong/enhanced-masterslaveconnection

Add common enhancements to the Doctrine default MasterSlaveConnection implementation.

1.1 2019-11-26 21:37 UTC

This package is auto-updated.

Last update: 2025-05-27 10:51:44 UTC


README

Add common enhancements to the Doctrine default MasterSlaveConnection implementation.

Enhancements

  • Force all the SELECT queries go to slave databases.

  • Use a better random function random_int to balance the load among slave databases.

Adoption in Symfony Application

Install the package and assign this enhanced version of MasterSlaveConnection to the wrapper_class property of doctrine configuration.