Closed axlon closed 7 months ago
I just realized Passport's ClientFactory
always points to Passport's version of the client model. If someone were to extend the Client model to adjust the connection (which is what prompted me to create this PR) it makes the client factory unusable.
This PR fixes that issue as well, but long term it probably makes more sense to make ClientFactory
use Passport::clientModel()
to always use the correct model
This PR allows developers to configure Passport's database connection without having to extend all of Passport's models.
This change should be fully backwards compatible because:
$connection
property, that will take precedence over the configgetConnectionName()
method this new logic won't be executed at all