Skip to content

Commit f978a83

Browse files
authored
prerelease 2.4.1 (#241)
1 parent 88a7e56 commit f978a83

File tree

119 files changed

+2269
-2284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+2269
-2284
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ vendor/
66
index.php
77
coverage.xml
88
.phpunit.result.cache
9+
local_test_file
10+
test_tmp_file

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ php:
44
notifications:
55
email:
66
recipients:
7-
8-
7+
98

109
env:
1110
global:

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
cos-php-sdk-v5 Upgrade Guide
22
====================
3+
2.4.0 to 2.4.1
4+
---------
5+
- 增加桶Bucket、GetBucket对应Sample详细注解
6+
- 对部分传入参数进行检查
7+
- 添加doesObjectExist、doesBucketExist对应Sample
8+
- 调整整体项目架构,修复composer依赖问题
9+
- 调整UT
10+
311
2.3.4 to 2.4.0
412
---------
513
- 新增文档转码功能,包括提交、查询、拉取文档预览任务

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"config": {
4343
"platform-check": false
4444
},
45+
4546
"scripts": {
4647
"test": [
4748
"@putenv XDEBUG_MODE=coverage",

phpunit.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?xml version="1.0"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3-
<coverage>
4-
<include>
5-
<directory suffix=".php">src</directory>
6-
</include>
7-
<report>
8-
<clover outputFile="coverage.xml"/>
9-
</report>
10-
</coverage>
3+
<filter>
4+
<whitelist>
5+
<directory suffix=".php">./src</directory>
6+
</whitelist>
7+
</filter>
8+
<logging>
9+
<log type="coverage-clover" target="coverage.xml" />
10+
</logging>
1111
<testsuites>
12-
<testsuite name="cos">
13-
<directory suffix="Test.php">tests</directory>
14-
</testsuite>
12+
<testsuite name="CosTest">
13+
<directory>./tests</directory>
14+
</testsuite>
1515
</testsuites>
1616
</phpunit>

sample/abortMultipartUpload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'secretKey' => $secretKey)));
1515
try {
1616
$result = $cosClient->abortMultipartUpload(array(
17-
'Bucket' => 'examplebucket-125000000', //格式:BucketName-APPID
17+
'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket
1818
'Key' => 'exampleobject',
1919
'UploadId' => 'string',
2020
));

sample/appendObject.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
$local_path = "/data/exampleobject";
1616
try {
1717
$result = $cosClient->appendObject(array(
18-
'Bucket' => 'examplebucket-125000000', //格式:BucketName-APPID
18+
'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket
1919
'Key' => 'exampleobject',
2020
'Position' => 0, //追加对象位置
2121
'Body' => fopen($local_path, 'rb'),//读取文件内容
2222
));
2323
/*
2424
$result = $cosClient->appendObject(array(
25-
'Bucket' => 'examplebucket-125000000', //格式:BucketName-APPID
25+
'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket
2626
'Key' => 'exampleobject',
2727
'Position' => (integer)$result['Position'], //取出上一个追加文件的对象位置进行追加
2828
'Body' => "hello", //文件流

sample/blindWatermark.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
$blindWatermarkTemplate->setType(2);
1919
$blindWatermarkTemplate->setLevel(3);
2020
$result = $cosClient->getObject(array(
21-
'Bucket' => 'examplebucket-125000000', //格式:BucketName-APPID
21+
'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket
2222
'Key' => 'exampleobject',
2323
'ImageHandleParam' => $blindWatermarkTemplate->queryString(),
2424
'SaveAs' => '/data/exampleobject'

sample/catchException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'secretKey' => $secretKey)));
1515
try {
1616
$result = $cosClient->getBucketAcl(array(
17-
'Bucket' => 'examplebucket-125000000' //格式:BucketName-APPID
17+
'Bucket' => 'examplebucket-125000000' //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket
1818
));
1919
// 请求成功
2020
print_r($result);

sample/ciTransformation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
$ciParamTransformation->addRule($imageMogrTemplate);
2626
$ciParamTransformation->addRule($imageViewTemplate);
2727
$result = $cosClient->getObject(array(
28-
'Bucket' => 'examplebucket-125000000', //格式:BucketName-APPID
28+
'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket
2929
'Key' => 'exampleobject',
3030
'ImageHandleParam' => $ciParamTransformation->queryString(),
3131
'SaveAs' => '/data/exampleobject',

0 commit comments

Comments
 (0)