Skip to content
Open
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ docs
vendor
coverage
coverage.xml
.idea
.idea
.phpunit.result.cache
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ tools:
build:
environment:
php:
version: 7.2
version: 8.0
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ language: php

php:
- hhvm
- '7.1'
- '7.3'
- '7.4'
- '8.0'
- nightly

install:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip

### Security
- Nothing


## [] Unreleased

### Added
- Support for PHP 8
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
17 changes: 9 additions & 8 deletions phpunit.hhvm.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="./phpunit.php"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="true"
verbose="true"
>
<testsuites>
<testsuite name="flysystem/tests">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
</phpunit>
</include>
</coverage>
</phpunit>
3 changes: 0 additions & 3 deletions phpunit.php

This file was deleted.

23 changes: 12 additions & 11 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="./phpunit.php"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="true"
verbose="true"
>
<testsuites>
<testsuite name="flysystem/tests">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
</include>
</coverage>
<logging>
<log type="coverage-text" target="php://stdout" showUncoveredFiles="true"/>
<log type="coverage-html" target="coverage" showUncoveredFiles="true"/>
<log type="coverage-clover" target="coverage.xml" showUncoveredFiles="true"/>
<junit outputFile="coverage.xml"/>
<testdoxHtml outputFile="coverage"/>
<text outputFile="php://stdout"/>
</logging>
</phpunit>
</phpunit>
11 changes: 6 additions & 5 deletions tests/BackblazeAdapterTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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']);
}
Expand All @@ -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']);
}
Expand All @@ -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']);
}
Expand All @@ -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']);
}
Expand Down