summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-11-08 14:37:20 +0100
committerGitHub <noreply@github.com>2016-11-08 14:37:20 +0100
commit9071fd57d53570ec77fa8845a4851a9b084a54bf (patch)
tree7cf584a48ba863cddf61ad4a98fa3fafc2e5f3a1
parent5c61a6b351820ec92a50c0e858a43bcc55645b23 (diff)
parent3f457943b05dc17cfc8c8f5348c2050b5fd34fb2 (diff)
downloadnextcloud-server-9071fd57d53570ec77fa8845a4851a9b084a54bf.tar.gz
nextcloud-server-9071fd57d53570ec77fa8845a4851a9b084a54bf.zip
Merge pull request #2048 from nextcloud/stable10-update-containers
[stable10] Update containers to latest version
-rw-r--r--.drone.yml42
-rw-r--r--lib/private/LargeFileHelper.php17
-rw-r--r--lib/private/Memcache/APCu.php32
-rw-r--r--tests/lib/LargeFileHelperGetFileSizeTest.php15
4 files changed, 51 insertions, 55 deletions
diff --git a/.drone.yml b/.drone.yml
index e1a4e7ed910..67460913fa4 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -3,14 +3,14 @@ pipeline:
image: plugins/git
depth: 1
jsunit:
- image: nextcloudci/jsunit:1.0.6
+ image: nextcloudci/jsunit:jsunit-5
commands:
- ./autotest-js.sh
when:
matrix:
TESTS: jsunit
nodb-php5.4:
- image: nextcloudci/php5.4:1.0.7
+ image: nextcloudci/php5.4:php5.4-5
commands:
- NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
when:
@@ -18,7 +18,7 @@ pipeline:
DB: NODB
PHP: 5.4
nodb-php5.5:
- image: nextcloudci/php5.5:1.0.7
+ image: nextcloudci/php5.5:php5.5-5
commands:
- NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
when:
@@ -26,7 +26,7 @@ pipeline:
DB: NODB
PHP: 5.5
app-check-code:
- image: nextcloudci/php7.0:php7.0-2
+ image: nextcloudci/php7.0:php7.0-6
commands:
- ./occ app:check-code admin_audit
- ./occ app:check-code comments
@@ -36,7 +36,7 @@ pipeline:
matrix:
TESTS: app-check-code
syntax-php5.4:
- image: nextcloudci/php5.4:1.0.14
+ image: nextcloudci/php5.4:php5.4-5
commands:
- composer install
- ./lib/composer/bin/parallel-lint --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 .
@@ -44,7 +44,7 @@ pipeline:
matrix:
TESTS: syntax-php5.4
syntax-php5.5:
- image: nextcloudci/php5.5:1.0.14
+ image: nextcloudci/php5.5:php5.5-5
commands:
- composer install
- ./lib/composer/bin/parallel-lint --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 .
@@ -52,7 +52,7 @@ pipeline:
matrix:
TESTS: syntax-php5.5
syntax-php5.6:
- image: nextcloudci/php5.6:php5.6-2
+ image: nextcloudci/php5.6:php5.6-7
commands:
- composer install
- ./lib/composer/bin/parallel-lint --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 .
@@ -60,7 +60,7 @@ pipeline:
matrix:
TESTS: syntax-php5.6
syntax-php7.0:
- image: nextcloudci/php7.0:php7.0-2
+ image: nextcloudci/php7.0:php7.0-6
commands:
- composer install
- ./lib/composer/bin/parallel-lint --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 .
@@ -68,7 +68,7 @@ pipeline:
matrix:
TESTS: syntax-php7.0
litmus-v1:
- image: nextcloudci/litmus-php7.0:litmus-php7.0-2
+ image: nextcloudci/litmus-php7.0:litmus-php7.0-4
commands:
- bash tests/travis/install.sh sqlite
- bash apps/dav/tests/travis/litmus-v1/script.sh
@@ -76,7 +76,7 @@ pipeline:
matrix:
TESTS: litmus-v1
litmus-v2:
- image: nextcloudci/litmus-php7.0:litmus-php7.0-2
+ image: nextcloudci/litmus-php7.0:litmus-php7.0-4
commands:
- bash tests/travis/install.sh sqlite
- bash apps/dav/tests/travis/litmus-v2/script.sh
@@ -84,7 +84,7 @@ pipeline:
matrix:
TESTS: litmus-v2
caldavtester:
- image: nextcloudci/litmus-php7.0:litmus-php7.0-2
+ image: nextcloudci/litmus-php7.0:litmus-php7.0-4
commands:
- bash tests/travis/install.sh sqlite
- bash apps/dav/tests/travis/caldav/install.sh
@@ -93,7 +93,7 @@ pipeline:
matrix:
TESTS: caldavtester
carddavtester:
- image: nextcloudci/litmus-php7.0:litmus-php7.0-2
+ image: nextcloudci/litmus-php7.0:litmus-php7.0-4
commands:
- bash tests/travis/install.sh sqlite
- bash apps/dav/tests/travis/carddav/install.sh
@@ -102,7 +102,7 @@ pipeline:
matrix:
TESTS: carddavtester
nodb-php5.6:
- image: nextcloudci/php5.6:1.0.6
+ image: nextcloudci/php5.6:php5.6-7
commands:
- NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
when:
@@ -110,7 +110,7 @@ pipeline:
DB: NODB
PHP: 5.6
nodb-php7.0:
- image: nextcloudci/php7.0:1.0.9
+ image: nextcloudci/php7.0:php7.0-6
commands:
- NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
when:
@@ -118,7 +118,7 @@ pipeline:
DB: NODB
PHP: "7.0"
sqlite-php5.4:
- image: nextcloudci/php5.4:1.0.7
+ image: nextcloudci/php5.4:php5.4-5
commands:
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
when:
@@ -126,7 +126,7 @@ pipeline:
DB: sqlite
PHP: 5.4
sqlite-php5.5:
- image: nextcloudci/php5.5:1.0.7
+ image: nextcloudci/php5.5:php5.5-5
commands:
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
when:
@@ -134,7 +134,7 @@ pipeline:
DB: sqlite
PHP: 5.5
sqlite-php5.6:
- image: nextcloudci/php5.6:1.0.6
+ image: nextcloudci/php5.6:php5.6-7
commands:
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
when:
@@ -142,7 +142,7 @@ pipeline:
DB: sqlite
PHP: 5.6
sqlite-php7.0:
- image: nextcloudci/php7.0:1.0.9
+ image: nextcloudci/php7.0:php7.0-6
commands:
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
when:
@@ -150,7 +150,7 @@ pipeline:
DB: sqlite
PHP: "7.0"
mysql-php5.6:
- image: nextcloudci/php5.6:1.0.6
+ image: nextcloudci/php5.6:php5.6-7
commands:
- sleep 15 # gives the database enough time to initialize
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysql
@@ -159,7 +159,7 @@ pipeline:
DB: mysql
PHP: 5.6
postgres-php5.6:
- image: nextcloudci/php5.6:1.0.6
+ image: nextcloudci/php5.6:php5.6-7
commands:
- sleep 10 # gives the database enough time to initialize
- NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh pgsql
@@ -168,7 +168,7 @@ pipeline:
DB: postgres
PHP: 5.6
integration:
- image: nextcloudci/php7.0:1.0.9
+ image: nextcloudci/php7.0:php7.0-6
commands:
- ./occ maintenance:install --admin-pass=admin
- cd build/integration
diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php
index f89d3216a39..9d0fe864033 100644
--- a/lib/private/LargeFileHelper.php
+++ b/lib/private/LargeFileHelper.php
@@ -138,23 +138,6 @@ class LargeFileHelper {
}
/**
- * @brief Tries to get the size of a file via the Windows DOM extension.
- *
- * @param string $filename Path to the file.
- *
- * @return null|int|float Number of bytes as number (float or int) or
- * null on failure.
- */
- public function getFileSizeViaCOM($filename) {
- if (class_exists('COM')) {
- $fsObj = new \COM("Scripting.FileSystemObject");
- $file = $fsObj->GetFile($filename);
- return 0 + $file->Size;
- }
- return null;
- }
-
- /**
* @brief Tries to get the size of a file via an exec() call.
*
* @param string $filename Path to the file.
diff --git a/lib/private/Memcache/APCu.php b/lib/private/Memcache/APCu.php
index 713ed152648..70f0d73d2d4 100644
--- a/lib/private/Memcache/APCu.php
+++ b/lib/private/Memcache/APCu.php
@@ -88,7 +88,21 @@ class APCu extends Cache implements IMemcache {
*/
public function inc($key, $step = 1) {
$this->add($key, 0);
- return apcu_inc($this->getPrefix() . $key, $step);
+ /**
+ * TODO - hack around a PHP 7 specific issue in APCu
+ *
+ * on PHP 7 the apcu_inc method on a non-existing object will increment
+ * "0" and result in "1" as value - therefore we check for existence
+ * first
+ *
+ * on PHP 5.6 this is not the case
+ *
+ * see https://github.com/krakjoe/apcu/issues/183#issuecomment-244038221
+ * for details
+ */
+ return apcu_exists($this->getPrefix() . $key)
+ ? apcu_inc($this->getPrefix() . $key, $step)
+ : false;
}
/**
@@ -99,7 +113,21 @@ class APCu extends Cache implements IMemcache {
* @return int | bool
*/
public function dec($key, $step = 1) {
- return apcu_dec($this->getPrefix() . $key, $step);
+ /**
+ * TODO - hack around a PHP 7 specific issue in APCu
+ *
+ * on PHP 7 the apcu_dec method on a non-existing object will decrement
+ * "0" and result in "-1" as value - therefore we check for existence
+ * first
+ *
+ * on PHP 5.6 this is not the case
+ *
+ * see https://github.com/krakjoe/apcu/issues/183#issuecomment-244038221
+ * for details
+ */
+ return apcu_exists($this->getPrefix() . $key)
+ ? apcu_dec($this->getPrefix() . $key, $step)
+ : false;
}
/**
diff --git a/tests/lib/LargeFileHelperGetFileSizeTest.php b/tests/lib/LargeFileHelperGetFileSizeTest.php
index 0c3a11e971a..b2735d7f619 100644
--- a/tests/lib/LargeFileHelperGetFileSizeTest.php
+++ b/tests/lib/LargeFileHelperGetFileSizeTest.php
@@ -57,21 +57,6 @@ class LargeFileHelperGetFileSizeTest extends TestCase {
/**
* @dataProvider dataFileNameProvider
*/
- public function testGetFileSizeViaCOM($filename, $fileSize) {
- if (!extension_loaded('COM')) {
- $this->markTestSkipped(
- 'The PHP Windows COM extension is required for this test.'
- );
- }
- $this->assertSame(
- $fileSize,
- $this->helper->getFileSizeViaCOM($filename)
- );
- }
-
- /**
- * @dataProvider dataFileNameProvider
- */
public function testGetFileSizeViaExec($filename, $fileSize) {
if (!\OC_Helper::is_function_enabled('exec')) {
$this->markTestSkipped(