From ce312888b313e77892c9cd04af03cc6c85da5390 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 30 Nov 2019 17:31:26 +0545 Subject: [PATCH 1/4] Allow PHP7.4 --- console.php | 6 +++--- index.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/console.php b/console.php index b22da3634b4a..4dc6b9e4e1e6 100644 --- a/console.php +++ b/console.php @@ -41,9 +41,9 @@ exit(1); } -// Show warning if PHP 7.4 or later is used as ownCloud is not compatible with PHP 7.4 -if (\version_compare(PHP_VERSION, '7.4.0alpha1') !== -1) { - echo 'This version of ownCloud is not compatible with PHP 7.4' . PHP_EOL; +// Show warning if PHP 7.5 or later is used as ownCloud is not compatible with PHP 7.5 +if (\version_compare(PHP_VERSION, '7.5.0alpha1') !== -1) { + echo 'This version of ownCloud is not compatible with PHP 7.5' . PHP_EOL; echo 'You are currently running PHP ' . PHP_VERSION . '.' . PHP_EOL; exit(1); } diff --git a/index.php b/index.php index 164a2952b957..2f113b3eff8b 100644 --- a/index.php +++ b/index.php @@ -35,9 +35,9 @@ return; } -// Show warning if PHP 7.4 or later is used as ownCloud is not compatible with PHP 7.4 -if (\version_compare(PHP_VERSION, '7.4.0alpha1') !== -1) { - echo 'This version of ownCloud is not compatible with PHP 7.4
'; +// Show warning if PHP 7.5 or later is used as ownCloud is not compatible with PHP 7.5 +if (\version_compare(PHP_VERSION, '7.5.0alpha1') !== -1) { + echo 'This version of ownCloud is not compatible with PHP 7.5
'; echo 'You are currently running PHP ' . PHP_VERSION . '.'; return; } From b269c9889df0af142291eb0258b9759afb2350b4 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 30 Nov 2019 17:35:03 +0545 Subject: [PATCH 2/4] Run tests in CI with PHP 7.4 --- .drone.star | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.drone.star b/.drone.star index 5fd0e65e5e8f..d6cc4cca1ba6 100644 --- a/.drone.star +++ b/.drone.star @@ -26,6 +26,7 @@ config = { 'allDatabases' : { 'phpVersions': [ '7.2', + '7.4', ] }, 'reducedDatabases' : { @@ -40,7 +41,7 @@ config = { }, 'external-samba-windows' : { 'phpVersions': [ - '7.2', + '7.4', ], 'databases': [ 'sqlite', @@ -59,7 +60,7 @@ config = { }, 'external-other' : { 'phpVersions': [ - '7.2', + '7.4', ], 'databases': [ 'sqlite', @@ -597,7 +598,7 @@ def phpstan(): return pipelines default = { - 'phpVersions': ['7.2'], + 'phpVersions': ['7.4'], 'logLevel': '2', } @@ -674,7 +675,7 @@ def phan(): return pipelines default = { - 'phpVersions': ['7.2', '7.3'], + 'phpVersions': ['7.2', '7.3', '7.4'], 'logLevel': '2', } @@ -751,7 +752,7 @@ def litmus(): return pipelines default = { - 'phpVersions': ['7.2'], + 'phpVersions': ['7.4'], 'logLevel': '2' } @@ -916,7 +917,7 @@ def dav(): return pipelines default = { - 'phpVersions': ['7.2'], + 'phpVersions': ['7.4'], 'logLevel': '2' } @@ -1014,7 +1015,7 @@ def javascript(): default = { 'coverage': True, 'logLevel': '2', - 'phpVersion': '7.2' + 'phpVersion': '7.4' } if 'defaults' in config: @@ -1110,7 +1111,7 @@ def phptests(testType): errorFound = False default = { - 'phpVersions': ['7.2', '7.3'], + 'phpVersions': ['7.2', '7.3', '7.4'], 'databases': [ 'sqlite', 'mariadb:10.2', 'mariadb:10.3', 'mariadb:10.4', 'mysql:5.5', 'mysql:5.7', 'mysql:8.0', 'postgres:9.4', 'postgres:10.3', 'oracle' ], @@ -1294,7 +1295,7 @@ def acceptance(): default = { 'federatedServerVersions': [''], 'browsers': ['chrome'], - 'phpVersions': ['7.2'], + 'phpVersions': ['7.4'], 'databases': ['mariadb:10.2'], 'federatedServerNeeded': False, 'filterTags': '', From 540b0ccf1a51f4cf5472061a6de3b82e7ce58fc9 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 2 Dec 2019 16:13:14 +0545 Subject: [PATCH 3/4] Run federated server only on PHP 7.2 to allow for core 10.2.1 --- .drone.star | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.star b/.drone.star index d6cc4cca1ba6..2c65e1448344 100644 --- a/.drone.star +++ b/.drone.star @@ -1316,6 +1316,7 @@ def acceptance(): 'includeKeyInMatrixName': False, 'runAllSuites': False, 'numberOfParts': 1, + 'federatedPhpVersion': '7.2', } if 'defaults' in config: @@ -1455,7 +1456,7 @@ def acceptance(): yarnInstall(phpVersion) + installServer(phpVersion, db, params['logLevel'], params['federatedServerNeeded'], params['proxyNeeded']) + ( - installFederated(federatedServerVersion, phpVersion, params['logLevel'], protocol, db, federationDbSuffix) + + installFederated(federatedServerVersion, params['federatedPhpVersion'], params['logLevel'], protocol, db, federationDbSuffix) + owncloudLog('federated', 'federated') if params['federatedServerNeeded'] else [] ) + installExtraApps(phpVersion, extraAppsDict) + @@ -1489,7 +1490,7 @@ def acceptance(): params['extraServices'] + owncloudService(phpVersion, 'server', '/drone/src', params['useHttps']) + (( - owncloudService(phpVersion, 'federated', '/drone/federated', params['useHttps']) + + owncloudService(params['federatedPhpVersion'], 'federated', '/drone/federated', params['useHttps']) + databaseServiceForFederation(db, federationDbSuffix) ) if params['federatedServerNeeded'] else []), 'depends_on': [], From 0f86aa4b0cdac5f49c5b677e8e6fc05886d94543 Mon Sep 17 00:00:00 2001 From: VicDeo Date: Thu, 23 Apr 2020 22:59:17 +0300 Subject: [PATCH 4/4] Fix hasUpdated for webdav storage --- lib/private/Files/Storage/DAV.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index 58a40fe71e82..61650b5cc0d2 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -807,16 +807,18 @@ public function hasUpdated($path, $time) { return false; } if (isset($response['{DAV:}getetag'])) { - $cachedData = $this->getCache()->get($path); $etag = \trim($response['{DAV:}getetag'], '"'); - if (!empty($etag) && $cachedData['etag'] !== $etag) { + $cachedData = $this->getCache()->get($path); + $cachedEtag = $cachedData['etag'] ?? null; + if (!empty($etag) && $cachedEtag !== $etag) { return true; } elseif (isset($response['{http://open-collaboration-services.org/ns}share-permissions'])) { $sharePermissions = (int)$response['{http://open-collaboration-services.org/ns}share-permissions']; return $sharePermissions !== $cachedData['permissions']; } elseif (isset($response['{http://owncloud.org/ns}permissions'])) { $permissions = $this->parsePermissions($response['{http://owncloud.org/ns}permissions']); - return $permissions !== $cachedData['permissions']; + $cachedPermissions = $cachedData['permissions'] ?? null; + return $permissions !== $cachedPermissions; } else { return false; }