summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.drone.yml89
-rw-r--r--apps/dav/lib/HookManager.php6
-rw-r--r--config/config.sample.php2
-rw-r--r--lib/base.php12
-rw-r--r--lib/private/Files/Storage/Local.php2
-rw-r--r--lib/private/legacy/app.php2
-rw-r--r--lib/versioncheck.php8
7 files changed, 16 insertions, 105 deletions
diff --git a/.drone.yml b/.drone.yml
index 986c03e20d3..5f77c3981b3 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -21,14 +21,6 @@ pipeline:
when:
matrix:
TESTS: checkers
- syntax-php5.6:
- image: nextcloudci/php5.6:php5.6-8
- commands:
- - composer install
- - ./lib/composer/bin/parallel-lint --exclude build/.phan/ --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .
- when:
- matrix:
- TESTS: syntax-php5.6
syntax-php7.0:
image: nextcloudci/php7.0:php7.0-16
commands:
@@ -146,14 +138,6 @@ pipeline:
when:
matrix:
TESTS: sqlite-php7.0-webdav-apache
- nodb-php5.6:
- image: nextcloudci/php5.6:php5.6-8
- commands:
- - NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
- when:
- matrix:
- DB: NODB
- PHP: 5.6
nodb-php7.0:
image: nextcloudci/php7.0:php7.0-16
commands:
@@ -178,14 +162,6 @@ pipeline:
matrix:
DB: NODB
PHP: 7.2
- sqlite-php5.6:
- image: nextcloudci/php5.6:php5.6-8
- commands:
- - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
- when:
- matrix:
- DB: sqlite
- PHP: 5.6
sqlite-php7.0:
image: nextcloudci/php7.0:php7.0-16
commands:
@@ -210,14 +186,6 @@ pipeline:
matrix:
DB: sqlite
PHP: 7.2
- mysql-php5.6:
- image: nextcloudci/php5.6:php5.6-8
- commands:
- - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysql
- when:
- matrix:
- DB: mysql
- PHP: 5.6
mysql-php7.0:
image: nextcloudci/php7.0:php7.0-16
commands:
@@ -242,14 +210,6 @@ pipeline:
matrix:
DB: mysql
PHP: 7.2
- mysql5.6-php5.6:
- image: nextcloudci/php5.6:php5.6-8
- commands:
- - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysql
- when:
- matrix:
- DB: mysql5.6
- PHP: 5.6
mysql5.6-php7.0:
image: nextcloudci/php7.0:php7.0-16
commands:
@@ -266,14 +226,6 @@ pipeline:
matrix:
DB: mysql5.6
PHP: 7.1
- mysql5.5-php5.6:
- image: nextcloudci/php5.6:php5.6-8
- commands:
- - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysql
- when:
- matrix:
- DB: mysql5.5
- PHP: 5.6
mysql5.5-php7.0:
image: nextcloudci/php7.0:php7.0-16
commands:
@@ -290,16 +242,6 @@ pipeline:
matrix:
DB: mysql5.5
PHP: 7.1
- postgres-php5.6:
- image: nextcloudci/php5.6:php5.6-8
- commands:
- - sleep 10 # gives the database enough time to initialize
- - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh pgsql
- when:
- matrix:
- DB: postgres
- PHP: 5.6
- POSTGRES: 9
postgres-php7.0:
image: nextcloudci/php7.0:php7.0-16
commands:
@@ -318,14 +260,6 @@ pipeline:
matrix:
DB: postgres
PHP: 7.1
- mysqlmb4-php5.6:
- image: nextcloudci/php5.6:php5.6-8
- commands:
- - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysqlmb4
- when:
- matrix:
- DB: mysqlmb4
- PHP: 5.6
mysqlmb4-php7.0:
image: nextcloudci/php7.0:php7.0-16
commands:
@@ -701,9 +635,6 @@ matrix:
- TESTS: db-codecov
ENABLE_REDIS: true
- DB: NODB
- PHP: 5.6
- ENABLE_REDIS: true
- - DB: NODB
PHP: 7.0
ENABLE_REDIS: true
- DB: NODB
@@ -713,9 +644,6 @@ matrix:
PHP: 7.2
ENABLE_REDIS: false
- DB: sqlite
- PHP: 5.6
- ENABLE_REDIS: true
- - DB: sqlite
PHP: 7.0
ENABLE_REDIS: true
- DB: sqlite
@@ -725,9 +653,6 @@ matrix:
PHP: 7.2
ENABLE_REDIS: false
- DB: mysql
- PHP: 5.6
- ENABLE_REDIS: true
- - DB: mysql
PHP: 7.0
ENABLE_REDIS: true
- DB: mysql
@@ -737,28 +662,18 @@ matrix:
PHP: 7.2
ENABLE_REDIS: false
- DB: mysql5.6
- PHP: 5.6
- ENABLE_REDIS: true
- - DB: mysql5.6
PHP: 7.0
ENABLE_REDIS: true
- DB: mysql5.6
PHP: 7.1
ENABLE_REDIS: true
- DB: mysql5.5
- PHP: 5.6
- ENABLE_REDIS: true
- - DB: mysql5.5
PHP: 7.0
ENABLE_REDIS: true
- DB: mysql5.5
PHP: 7.1
ENABLE_REDIS: true
- DB: postgres
- PHP: 5.6
- POSTGRES: 9
- ENABLE_REDIS: true
- - DB: postgres
PHP: 7.0
POSTGRES: 9
ENABLE_REDIS: true
@@ -771,9 +686,6 @@ matrix:
POSTGRES: 10
ENABLE_REDIS: true
- DB: mysqlmb4
- PHP: 5.6
- ENABLE_REDIS: true
- - DB: mysqlmb4
PHP: 7.0
ENABLE_REDIS: true
- DB: mysqlmb4
@@ -820,7 +732,6 @@ matrix:
- TESTS: acceptance
TESTS-ACCEPTANCE: login
- TESTS: jsunit
- - TESTS: syntax-php5.6
- TESTS: syntax-php7.0
- TESTS: syntax-php7.1
- TESTS: phan
diff --git a/apps/dav/lib/HookManager.php b/apps/dav/lib/HookManager.php
index 1e808e58656..57b176213e0 100644
--- a/apps/dav/lib/HookManager.php
+++ b/apps/dav/lib/HookManager.php
@@ -43,7 +43,7 @@ class HookManager {
private $syncService;
/** @var IUser[] */
- private $usersToDelete;
+ private $usersToDelete = [];
/** @var CalDavBackend */
private $calDav;
@@ -52,10 +52,10 @@ class HookManager {
private $cardDav;
/** @var array */
- private $calendarsToDelete;
+ private $calendarsToDelete = [];
/** @var array */
- private $addressBooksToDelete;
+ private $addressBooksToDelete = [];
/** @var EventDispatcher */
private $eventDispatcher;
diff --git a/config/config.sample.php b/config/config.sample.php
index 5f29933ec65..faeebb6fa8a 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -1083,7 +1083,7 @@ $CONFIG = array(
* server configuration above, and perform HA on the hostname.
*
* Redis Cluster support requires the php module phpredis in version 3.0.0 or
- * higher for PHP 7+ or phpredis in version 2.2.8 for PHP 5.6.
+ * higher.
*
* Available failover modes:
* - \RedisCluster::FAILOVER_NONE - only send commands to master nodes (default)
diff --git a/lib/base.php b/lib/base.php
index d0672785cef..f763ee634f3 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -417,7 +417,7 @@ class OC {
}
// prevents javascript from accessing php session cookies
- ini_set('session.cookie_httponly', true);
+ ini_set('session.cookie_httponly', 'true');
// set the cookie path to the Nextcloud directory
$cookie_path = OC::$WEBROOT ? : '/';
@@ -488,7 +488,7 @@ class OC {
*/
public static function setRequiredIniValues() {
@ini_set('default_charset', 'UTF-8');
- @ini_set('gd.jpeg_ignore_warning', 1);
+ @ini_set('gd.jpeg_ignore_warning', '1');
}
/**
@@ -620,8 +620,8 @@ class OC {
// Don't display errors and log them
error_reporting(E_ALL | E_STRICT);
- @ini_set('display_errors', 0);
- @ini_set('log_errors', 1);
+ @ini_set('display_errors', '0');
+ @ini_set('log_errors', '1');
if(!date_default_timezone_set('UTC')) {
throw new \RuntimeException('Could not set timezone to UTC');
@@ -635,8 +635,8 @@ class OC {
if (strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
@set_time_limit(3600);
}
- @ini_set('max_execution_time', 3600);
- @ini_set('max_input_time', 3600);
+ @ini_set('max_execution_time', '3600');
+ @ini_set('max_input_time', '3600');
//try to set the maximum filesize to 10G
@ini_set('upload_max_filesize', '10G');
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 731481d4f4f..ba9b15ce931 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -180,7 +180,7 @@ class Local extends \OC\Files\Storage\Common {
public function filemtime($path) {
$fullPath = $this->getSourcePath($path);
- clearstatcache($fullPath);
+ clearstatcache(true, $fullPath);
if (!$this->file_exists($path)) {
return false;
}
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index 1b9fc28873e..8114895416b 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -671,7 +671,7 @@ class OC_App {
public static function getCurrentApp() {
$request = \OC::$server->getRequest();
$script = substr($request->getScriptName(), strlen(OC::$WEBROOT) + 1);
- $topFolder = substr($script, 0, strpos($script, '/'));
+ $topFolder = substr($script, 0, strpos($script, '/') ?: 0);
if (empty($topFolder)) {
$path_info = $request->getPathInfo();
if ($path_info) {
diff --git a/lib/versioncheck.php b/lib/versioncheck.php
index 23b09c28e14..48e16471967 100644
--- a/lib/versioncheck.php
+++ b/lib/versioncheck.php
@@ -1,10 +1,10 @@
<?php
-// Show warning if a PHP version below 5.6.0 is used, this has to happen here
-// because base.php will already use 5.6 syntax.
-if (version_compare(PHP_VERSION, '5.6.0') === -1) {
+// Show warning if a PHP version below 7.0 is used, this has to happen here
+// because base.php will already use 7.0 syntax.
+if (version_compare(PHP_VERSION, '7.0') === -1) {
http_response_code(500);
- echo 'This version of Nextcloud requires at least PHP 5.6.0<br/>';
+ echo 'This version of Nextcloud requires at least PHP 7.0<br/>';
echo 'You are currently running ' . PHP_VERSION . '. Please update your PHP version.';
exit(-1);
}