Skip to content

Commit e613ba2

Browse files
Merge pull request #56729 from nextcloud/techdebt/noid/oracle-12
Drop Oracle 11 support
2 parents fbff470 + 7a4167f commit e613ba2

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

.github/workflows/phpunit-oci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ jobs:
6060
fail-fast: false
6161
matrix:
6262
include:
63-
- oracle-versions: '11'
64-
php-versions: '8.2'
6563
- oracle-versions: '18'
6664
php-versions: '8.2'
6765
coverage: ${{ github.event_name != 'pull_request' }}

apps/settings/lib/SetupChecks/SupportedDatabase.php

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class SupportedDatabase implements ISetupCheck {
2222
private const MAX_MYSQL = '8.4';
2323
private const MIN_POSTGRES = '14';
2424
private const MAX_POSTGRES = '18';
25+
private const MIN_ORACLE = '12.2';
26+
private const MAX_ORACLE = '26';
2527

2628
public function __construct(
2729
private IL10N $l10n,
@@ -107,7 +109,29 @@ public function run(): SetupResult {
107109
);
108110
}
109111
} elseif ($databasePlatform === IDBConnection::PLATFORM_ORACLE) {
110-
$version = 'Oracle';
112+
$result = $this->connection->executeQuery('SELECT VERSION FROM PRODUCT_COMPONENT_VERSION');
113+
$version = $result->fetchOne();
114+
$result->closeCursor();
115+
$versionLower = strtolower($version);
116+
// we only care about X.Y not X.Y.Z differences
117+
[$major, $minor, ] = explode('.', $versionLower);
118+
$versionConcern = $major . '.' . $minor;
119+
if (version_compare($versionConcern, self::MIN_ORACLE, '<') || version_compare($versionConcern, self::MAX_ORACLE, '>')) {
120+
$extendedWarning = '';
121+
if (version_compare($versionConcern, self::MIN_ORACLE, '<')) {
122+
$extendedWarning = "\n" . $this->l10n->t('Nextcloud %d does not support your current version, so be sure to update the database before updating your Nextcloud Server.', [33]);
123+
}
124+
return SetupResult::warning(
125+
$this->l10n->t(
126+
'Oracle version "%1$s" detected. Oracle >=%2$s and <=%3$s is suggested for best performance, stability and functionality with this version of Nextcloud.',
127+
[
128+
$version,
129+
self::MIN_ORACLE,
130+
self::MAX_ORACLE,
131+
])
132+
. $extendedWarning
133+
);
134+
}
111135
} elseif ($databasePlatform === IDBConnection::PLATFORM_SQLITE) {
112136
return SetupResult::warning(
113137
$this->l10n->t('SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend. This is particularly recommended when using the desktop client for file synchronisation. To migrate to another database use the command line tool: "occ db:convert-type".'),

tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,6 @@ public function testLongText(): void {
142142
}
143143

144144
public function testJson(): void {
145-
if ($this->connection->getDatabaseProvider(true) === IDBConnection::PLATFORM_ORACLE) {
146-
$result = $this->connection->executeQuery('SELECT VERSION FROM PRODUCT_COMPONENT_VERSION');
147-
$version = $result->fetchOne();
148-
$result->closeCursor();
149-
if (str_starts_with($version, '11.')) {
150-
$this->markTestSkipped('JSON is not supported on Oracle 11, skipping until deprecation was clarified: ' . $version);
151-
}
152-
}
153-
154-
155145
$appId = $this->getUniqueID('testing');
156146
$query = $this->connection->getQueryBuilder();
157147
$query->insert('share')

0 commit comments

Comments
 (0)