hailong / enhanced-masterslaveconnection
Add common enhancements to the Doctrine default MasterSlaveConnection implementation.
Package info
github.com/Hailong/enhanced-masterslaveconnection
pkg:composer/hailong/enhanced-masterslaveconnection
1.1
2019-11-26 21:37 UTC
Requires
- doctrine/dbal: ^2.5
This package is auto-updated.
Last update: 2026-02-27 12:39:51 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_intto 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.