diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-11-13 12:20:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-13 12:20:08 +0100 |
commit | dea6bd73620b2a033f59b506b1c5f1466d37dd54 (patch) | |
tree | 89eaf892efc9daf6445e3415175e98621bd03546 | |
parent | 7bbf5481e146f9e21bae6a773e6576b254089f24 (diff) | |
parent | a3e80e4195ee21e2ab5ba462ad4daa26086779bf (diff) | |
download | nextcloud-server-dea6bd73620b2a033f59b506b1c5f1466d37dd54.tar.gz nextcloud-server-dea6bd73620b2a033f59b506b1c5f1466d37dd54.zip |
Merge pull request #49240 from nextcloud/feat/postgres-13-17
feat: Update supported PostgreSQL versions
-rw-r--r-- | .github/workflows/phpunit-pgsql.yml | 8 | ||||
-rw-r--r-- | apps/settings/lib/SetupChecks/SupportedDatabase.php | 14 |
2 files changed, 16 insertions, 6 deletions
diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml index 118a09a93cc..b60c9d01b02 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -56,14 +56,14 @@ jobs: strategy: matrix: php-versions: ['8.1'] - # To keep the matrix smaller we ignore PostgreSQL '13', '14', and '15' as we already test 12 and 16 as lower and upper bound - postgres-versions: ['12', '16'] + # To keep the matrix smaller we ignore PostgreSQL versions in between as we already test the minimum and the maximum + postgres-versions: ['13', '17'] include: - php-versions: '8.3' - postgres-versions: '16' + postgres-versions: '17' coverage: ${{ github.event_name != 'pull_request' }} - php-versions: '8.4' - postgres-versions: '16' + postgres-versions: '17' name: PostgreSQL ${{ matrix.postgres-versions }} (PHP ${{ matrix.php-versions }}) - database tests diff --git a/apps/settings/lib/SetupChecks/SupportedDatabase.php b/apps/settings/lib/SetupChecks/SupportedDatabase.php index 89f78948305..31b907a825e 100644 --- a/apps/settings/lib/SetupChecks/SupportedDatabase.php +++ b/apps/settings/lib/SetupChecks/SupportedDatabase.php @@ -24,6 +24,8 @@ class SupportedDatabase implements ISetupCheck { private const MAX_MARIADB = '11.4'; private const MIN_MYSQL = '8.0'; private const MAX_MYSQL = '8.4'; + private const MIN_POSTGRES = '13'; + private const MAX_POSTGRES = '17'; public function __construct( private IL10N $l10n, @@ -98,8 +100,16 @@ class SupportedDatabase implements ISetupCheck { // we only care about X not X.Y or X.Y.Z differences [$major, ] = explode('.', $versionlc); $versionConcern = $major; - if (version_compare($versionConcern, '12', '<') || version_compare($versionConcern, '16', '>')) { - 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)); + if (version_compare($versionConcern, self::MIN_POSTGRES, '<') || version_compare($versionConcern, self::MAX_POSTGRES, '>')) { + return SetupResult::warning( + $this->l10n->t( + 'PostgreSQL version "%1$s" detected. PostgreSQL >=%2$s and <=%3$s is suggested for best performance, stability and functionality with this version of Nextcloud.', + [ + $version, + self::MIN_POSTGRES, + self::MAX_POSTGRES, + ]) + ); } } elseif ($databasePlatform instanceof OraclePlatform) { $version = 'Oracle'; |