You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a proposal to change the current implementation of DBCommand to call into the database specific connector classes, instead of relying on a mix of switch statements and dynamic method calls.
Motivation
My team uses Amazon RDS with IAM authentication and the pixelvide/laravel-iam-db-auth package.
However, this only works for the app connections.
For php artisan db, Laravel directly builds the mysql command to execute and, in particular, it relies on the password configuration directly, which means there is no way to generate it.
Benefits
By calling into drivers and letting them handle configuration options, it becomes possible to use authentication mechanisms with short-lived tokens like the IAM auth described above
Allows adding new drivers that support the artisan db command
Improves the design by:
Making the registration mechanism consistent between app connections and artisan db
Improving cohesion because all the code that handles driver specific configuration is in each connector
Decouples the db command implementation from each driver's configuration structure
I'm interested in doing this work myself but would like to avoid creating the PR to then have it shot down.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is a proposal to change the current implementation of
DBCommand
to call into the database specific connector classes, instead of relying on a mix of switch statements and dynamic method calls.Motivation
My team uses Amazon RDS with IAM authentication and the pixelvide/laravel-iam-db-auth package.
However, this only works for the app connections.
For
php artisan db
, Laravel directly builds themysql
command to execute and, in particular, it relies on thepassword
configuration directly, which means there is no way to generate it.Benefits
artisan db
commandartisan db
I'm interested in doing this work myself but would like to avoid creating the PR to then have it shot down.
Beta Was this translation helpful? Give feedback.
All reactions