qingstor / qingstor-sdk-php Goto Github PK
View Code? Open in Web Editor NEWThe official QingStor SDK for the PHP programming language.
License: Apache License 2.0
The official QingStor SDK for the PHP programming language.
License: Apache License 2.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 = []
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
如果设置了 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 包依赖版本过低问题, 建议升级一下包,现在 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)
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)
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
PHP Notice: Undefined index: X-QS-Storage-Class in /var/www/html/vendor/yunify/qingstor-sdk/src/QingStor/Bucket.php on line 3486
README.md
missed ";" in line 44, 48 which may raise syntax error.
docs/installation.md
should change "npm" into "composer" in line 5.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.