From 3a98736f59cefde3b78fa1a7c41e20fda80a9c3a Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Mon, 27 Oct 2025 12:02:50 +0200 Subject: [PATCH] oracle db support for CAKEPHP V5 --- app/plugins/CoreServer/src/CoreServerPlugin.php | 2 +- app/plugins/CoreServer/src/Model/Table/SqlServersTable.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/plugins/CoreServer/src/CoreServerPlugin.php b/app/plugins/CoreServer/src/CoreServerPlugin.php index 310c7ccef..9ba9a536c 100644 --- a/app/plugins/CoreServer/src/CoreServerPlugin.php +++ b/app/plugins/CoreServer/src/CoreServerPlugin.php @@ -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) { diff --git a/app/plugins/CoreServer/src/Model/Table/SqlServersTable.php b/app/plugins/CoreServer/src/Model/Table/SqlServersTable.php index a5ad9c46f..a1f5820aa 100644 --- a/app/plugins/CoreServer/src/Model/Table/SqlServersTable.php +++ b/app/plugins/CoreServer/src/Model/Table/SqlServersTable.php @@ -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 @@ -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; } }