diff --git a/.gitignore b/.gitignore
index 1c894ce..ba32375 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,5 @@ docs
vendor
coverage
coverage.xml
-.idea
\ No newline at end of file
+.idea
+.phpunit.result.cache
\ No newline at end of file
diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index 375acc3..62f2818 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -30,4 +30,4 @@ tools:
build:
environment:
php:
- version: 7.2
\ No newline at end of file
+ version: 8.0
diff --git a/.travis.yml b/.travis.yml
index 919e55a..50501dd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,9 @@ language: php
php:
- hhvm
- - '7.1'
+ - '7.3'
+ - '7.4'
+ - '8.0'
- nightly
install:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d24e1f4..098d741 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,3 +20,9 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
### Security
- Nothing
+
+
+## [] Unreleased
+
+### Added
+- Support for PHP 8
diff --git a/composer.json b/composer.json
index cf7c2fb..0079e0b 100755
--- a/composer.json
+++ b/composer.json
@@ -14,16 +14,16 @@
}
],
"require": {
- "php": "^7.2",
+ "php": "^7.2|^8.0",
"league/flysystem": "~1.0",
"gliterd/backblaze-b2": ">=1.5.0",
"psr/http-message-implementation": "*",
"mikey179/vfsstream": "*"
},
"require-dev": {
- "phpunit/phpunit" : "~4.0||~5.0",
+ "phpunit/phpunit" : "^9.0",
"scrutinizer/ocular": "~1.1",
- "squizlabs/php_codesniffer": "~2.3"
+ "squizlabs/php_codesniffer": "^3.6"
},
"autoload": {
"psr-4": {
diff --git a/phpunit.hhvm.xml b/phpunit.hhvm.xml
index 5df38f6..169ad0a 100644
--- a/phpunit.hhvm.xml
+++ b/phpunit.hhvm.xml
@@ -1,14 +1,15 @@
-
@@ -16,9 +17,9 @@
./tests/
-
-
+
+
./src/
-
-
-
\ No newline at end of file
+
+
+
diff --git a/phpunit.php b/phpunit.php
deleted file mode 100644
index a0bb447..0000000
--- a/phpunit.php
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
@@ -16,14 +17,14 @@
./tests/
-
-
+
+
./src/
-
-
+
+
-
-
-
+
+
+
-
\ No newline at end of file
+
diff --git a/tests/BackblazeAdapterTests.php b/tests/BackblazeAdapterTests.php
index 65906bb..ae6516c 100644
--- a/tests/BackblazeAdapterTests.php
+++ b/tests/BackblazeAdapterTests.php
@@ -3,8 +3,9 @@
use BackblazeB2\File;
use League\Flysystem\Config;
use Mhetreramesh\Flysystem\BackblazeAdapter as Backblaze;
+use PHPUnit\Framework\TestCase;
-class BackblazeAdapterTests extends PHPUnit_Framework_TestCase
+class BackblazeAdapterTests extends TestCase
{
/**
* @var vfsStreamDirectory
@@ -49,7 +50,7 @@ public function testWrite($adapter, $mock)
{
$mock->upload(['BucketId' => null, 'BucketName' => 'my_bucket', 'FileName' => 'something', 'Body' => 'contents'])->willReturn(new File('something', '', '', '', ''), false);
$result = $adapter->write('something', 'contents', new Config());
- $this->assertInternalType('array', $result);
+ $this->assertIsArray($result);
$this->assertArrayHasKey('type', $result);
$this->assertEquals('file', $result['type']);
}
@@ -61,7 +62,7 @@ public function testWriteStream($adapter, $mock)
{
$mock->upload(['BucketId' => null, 'BucketName' => 'my_bucket', 'FileName' => 'something', 'Body' => 'contents'])->willReturn(new File('something', '', '', '', ''), false);
$result = $adapter->writeStream('something', 'contents', new Config());
- $this->assertInternalType('array', $result);
+ $this->assertIsArray($result);
$this->assertArrayHasKey('type', $result);
$this->assertEquals('file', $result['type']);
}
@@ -73,7 +74,7 @@ public function testUpdate($adapter, $mock)
{
$mock->upload(['BucketId' => null, 'BucketName' => 'my_bucket', 'FileName' => 'something', 'Body' => 'contents'])->willReturn(new File('something', '', '', '', ''), false);
$result = $adapter->update('something', 'contents', new Config());
- $this->assertInternalType('array', $result);
+ $this->assertIsArray($result);
$this->assertArrayHasKey('type', $result);
$this->assertEquals('file', $result['type']);
}
@@ -85,7 +86,7 @@ public function testUpdateStream($adapter, $mock)
{
$mock->upload(['BucketId' => null, 'BucketName' => 'my_bucket', 'FileName' => 'something', 'Body' => 'contents'])->willReturn(new File('something', '', '', '', ''), false);
$result = $adapter->updateStream('something', 'contents', new Config());
- $this->assertInternalType('array', $result);
+ $this->assertIsArray($result);
$this->assertArrayHasKey('type', $result);
$this->assertEquals('file', $result['type']);
}