Skip to content

Commit dea6bd7

Browse files
authored
Merge pull request #49240 from nextcloud/feat/postgres-13-17
feat: Update supported PostgreSQL versions
2 parents 7bbf548 + a3e80e4 commit dea6bd7

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/phpunit-pgsql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ jobs:
5656
strategy:
5757
matrix:
5858
php-versions: ['8.1']
59-
# To keep the matrix smaller we ignore PostgreSQL '13', '14', and '15' as we already test 12 and 16 as lower and upper bound
60-
postgres-versions: ['12', '16']
59+
# To keep the matrix smaller we ignore PostgreSQL versions in between as we already test the minimum and the maximum
60+
postgres-versions: ['13', '17']
6161
include:
6262
- php-versions: '8.3'
63-
postgres-versions: '16'
63+
postgres-versions: '17'
6464
coverage: ${{ github.event_name != 'pull_request' }}
6565
- php-versions: '8.4'
66-
postgres-versions: '16'
66+
postgres-versions: '17'
6767

6868
name: PostgreSQL ${{ matrix.postgres-versions }} (PHP ${{ matrix.php-versions }}) - database tests
6969

apps/settings/lib/SetupChecks/SupportedDatabase.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class SupportedDatabase implements ISetupCheck {
2424
private const MAX_MARIADB = '11.4';
2525
private const MIN_MYSQL = '8.0';
2626
private const MAX_MYSQL = '8.4';
27+
private const MIN_POSTGRES = '13';
28+
private const MAX_POSTGRES = '17';
2729

2830
public function __construct(
2931
private IL10N $l10n,
@@ -98,8 +100,16 @@ public function run(): SetupResult {
98100
// we only care about X not X.Y or X.Y.Z differences
99101
[$major, ] = explode('.', $versionlc);
100102
$versionConcern = $major;
101-
if (version_compare($versionConcern, '12', '<') || version_compare($versionConcern, '16', '>')) {
102-
return SetupResult::warning($this->l10n->t('PostgreSQL version "%s" detected. PostgreSQL >=12 and <=16 is suggested for best performance, stability and functionality with this version of Nextcloud.', $version));
103+
if (version_compare($versionConcern, self::MIN_POSTGRES, '<') || version_compare($versionConcern, self::MAX_POSTGRES, '>')) {
104+
return SetupResult::warning(
105+
$this->l10n->t(
106+
'PostgreSQL version "%1$s" detected. PostgreSQL >=%2$s and <=%3$s is suggested for best performance, stability and functionality with this version of Nextcloud.',
107+
[
108+
$version,
109+
self::MIN_POSTGRES,
110+
self::MAX_POSTGRES,
111+
])
112+
);
103113
}
104114
} elseif ($databasePlatform instanceof OraclePlatform) {
105115
$version = 'Oracle';

0 commit comments

Comments
 (0)