Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gliterd/flysystem-backblaze
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.4
Choose a base ref
...
head repository: gliterd/flysystem-backblaze
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Aug 26, 2016

  1. Merge tag '1.0.0' into develop

    Namespace proper created
    Ramesh Mhetre committed Aug 26, 2016
    Copy the full SHA
    47c749f View commit details
  2. Merge tag '1.0.1' into develop

    Namespace changes
    Ramesh Mhetre committed Aug 26, 2016
    Copy the full SHA
    c6d9155 View commit details

Commits on Aug 27, 2016

  1. Merge tag '1.0.3' into develop

    Added test suite and test
    Ramesh Mhetre committed Aug 27, 2016
    Copy the full SHA
    9cf1e90 View commit details
  2. Merge tag '1.0.4' into develop

    Added travis for build
    Ramesh Mhetre committed Aug 27, 2016
    Copy the full SHA
    87acf90 View commit details
  3. Added scrutinizer inspection

    Ramesh Mhetre committed Aug 27, 2016
    Copy the full SHA
    9e3966c View commit details
  4. Scrutinizer config changes

    Ramesh Mhetre committed Aug 27, 2016
    Copy the full SHA
    029c0fb View commit details
  5. Scrutinizer config changes

    Ramesh Mhetre committed Aug 27, 2016
    Copy the full SHA
    7b97355 View commit details
  6. Scrutinizer config changes

    Ramesh Mhetre committed Aug 27, 2016
    Copy the full SHA
    6281430 View commit details
  7. Scrutinizer config changes

    Ramesh Mhetre committed Aug 27, 2016
    Copy the full SHA
    a5c6b3c View commit details
  8. Scrutinizer Auto-Fixes

    This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
    scrutinizer-auto-fixer committed Aug 27, 2016
    Copy the full SHA
    80ea384 View commit details
  9. Merge pull request #1 from mhetreramesh/scrutinizer-patch-1

    Scrutinizer Auto-Fixes
    mhetreramesh authored Aug 27, 2016
    Copy the full SHA
    29c0ab1 View commit details
  10. Merge pull request #2 from mhetreramesh/hotfix/1.0.5

    Hotfix/1.0.5
    mhetreramesh authored Aug 27, 2016
    Copy the full SHA
    87713f0 View commit details
  11. Merge branch 'hotfix/1.0.5'

    Ramesh Mhetre committed Aug 27, 2016
    Copy the full SHA
    a557926 View commit details
  12. Merge tag '1.0.5' into develop

    Added scrutinizer
    Ramesh Mhetre committed Aug 27, 2016
    Copy the full SHA
    527c955 View commit details
  13. Copy the full SHA
    4b0796c View commit details

Commits on Nov 13, 2016

  1. Fixed issue where trying to create a dir throws error

    Fixed issue where trying to create a dir throws error, this is because the key 'Body' is always expected by the upload method
    epic-kaso authored Nov 13, 2016
    Copy the full SHA
    810e2f6 View commit details
  2. Merge pull request #3 from kasoprecede47/patch-1

    Fixed issue where trying to create a dir throws error
    mhetreramesh authored Nov 13, 2016
    Copy the full SHA
    33f9121 View commit details
  3. Copy the full SHA
    1225f11 View commit details

Commits on Mar 1, 2017

  1. Written tests and some more methods on adapter

    Signed-off-by: Ramesh Mhetre <ramesh.mhetre@vegfru.com>
    Ramesh Mhetre committed Mar 1, 2017
    Copy the full SHA
    c3cd637 View commit details
  2. Copy the full SHA
    4e5dce9 View commit details
  3. Copy the full SHA
    e7e23a1 View commit details
  4. Removed die from a library

    Signed-off-by: Ramesh Mhetre <mhetreramesh@gmail.com>
    mhetreramesh committed Mar 1, 2017
    Copy the full SHA
    8a31f2e View commit details
  5. Copy the full SHA
    b210e71 View commit details
  6. Merge tag '1.0.6' into develop

    Removed die from code
    mhetreramesh committed Mar 1, 2017
    Copy the full SHA
    c5a057e View commit details

Commits on Mar 2, 2017

  1. Written more test

    Signed-off-by: Ramesh Mhetre <mhetreramesh@gmail.com>
    mhetreramesh committed Mar 2, 2017
    Copy the full SHA
    eb68827 View commit details
  2. Copy the full SHA
    6bd5f64 View commit details
  3. Merge tag '1.0.7' into develop

    Test made proper
    mhetreramesh committed Mar 2, 2017
    Copy the full SHA
    70200df View commit details

Commits on May 5, 2017

  1. Add read support

    Add support using the client to read and return a file.
    kenrowland committed May 5, 2017
    5
    Copy the full SHA
    bf93463 View commit details

Commits on May 8, 2017

  1. Merge pull request #5 from kenrowland/add-read-support

    Add read support
    mhetreramesh authored May 8, 2017
    Copy the full SHA
    5ef761c View commit details

Commits on Jul 27, 2017

  1. Fixed a broken test

    Signed-off-by: Ramesh Mhetre <mhetreramesh@gmail.com>
    mhetreramesh committed Jul 27, 2017
    Copy the full SHA
    b314db3 View commit details
  2. Copy the full SHA
    fe3a153 View commit details
  3. Merge tag '1.0.8' into develop

    Finished broken test
    mhetreramesh committed Jul 27, 2017
    Copy the full SHA
    920aa20 View commit details

Commits on Jul 29, 2017

  1. Fixed broken tests, moved repo to new account

    Signed-off-by: Ramesh Mhetre <mhetreramesh@gmail.com>
    mhetreramesh committed Jul 29, 2017
    Copy the full SHA
    27721c3 View commit details
  2. Copy the full SHA
    7289b3f View commit details
  3. Merge tag '1.0.9' into develop

    Finished hotfix 1.0.9
    mhetreramesh committed Jul 29, 2017
    Copy the full SHA
    16eff4c View commit details
  4. Merge pull request #6 from mhetreramesh/master

    Fixed broken test
    mhetreramesh authored Jul 29, 2017
    Copy the full SHA
    dcad808 View commit details

Commits on Aug 5, 2017

  1. Copy the full SHA
    47f8587 View commit details
  2. Merge pull request #7 from isaackwan/add-readStream

    implemented readStream() interface
    mhetreramesh authored Aug 5, 2017
    Copy the full SHA
    654ea35 View commit details

Commits on Aug 6, 2017

  1. Copy the full SHA
    639eff4 View commit details
  2. Merge pull request #8 from isaackwan/dev/listContents

    matched listContents() to Flysystem interface behaviour
    mhetreramesh authored Aug 6, 2017
    Copy the full SHA
    822960b View commit details

Commits on Aug 19, 2017

  1. Copy the full SHA
    f6efdff View commit details
  2. Merge pull request #1 from mjrider/patch-1

    add mandatory variable to example
    mhetreramesh authored Aug 19, 2017
    Copy the full SHA
    893dffb View commit details

Commits on Dec 20, 2017

  1. New B2 Client added

    Signed-off-by: Ramesh Mhetre <mhetreramesh@gmail.com>
    mhetreramesh committed Dec 20, 2017
    Copy the full SHA
    71aaaf0 View commit details
  2. Copy the full SHA
    3f753cb View commit details
  3. Conflict resolved

    Signed-off-by: Ramesh Mhetre <mhetreramesh@gmail.com>
    mhetreramesh committed Dec 20, 2017
    Copy the full SHA
    1837052 View commit details

Commits on Jun 29, 2018

  1. Backblaze SDK updated

    Signed-off-by: Ramesh Mhetre <ram@tradebyte.biz>
    Ramesh Mhetre committed Jun 29, 2018
    Copy the full SHA
    dc1c223 View commit details
  2. Conflict fixed

    Signed-off-by: Ramesh Mhetre <ram@tradebyte.biz>
    Ramesh Mhetre committed Jun 29, 2018
    Copy the full SHA
    ed26315 View commit details
  3. Merge pull request #12 from mhetreramesh/master

    New SDK updated
    mhetreramesh authored Jun 29, 2018
    Copy the full SHA
    6265bd6 View commit details
  4. Removed support for php 5.5

    Signed-off-by: Ramesh Mhetre <ram@tradebyte.biz>
    Ramesh Mhetre committed Jun 29, 2018
    Copy the full SHA
    fd1f003 View commit details
  5. Copy the full SHA
    acec0d8 View commit details
Showing with 336 additions and 53 deletions.
  1. +3 −0 .gitignore
  2. +33 −0 .scrutinizer.yml
  3. +2 −2 .travis.yml
  4. +24 −9 README.md
  5. +4 −2 composer.json
  6. +1 −1 phpunit.php
  7. +96 −33 src/BackblazeAdapter.php
  8. +173 −6 tests/BackblazeAdapterTests.php
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,3 +2,6 @@ build
composer.lock
docs
vendor
coverage
coverage.xml
.idea
33 changes: 33 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
filter:
paths: [src/*]
checks:
php:
code_rating: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true
tools:
php_code_coverage: true
php_code_sniffer:
config:
standard: PSR2
filter:
paths: ['src']
php_loc:
enabled: true
php_cpd:
enabled: true
build:
environment:
php:
version: 7.2
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: php

php:
- 5.5
- 5.6
- hhvm
- '7.1'
- nightly

install:
- travis_retry composer install --no-interaction --prefer-source
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,11 +3,13 @@
[![Author](http://img.shields.io/badge/author-@mhetreramesh-blue.svg?style=flat-square)](https://twitter.com/mhetreramesh)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/mhetreramesh/flysystem-backblaze.svg?style=flat-square)](https://packagist.org/packages/mhetreramesh/flysystem-backblaze)
[![Software License][ico-license]](LICENSE.md)
[![Build Status](https://img.shields.io/travis/mhetreramesh/flysystem-backblaze/master.svg?style=flat-square)](https://travis-ci.org/mhetreramesh/flysystem-backblaze)
[![Build Status](https://img.shields.io/travis/gliterd/flysystem-backblaze/master.svg?style=flat-square)](https://travis-ci.org/gliterd/flysystem-backblaze)
[![Coverage Status][ico-scrutinizer]][link-scrutinizer]
[![Quality Score][ico-code-quality]][link-code-quality]
[![Total Downloads](https://img.shields.io/packagist/dt/mhetreramesh/flysystem-backblaze.svg?style=flat-square)](https://packagist.org/packages/mhetreramesh/flysystem-backblaze)

Visit (https://secure.backblaze.com/b2_buckets.htm) and get your account id, application key.

The Backblaze adapter gives the possibility to use the Flysystem filesystem abstraction library with backblaze. It uses the [Backblaze B2 SDK](https://github.com/cwhite92/b2-sdk-php) to communicate with the API.

## Install
@@ -23,13 +25,26 @@ $ composer require mhetreramesh/flysystem-backblaze
``` php
use Mhetreramesh\Flysystem\BackblazeAdapter;
use League\Flysystem\Filesystem;
use ChrisWhite\B2\Client;
use BackblazeB2\Client;

$client = new Client($accountId, $applicationKey);
$adapter = new BackblazeAdapter($client);
$adapter = new BackblazeAdapter($client,$bucketName);

$filesystem = new Filesystem($adapter);
```
## Using ApplicationKey instead of MasterKey
If you specify only the $bucketName when creating the BackblazeAdapter, your application key must be the master key.
However, if you specify both bucket name and bucket id, you do not need the master key and can use a single-bucket key.
Fetch your bucket id using the [b2 command line tool](https://www.backblaze.com/b2/docs/quick_command_line.html) `b2 get-bucket <bucketName>`
``` php
$client = new Client($accountId, $applicationKey);
$adapter = new BackblazeAdapter($client, $bucketName, $bucketId);
```


## Documentation
Here is the [complete guide](https://flysystem.thephpleague.com/docs/usage/filesystem-api/) of all available options.


## Change log

@@ -60,15 +75,15 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio

[ico-version]: https://img.shields.io/packagist/v/mhetreramesh/flysystem-backblaze.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/mhetreramesh/flysystem-backblaze/master.svg?style=flat-square
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/mhetreramesh/flysystem-backblaze.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/mhetreramesh/flysystem-backblaze.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/gliterd/flysystem-backblaze/master.svg?style=flat-square
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/gliterd/flysystem-backblaze.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/gliterd/flysystem-backblaze.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/mhetreramesh/flysystem-backblaze.svg?style=flat-square

[link-packagist]: https://packagist.org/packages/mhetreramesh/flysystem-backblaze
[link-travis]: https://travis-ci.org/mhetreramesh/flysystem-backblaze
[link-scrutinizer]: https://scrutinizer-ci.com/g/mhetreramesh/flysystem-backblaze/code-structure
[link-code-quality]: https://scrutinizer-ci.com/g/mhetreramesh/flysystem-backblaze
[link-travis]: https://travis-ci.org/gliterd/flysystem-backblaze
[link-scrutinizer]: https://scrutinizer-ci.com/g/gliterd/flysystem-backblaze/code-structure
[link-code-quality]: https://scrutinizer-ci.com/g/gliterd/flysystem-backblaze
[link-downloads]: https://packagist.org/packages/mhetreramesh/flysystem-backblaze
[link-author]: https://github.com/mhetreramesh
[link-contributors]: ../../contributors
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -14,9 +14,11 @@
}
],
"require": {
"php": ">=5.5.0",
"php": "^7.2",
"league/flysystem": "~1.0",
"cwhite92/b2-sdk-php" : "^1.2"
"gliterd/backblaze-b2": ">=1.5.0",
"psr/http-message-implementation": "*",
"mikey179/vfsstream": "*"
},
"require-dev": {
"phpunit/phpunit" : "~4.0||~5.0",
2 changes: 1 addition & 1 deletion phpunit.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

require __DIR__.'/vendor/autoload.php';
require __DIR__.'/vendor/autoload.php';
Loading