From 2bf5cbb80f1b769dd7e323747537bc78691a54b2 Mon Sep 17 00:00:00 2001 From: Simon Bowen Date: Fri, 25 Oct 2019 12:03:40 +0100 Subject: [PATCH 1/5] Bumped mockery and fixed failing test. --- composer.json | 2 +- tests/PresignedTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 22332b0..3488038 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ }, "require-dev": { "phpunit/phpunit": "^6.1", - "mockery/mockery": "0.9.*" + "mockery/mockery": "^1.2.4" }, "autoload": { "psr-4": { diff --git a/tests/PresignedTest.php b/tests/PresignedTest.php index f02e5cb..e51042d 100644 --- a/tests/PresignedTest.php +++ b/tests/PresignedTest.php @@ -68,7 +68,7 @@ public function testGetClient() public function testGetSimpleUploadUrl() { $filename = 'filename.extension'; - $host = 'bucket.s3-ap-northeast-1.amazonaws.com'; + $host = 'bucket.s3.ap-northeast-1.amazonaws.com'; $path = "/prefix/{$filename}"; $s3Presigned = $this->getS3Presigned(); $result = $s3Presigned->getSimpleUploadUrl($filename, 10, [], true); From 21247a6dd0ff102d32fede9b27ec287ae0f3166f Mon Sep 17 00:00:00 2001 From: Simon Bowen Date: Fri, 25 Oct 2019 12:06:26 +0100 Subject: [PATCH 2/5] Added a travis config. --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..cbe4aa0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: php +php: + - '7.1' + - '7.2' + - '7.3' + - nightly \ No newline at end of file From c208ff6aabbda233fcee543204ed5f5ed186b5e1 Mon Sep 17 00:00:00 2001 From: Simon Bowen Date: Fri, 25 Oct 2019 12:11:29 +0100 Subject: [PATCH 3/5] Travis CI fixes. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cbe4aa0..8acd926 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,4 +3,6 @@ php: - '7.1' - '7.2' - '7.3' - - nightly \ No newline at end of file + - nightly +before_script: composer install +script: vendor/bin/phpunit ./tests \ No newline at end of file From 4699eea4a7c5f080cb8fde5bcbef40d442a6f647 Mon Sep 17 00:00:00 2001 From: Simon Bowen Date: Fri, 25 Oct 2019 12:13:22 +0100 Subject: [PATCH 4/5] Remove the nightly from travis. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8acd926..ea04555 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,5 @@ php: - '7.1' - '7.2' - '7.3' - - nightly before_script: composer install script: vendor/bin/phpunit ./tests \ No newline at end of file From ead4f92c4daa7a480e95f44eb0beb4006d220bd0 Mon Sep 17 00:00:00 2001 From: Simon Bowen Date: Fri, 25 Oct 2019 12:14:11 +0100 Subject: [PATCH 5/5] Added the build status to the README. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9c67ae0..6e49d87 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ AWS S3 Presigned SDK ========== ![php-badge](https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg) [![packagist-badge](https://img.shields.io/packagist/v/unisharp/s3-presigned.svg)](https://packagist.org/packages/unisharp/s3-presigned) +[![Build Status](https://travis-ci.org/simonbowen/s3-presigned.svg?branch=master)](https://travis-ci.org/simonbowen/s3-presigned) ## Approach Traditionally to upload a file from users to a private S3 bucket needs two internet connections. One is from client to your own server, and the other is from your server to S3 bucket. Using pre-signed upload can solve this problem. Your server issues pre-signed upload url for client to upload in advance, and the client can upload his file to S3 bucket directly within an authorized time period. This package wraps S3 pre-signed api for PHP and Laravel.