Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests-Only] Php 7.4 fix phpunit #37280

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ config = {
'allDatabases' : {
'phpVersions': [
'7.2',
'7.4',
]
},
'reducedDatabases' : {
Expand All @@ -40,7 +41,7 @@ config = {
},
'external-samba-windows' : {
'phpVersions': [
'7.2',
'7.4',
],
'databases': [
'sqlite',
Expand All @@ -59,7 +60,7 @@ config = {
},
'external-other' : {
'phpVersions': [
'7.2',
'7.4',
],
'databases': [
'sqlite',
Expand Down Expand Up @@ -597,7 +598,7 @@ def phpstan():
return pipelines

default = {
'phpVersions': ['7.2'],
'phpVersions': ['7.4'],
'logLevel': '2',
}

Expand Down Expand Up @@ -674,7 +675,7 @@ def phan():
return pipelines

default = {
'phpVersions': ['7.2', '7.3'],
'phpVersions': ['7.2', '7.3', '7.4'],
'logLevel': '2',
}

Expand Down Expand Up @@ -751,7 +752,7 @@ def litmus():
return pipelines

default = {
'phpVersions': ['7.2'],
'phpVersions': ['7.4'],
'logLevel': '2'
}

Expand Down Expand Up @@ -916,7 +917,7 @@ def dav():
return pipelines

default = {
'phpVersions': ['7.2'],
'phpVersions': ['7.4'],
'logLevel': '2'
}

Expand Down Expand Up @@ -1014,7 +1015,7 @@ def javascript():
default = {
'coverage': True,
'logLevel': '2',
'phpVersion': '7.2'
'phpVersion': '7.4'
}

if 'defaults' in config:
Expand Down Expand Up @@ -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'
],
Expand Down Expand Up @@ -1294,7 +1295,7 @@ def acceptance():
default = {
'federatedServerVersions': [''],
'browsers': ['chrome'],
'phpVersions': ['7.2'],
'phpVersions': ['7.4'],
'databases': ['mariadb:10.2'],
'federatedServerNeeded': False,
'filterTags': '',
Expand All @@ -1315,6 +1316,7 @@ def acceptance():
'includeKeyInMatrixName': False,
'runAllSuites': False,
'numberOfParts': 1,
'federatedPhpVersion': '7.2',
}

if 'defaults' in config:
Expand Down Expand Up @@ -1454,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) +
Expand Down Expand Up @@ -1488,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': [],
Expand Down
6 changes: 3 additions & 3 deletions console.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<br/>';
// 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<br/>';
echo 'You are currently running PHP ' . PHP_VERSION . '.';
return;
}
Expand Down
8 changes: 5 additions & 3 deletions lib/private/Files/Storage/DAV.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down