"sessionVars" config are ignored
josecl opened this issue · comments
Summary of problem or feature request
The configuration defined under oracle.sessionVars
is ignored.
Code snippet of problem
The problem is coming from the Oci8ServiceProvider
class: https://github.com/yajra/laravel-oci8/blob/b901e0a2e86a4c0fbc6b54454986a75a8e1f61db/src/Oci8/Oci8ServiceProvider.php#L68C36-L68C36
The sessionVars are currently read from here:
$sessionVars = config('database.connections.sessionVars', $defaultSessionVars);
But, I think they sould be read from:
$sessionVars = config('database.connections.oracle.sessionVars', $defaultSessionVars);
The issue is related with this pull request: #793
System details
- Operating System: Rocky 9.3
- PHP Version: 8.2.12
- Laravel Version: 10.33.0
- Laravel-OCI8 Version: 10.3.2
Thanks for catching this. Maybe something might work to make it dynamic?
$sessionVars = $config['sessionVars'] ?? $defaultSessionVars;
Please feel free to submit a PR. Thanks!