Giter VIP home page Giter VIP logo

qingstor-sdk-php's People

Contributors

wangmq0719 avatar xuanwo avatar yu31 avatar yuebin1009 avatar zhaohuxing avatar zlink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

qingstor-sdk-php's Issues

php7.0 签名异常

count(): Parameter must be an array or an object that implements Countable {"exception":"[object] (ErrorException(code: 0): count(): Parameter must be an array or an object that implements Countable at /Users/yuebin/PhpstormProjects/code/php/invoice/vendor/yunify/qingstor-sdk/src/Builder.php:138)

Bucket.getObjectRequest 第三个参数$options = []

Install via composer

I want to install yunify/qingstor-sdk via composer and I get error:

[InvalidArgumentException] Could not find package yunify/qingstor-sdk at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability

getPolicy() 和 putPolicy() 有一处不合理的地方

如果设置了 Bucket 本身的存储空间策略,比如 list_objects。那么 $res = $bucket->getPolicy() 之后 $res->statement[0]['resource'] 为空数组:

array(1) {
  [0]=>
  array(5) {
    ["action"]=>
    array(1) {
      [0]=>
      string(12) "list_objects"
    }
    ["effect"]=>
    string(4) "deny"
    ["resource"]=>
    array(0) {
    }
    ["id"]=>
    string(12) "backup-black"
    ["user"]=>
    array(1) {
      [0]=>
      string(1) "*"
    }
  }
}

但是,在并没有修改以上 $res 的情况下,执行$bucket->putPolicy(array('statement' => $res->statement)) 时却:

PHP Fatal error:  Uncaught QingStor\SDK\Exception\ParameterRequiredException: [0]: resource is required in statement.
  thrown in /var/www/html/vendor/yunify/qingstor-sdk/src/QingStor/Bucket.php on line 1766

这里除非手动修改 get 到的 policy,否则没有办法用该 policy 进行新的设置,给 SDK 的使用造成了一定麻烦。

guzzlehttp/guzzle 依赖包版本过低

安包装时遇到 guzzlehttp/guzzle 包依赖版本过低问题, 建议升级一下包,现在 laravel 框架默认的 guzzle 包已经到 7.3.0 了
安装报错如下:

yunify/qingstor-sdk v2.2.6 requires guzzlehttp/guzzle ~5|~6.3 -> found guzzlehttp/guzzle[5.0.0, ..., 5.3.x-dev, 6.3.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (7.3.0)

[BUG] Docs' error

docs/qingstor_service_usage.md missed ; in line 36, 42.
acl miss the right quote in line 56.
And bucket should be change into $test_bucket in line 42.

Ref: #2 (comment)

Using Content-MD5

I set a Content-MD5 value which has no relation to the content in request header when I use putObject, but still can get 201 code in response.

$res = $test_bucket->putObject(
    "test_object_key.jpg",
    array(
        "body" => file_get_contents("/home/gsfish/Pictures/37781215_p0.jpg"),
        "Content-Type" => "image/jpeg",
        "Content-MD5" => base64_encode(md5("aaa", true))
    )
);
echo $res->getStatusCode() . "\n";

命名冲突

Fatal error: Cannot use GuzzleHttp\Psr7\Request as Request because the name is already in use in XXX/vendor/yunify/qingstor-sdk/src/Builder.php on line 20

Bucket.php总是报notice

PHP Notice: Undefined index: X-QS-Storage-Class in /var/www/html/vendor/yunify/qingstor-sdk/src/QingStor/Bucket.php on line 3486

Bugs in documentation

README.md missed ";" in line 44, 48 which may raise syntax error.
docs/installation.md should change "npm" into "composer" in line 5.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.