Skip to content

Commit

Permalink
oracle db support for CAKEPHP V5
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Oct 29, 2025
1 parent 928df48 commit 3a98736
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/plugins/CoreServer/src/CoreServerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function bootstrap(PluginApplicationInterface $app): void
$oracleEnabled = \Cake\Core\Configure::read('registry.database.oracle.enable');

if($oracleEnabled === true) {
$app->addPlugin(\CakeDC\OracleDriver\Plugin::class, ['bootstrap' => true]);
$app->addPlugin(\Ioigoume\OracleDriver\Plugin::class, ['bootstrap' => true]);
}
}
catch(\Error $e) {
Expand Down
6 changes: 3 additions & 3 deletions app/plugins/CoreServer/src/Model/Table/SqlServersTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ public function connect(int $serverId, string $name): bool {
// We don't test that the plugin is available here, an error should be thrown
// when we try to connect.

$dbconfig['className'] = 'CakeDC\OracleDriver\Database\OracleConnection';
$dbconfig['driver'] = 'CakeDC\OracleDriver\Database\Driver\OracleOCI'; // For OCI8
$dbconfig['className'] = 'Ioigoume\OracleDriver\Database\OracleConnection';
$dbconfig['driver'] = 'Ioigoume\OracleDriver\Database\Driver\OracleOCI'; // For OCI8
$dbconfig['quoteIdentifiers'] = true;

// Use 'CakeDC\\OracleDriver\\Database\\Driver\\OraclePDO' for PDO_OCI, but CakeDC
Expand All @@ -177,7 +177,7 @@ public function connect(int $serverId, string $name): bool {
// correctly enables the long alias support, to we hard code that version to simplify
// configuration. Note Oracle changed their release numbers to be based on calendar years,
// retroactively assigning 18c (12.2.0.2) and 19c (12.2.0.3), so this approach should
// work at least for those versions.
// work at least for those versions.
$dbconfig['server_version'] = 19;
}
}
Expand Down

0 comments on commit 3a98736

Please sign in to comment.