From 659ac6c77e2035aa5ed7d282e75c74b2c7c4bde1 Mon Sep 17 00:00:00 2001 From: shukriYusof Date: Wed, 25 Oct 2023 10:08:03 +0800 Subject: [PATCH 1/9] chore: add another example for facade --- README.md | 14 +++++++++ src/Rules/VimeoVideoIdValidationRule.php | 36 ++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 src/Rules/VimeoVideoIdValidationRule.php diff --git a/README.md b/README.md index 4c97877..e877072 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,20 @@ $vimeo->upload('/home/aaron/foo.mp4'); // Want to use a facade? Vimeo::uploadImage('/videos/123/images', '/home/aaron/bar.png', true); +Vimeo::upload($video, [ + 'name' => NAME, + 'privacy.view' => [ + 'anybody', + 'contacts', + 'disable', + 'nobody', + 'password', + 'unlisted', + 'users' + ], + 'folder_uri' => 'https://vimeo.com/manage/folders_name/folder_id' +]); +Vimeo::request('/videos/'. $value, ['per_page' => 2], 'GET'); ``` [![Build Status](https://img.shields.io/travis/vimeo/laravel/master.svg?style=flat)](https://travis-ci.org/vimeo/laravel) diff --git a/src/Rules/VimeoVideoIdValidationRule.php b/src/Rules/VimeoVideoIdValidationRule.php new file mode 100644 index 0000000..b9052ff --- /dev/null +++ b/src/Rules/VimeoVideoIdValidationRule.php @@ -0,0 +1,36 @@ + Date: Wed, 25 Oct 2023 13:02:46 +0800 Subject: [PATCH 2/9] update return type as vimeo/plasm suggested --- src/VimeoManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VimeoManager.php b/src/VimeoManager.php index 5aebb16..289083e 100644 --- a/src/VimeoManager.php +++ b/src/VimeoManager.php @@ -57,9 +57,9 @@ public function __construct(Repository $config, VimeoFactory $factory) * * @param array $config * - * @return \Vimeo\Vimeo + * @return object */ - protected function createConnection(array $config): Vimeo + protected function createConnection(array $config): object { /** @var string[] $config */ return $this->factory->make($config); From 09a6c26c834b5d5337f1c084ac3d01f771042080 Mon Sep 17 00:00:00 2001 From: shukriYusof Date: Wed, 25 Oct 2023 13:03:22 +0800 Subject: [PATCH 3/9] add laravel/lumen-framework support to version 10 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index af61de3..cb2a237 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "mockery/mockery": "^1.0", "phpunit/phpunit": "^7.0|^9.5.10", "psalm/plugin-laravel": "^1.4.0|^1.1|^2.7", - "laravel/lumen-framework": "^5.7", + "laravel/lumen-framework": "^5.8|^6.0|^7.0|^8.0|^9.0|^10.0", "vimeo/psalm": "^3.17|^4.19|^5.6" }, "autoload": { From 42b12f0554ff0f3abd292f0f03c2493d3c9aef40 Mon Sep 17 00:00:00 2001 From: shukriYusof Date: Wed, 25 Oct 2023 13:03:39 +0800 Subject: [PATCH 4/9] update php unit --- phpunit.xml | 37 +++++++++++-------------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 5246462..3068f6a 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,28 +1,13 @@ - - - - ./tests - - - - - ./src - - + + + + ./src + + + + + ./tests + + From dc8eef6ba1d206298fe1cddc274a4c89c434b0df Mon Sep 17 00:00:00 2001 From: shukriYusof Date: Wed, 25 Oct 2023 13:05:16 +0800 Subject: [PATCH 5/9] update getServiceProviderClass to meet requirement GrahamCampbell abstract package test case --- tests/AbstractTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index 95a415f..7706fd8 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -36,7 +36,7 @@ abstract class AbstractTestCase extends AbstractPackageTestCase * * @return string */ - protected function getServiceProviderClass($app) + protected function getServiceProviderClass() { return VimeoServiceProvider::class; } From 05682d4456f807f6ab17230b48b83dafd5c11e3c Mon Sep 17 00:00:00 2001 From: shukriYusof Date: Wed, 25 Oct 2023 13:07:07 +0800 Subject: [PATCH 6/9] add .phpunit.result.cache to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 81b9258..e17c7ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ composer.lock phpunit.xml vendor +.phpunit.result.cache From a659a3928c7727253c3cd56e0b50bb29063a6da3 Mon Sep 17 00:00:00 2001 From: shukriYusof Date: Wed, 25 Oct 2023 13:08:46 +0800 Subject: [PATCH 7/9] chore: cleanup code phpunit.xml --- phpunit.xml | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 3068f6a..06c526d 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,13 +1,30 @@ - - - - ./src - - - - - ./tests - - + + + + ./src + + + + + ./tests + + From b0f466d79fed538b46dab0d0b509e236dcf959b2 Mon Sep 17 00:00:00 2001 From: shukriYusof Date: Wed, 25 Oct 2023 13:09:46 +0800 Subject: [PATCH 8/9] chore: rename file --- src/Rules/VideoIdRule.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/Rules/VideoIdRule.php diff --git a/src/Rules/VideoIdRule.php b/src/Rules/VideoIdRule.php new file mode 100644 index 0000000..938bd30 --- /dev/null +++ b/src/Rules/VideoIdRule.php @@ -0,0 +1,36 @@ + Date: Wed, 25 Oct 2023 13:10:04 +0800 Subject: [PATCH 9/9] chore: rename file --- src/Rules/VimeoVideoIdValidationRule.php | 36 ------------------------ 1 file changed, 36 deletions(-) delete mode 100644 src/Rules/VimeoVideoIdValidationRule.php diff --git a/src/Rules/VimeoVideoIdValidationRule.php b/src/Rules/VimeoVideoIdValidationRule.php deleted file mode 100644 index b9052ff..0000000 --- a/src/Rules/VimeoVideoIdValidationRule.php +++ /dev/null @@ -1,36 +0,0 @@ -