From de7d7c7722c79d378e1ab0d99801329746f72e22 Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Mon, 16 Aug 2021 16:16:01 +0100 Subject: [PATCH 01/22] Doc corrections --- docs/File.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/File.md b/docs/File.md index dc17ff3..4fe1804 100644 --- a/docs/File.md +++ b/docs/File.md @@ -21,18 +21,15 @@ Rather obtain an instance from `\SpacesAPI\Space::list()`, `\SpacesAPI\Spaces::f | Name | Description | |------|-------------| |[__construct](#file__construct)|| -|[__get](#file__get)|Magic getter to make the properties read-only| |[copy](#filecopy)|Copy the file on the space| |[delete](#filedelete)|Permanently delete this file| |[download](#filedownload)|Download the file to a local location| |[getContents](#filegetcontents)|Get the file contents as a string| |[getSignedURL](#filegetsignedurl)|Get a signed URL, which will work for private files| -|[getURL](#filegeturl)|Get the public URL -This URL will not work if the file is private| +|[getURL](#filegeturl)|Get the public URL. This URL will not work if the file is private| |[isPublic](#fileispublic)|Is this file publicly accessible| |[makePrivate](#filemakeprivate)|Make file non-publicly accessible| |[makePublic](#filemakepublic)|Make file publicly accessible| -|[pascalCaseToCamelCase](#filepascalcasetocamelcase)|| From aa5450538bbe0d659021c4d4a44826d3ffc26189 Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Tue, 17 Aug 2021 12:43:07 +0100 Subject: [PATCH 02/22] Made file and space existence validation optional --- SpacesAPI/File.php | 13 +++++++------ SpacesAPI/Space.php | 43 +++++++++++++++++++++++++++---------------- SpacesAPI/Spaces.php | 4 ++-- docs/File.md | 9 +++------ docs/Space.md | 10 +++++----- 5 files changed, 44 insertions(+), 35 deletions(-) diff --git a/SpacesAPI/File.php b/SpacesAPI/File.php index f824b8a..6917d3e 100644 --- a/SpacesAPI/File.php +++ b/SpacesAPI/File.php @@ -46,20 +46,21 @@ class File private $_content_length; /** - * @param \SpacesAPI\Space $space - * @param string $filename - * @param array $info + * @param \SpacesAPI\Space $space An instance of `\SpacesAPI\Space` + * @param string $filename The filename of a file + * @param array $info Any information already known about the file (eg content_length, content_type, etc). Default `[]` + * @param bool $validate Check that the file exists * - * @throws \SpacesAPI\Exceptions\FileDoesntExistException + * @throws \SpacesAPI\Exceptions\FileDoesntExistException If validation is `true` and the file doesn't exist */ - public function __construct(Space $space, string $filename, array $info = []) + public function __construct(Space $space, string $filename, array $info = [], bool $validate = true) { $this->space = $space; $this->space_name = $space->getName(); $this->s3 = $space->getS3Client(); $this->_filename = $filename; - if (!$this->s3->doesObjectExist($this->space_name, $filename)) { + if ($validate && !$this->s3->doesObjectExist($this->space_name, $filename)) { throw new FileDoesntExistException("File $filename doesn't exist"); } diff --git a/SpacesAPI/Space.php b/SpacesAPI/Space.php index 0b55f8a..217fa67 100644 --- a/SpacesAPI/Space.php +++ b/SpacesAPI/Space.php @@ -36,15 +36,16 @@ class Space * * @param \Aws\S3\S3Client $s3 An authenticated S3Client instance * @param string $name Space name + * @param bool $validate Check that the space exists * - * @throws \SpacesAPI\Exceptions\SpaceDoesntExistException + * @throws \SpacesAPI\Exceptions\SpaceDoesntExistException If validation is `true` and the space doesn't exist */ - public function __construct(S3Client $s3, string $name) + public function __construct(S3Client $s3, string $name, bool $validate = true) { $this->s3 = $s3; $this->name = $name; - if (!$this->s3->doesBucketExist($name)) { + if ($validate && !$this->s3->doesBucketExist($name)) { throw new SpaceDoesntExistException("Space '$this->name' does not exist"); } } @@ -233,13 +234,29 @@ class Space /** * List all files in the space (recursively) * + * @param string $directory The directory to list files in. Empty string for root directory + * + * @return array + */ + public function listFiles(string $directory = ""): array + { + $rawFiles = $this->rawListFiles($directory); + $files = []; + + foreach ($rawFiles as $fileInfo) { + $files[$fileInfo['Key']] = new File($this, $fileInfo['Key'], $fileInfo, false); + } + + return ['files' => $files]; + } + + /** * @param string $directory The directory to list files in. Empty string for root directory * @param string|null $continuationToken Used internally to work around request limits (1000 files per request) * * @return array - * @throws \SpacesAPI\Exceptions\FileDoesntExistException */ - public function listFiles(string $directory = "", ?string $continuationToken = null): array + private function rawListFiles(string $directory = "", ?string $continuationToken = null): array { $data = Result::parse( $this->s3->listObjectsV2([ @@ -252,20 +269,14 @@ class Space ]) ); - $files = [ - 'files' => [], - ]; - if (!isset($data['Contents'])) { - return $files; + return []; } - foreach ($data['Contents'] as $fileInfo) { - $files['files'][$fileInfo['Key']] = new File($this, $fileInfo['Key'], $fileInfo); - } + $files = $data['Contents']; if (isset($data["NextContinuationToken"]) && $data["NextContinuationToken"] != "") { - $files = array_merge($files['files'], $this->listFiles($directory, $data["NextContinuationToken"])['files']); + $files = array_merge($files, $this->rawListFiles($directory, $data["NextContinuationToken"])); } return $files; @@ -283,7 +294,7 @@ class Space public function uploadText(string $text, string $filename, array $params = []): File { $this->s3->upload($this->name, $filename, $text, 'private', $params); - return new File($this, $filename); + return new File($this, $filename, [], false); } /** @@ -302,7 +313,7 @@ class Space 'SourceFile' => $filepath, ]); - return new File($this, ($filename) ?: basename($filepath)); + return new File($this, ($filename) ?: basename($filepath), [], false); } /** diff --git a/SpacesAPI/Spaces.php b/SpacesAPI/Spaces.php index 3f90470..d822e8a 100644 --- a/SpacesAPI/Spaces.php +++ b/SpacesAPI/Spaces.php @@ -61,7 +61,7 @@ class Spaces $spaces = []; foreach (Result::parse($this->s3->listBuckets()['Buckets']) as $bucket) { - $spaces[$bucket['Name']] = new Space($this->s3, $bucket['Name']); + $spaces[$bucket['Name']] = new Space($this->s3, $bucket['Name'], false); } return $spaces; @@ -87,7 +87,7 @@ class Spaces throw new SpaceExistsException($e->getAwsErrorMessage()); } - return new Space($this->s3, $name); + return new Space($this->s3, $name, false); } /** diff --git a/docs/File.md b/docs/File.md index 4fe1804..f347f44 100644 --- a/docs/File.md +++ b/docs/File.md @@ -39,18 +39,15 @@ Rather obtain an instance from `\SpacesAPI\Space::list()`, `\SpacesAPI\Spaces::f **Description** ```php - __construct (\SpacesAPI\Space $space, string $filename, array $info = []) + __construct (\SpacesAPI\Space $space, string $filename, array $info = [], bool $validate = true) ``` - - - - **Parameters** * `(\SpacesAPI\Space) $space` : An instance of `\SpacesAPI\Space` * `(string) $filename` : The filename of a file * `(array) $info` : Any information already known about the file (eg content_length, content_type, etc). Default `[]` +* `(bool) $validate` : Check that the file exists. Default `true` **Return Values** @@ -58,7 +55,7 @@ Rather obtain an instance from `\SpacesAPI\Space::list()`, `\SpacesAPI\Spaces::f **Throws Exceptions** -`\SpacesAPI\Exceptions\FileDoesntExistException` : If the file doesn't exist +`\SpacesAPI\Exceptions\FileDoesntExistException` : If validation is `true` and the file doesn't exist
diff --git a/docs/Space.md b/docs/Space.md index ef23140..19c5155 100644 --- a/docs/Space.md +++ b/docs/Space.md @@ -37,7 +37,7 @@ Rather obtain an instance from `\SpacesAPI\Spaces::space()` or `\SpacesAPI\Space **Description** ```php -public __construct (\Aws\S3\S3Client $s3, string $name) +public __construct (\Aws\S3\S3Client $s3, string $name, bool $validate = true) ``` Load a space @@ -51,6 +51,8 @@ rather obtain an instance from `\SpacesAPI\Spaces::space()` or `\SpacesAPI\Space : An authenticated S3Client instance * `(string) $name` : Space name +* `(bool) $validate` +: Check that the space exists. Default `true` **Return Values** @@ -60,7 +62,7 @@ rather obtain an instance from `\SpacesAPI\Spaces::space()` or `\SpacesAPI\Space **Throws Exceptions** -`\SpacesAPI\Exceptions\SpaceDoesntExistException` : If the space doesn't exist +`\SpacesAPI\Exceptions\SpaceDoesntExistException` : If validation is `true` and the space doesn't exist
@@ -314,7 +316,7 @@ Is file listing enabled? **Description** ```php -public listFiles (string $directory, string|null $continuationToken = null) +public listFiles (string $directory = "") ``` List all files in the space (recursively) @@ -325,8 +327,6 @@ List all files in the space (recursively) * `(string) $directory` : The directory to list files in. Empty string for root directory -* `(string|null) $continuationToken` -: Used internally to work around request limits (1000 files per request). Leave this value `null` **Return Values** From 8ff8498a22eb0d1b91287dafa7fefa45a3c7d2df Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Tue, 17 Aug 2021 12:43:20 +0100 Subject: [PATCH 03/22] Version bump --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 715d5ff..6fc3700 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "sociallydev/spaces-api", "description": "Library for accessing Digital Ocean spaces", - "version":"3.1.0", + "version":"3.2.0", "type": "library", "license": "MIT", "authors": [ From 7c915822bfa0a8ff4416b7788ad62ec94c72c4ca Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Mon, 4 Oct 2021 09:35:42 +0100 Subject: [PATCH 04/22] Added privacy setting to text upload --- .github/ISSUE_TEMPLATE/BUG.yml | 7 +- SpacesAPI/Space.php | 5 +- composer.json | 2 +- composer.lock | 217 ++++++++++++++++++++------------- docs/Examples.md | 2 +- docs/Space.md | 4 +- tests/SpaceTest.php | 8 ++ 7 files changed, 151 insertions(+), 94 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/BUG.yml b/.github/ISSUE_TEMPLATE/BUG.yml index dbad7f3..beade0b 100644 --- a/.github/ISSUE_TEMPLATE/BUG.yml +++ b/.github/ISSUE_TEMPLATE/BUG.yml @@ -16,10 +16,11 @@ body: id: version attributes: label: Version - description: What version of Spaces-API is this occuring on? + description: What version of Spaces-API is this occuring on? Versions below 3 will not be fixed. Please upgrade. options: - - 2.0.1 - - 2.0.0 + - 3.2.0 + - 3.1.0 + - 3.0.0 validations: required: true - type: input diff --git a/SpacesAPI/Space.php b/SpacesAPI/Space.php index 217fa67..cffcbde 100644 --- a/SpacesAPI/Space.php +++ b/SpacesAPI/Space.php @@ -288,12 +288,13 @@ class Space * @param string $text The text to upload * @param string $filename The filepath/name to save to * @param array $params Any extra parameters. [See here](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#upload-property) + * @param bool $private True for the file to be private, false to allow public access * * @return \SpacesAPI\File */ - public function uploadText(string $text, string $filename, array $params = []): File + public function uploadText(string $text, string $filename, array $params = [], bool $private = true): File { - $this->s3->upload($this->name, $filename, $text, 'private', $params); + $this->s3->upload($this->name, $filename, $text, ($private) ? 'private' : 'public-read', $params); return new File($this, $filename, [], false); } diff --git a/composer.json b/composer.json index 6fc3700..9bcd3ca 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "sociallydev/spaces-api", "description": "Library for accessing Digital Ocean spaces", - "version":"3.2.0", + "version":"3.3.0", "type": "library", "license": "MIT", "authors": [ diff --git a/composer.lock b/composer.lock index f42afa8..ead38a8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,23 +4,74 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "77328f11e2ce84c590e531213fe931c6", + "content-hash": "1816f8accc7ad31a0207e9cb583918ae", "packages": [ { - "name": "aws/aws-sdk-php", - "version": "3.190.2", + "name": "aws/aws-crt-php", + "version": "v1.0.2", "source": { "type": "git", - "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "8ca6a5f9834de3eb3fb84b28fc12c9088bc01293" + "url": "https://github.com/awslabs/aws-crt-php.git", + "reference": "3942776a8c99209908ee0b287746263725685732" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/8ca6a5f9834de3eb3fb84b28fc12c9088bc01293", - "reference": "8ca6a5f9834de3eb3fb84b28fc12c9088bc01293", + "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/3942776a8c99209908ee0b287746263725685732", + "reference": "3942776a8c99209908ee0b287746263725685732", "shasum": "" }, "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.4.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "AWS SDK Common Runtime Team", + "email": "aws-sdk-common-runtime@amazon.com" + } + ], + "description": "AWS Common Runtime for PHP", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "crt", + "sdk" + ], + "support": { + "issues": "https://github.com/awslabs/aws-crt-php/issues", + "source": "https://github.com/awslabs/aws-crt-php/tree/v1.0.2" + }, + "time": "2021-09-03T22:57:30+00:00" + }, + { + "name": "aws/aws-sdk-php", + "version": "3.196.1", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "2845899d05c66a00d88eabbf7cf5d3dbae2da58a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2845899d05c66a00d88eabbf7cf5d3dbae2da58a", + "reference": "2845899d05c66a00d88eabbf7cf5d3dbae2da58a", + "shasum": "" + }, + "require": { + "aws/aws-crt-php": "^1.0.2", "ext-json": "*", "ext-pcre": "*", "ext-simplexml": "*", @@ -92,9 +143,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.190.2" + "source": "https://github.com/aws/aws-sdk-php/tree/3.196.1" }, - "time": "2021-08-13T18:12:28+00:00" + "time": "2021-10-01T18:23:06+00:00" }, { "name": "guzzlehttp/guzzle", @@ -810,31 +861,26 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.0.1", + "version": "v1.0.2", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb" + "reference": "84afea85c6841deeea872f36249a206e878a5de0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/7e279d2cd5d7fbb156ce46daada972355cea27bb", - "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/84afea85c6841deeea872f36249a206e878a5de0", + "reference": "84afea85c6841deeea872f36249a206e878a5de0", "shasum": "" }, "require": { - "php": "^7.0|^8.0", - "phpoption/phpoption": "^1.7.3" + "php": "^7.0 || ^8.0", + "phpoption/phpoption": "^1.8" }, "require-dev": { - "phpunit/phpunit": "^6.5|^7.5|^8.5|^9.0" + "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "psr-4": { "GrahamCampbell\\ResultType\\": "src/" @@ -847,7 +893,7 @@ "authors": [ { "name": "Graham Campbell", - "email": "graham@alt-three.com" + "email": "hello@gjcampbell.co.uk" } ], "description": "An Implementation Of The Result Type", @@ -860,7 +906,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.1" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.2" }, "funding": [ { @@ -872,7 +918,7 @@ "type": "tidelift" } ], - "time": "2020-04-13T13:17:36+00:00" + "time": "2021-08-28T21:34:50+00:00" }, { "name": "myclabs/deep-copy", @@ -934,16 +980,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.12.0", + "version": "v4.13.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143" + "reference": "50953a2691a922aa1769461637869a0a2faa3f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53", "shasum": "" }, "require": { @@ -984,9 +1030,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" }, - "time": "2021-07-21T10:44:31+00:00" + "time": "2021-09-20T12:20:58+00:00" }, { "name": "phar-io/manifest", @@ -1210,16 +1256,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.4.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", "shasum": "" }, "require": { @@ -1227,7 +1273,8 @@ "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "*" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -1253,35 +1300,35 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" }, - "time": "2020-09-17T18:55:26+00:00" + "time": "2021-10-02T14:08:47+00:00" }, { "name": "phpoption/phpoption", - "version": "1.7.5", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525" + "reference": "5455cb38aed4523f99977c4a12ef19da4bfe2a28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525", - "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/5455cb38aed4523f99977c4a12ef19da4bfe2a28", + "reference": "5455cb38aed4523f99977c4a12ef19da4bfe2a28", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0" + "php": "^7.0 || ^8.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^6.5.14 || ^7.0.20 || ^8.5.19 || ^9.5.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -1300,7 +1347,7 @@ }, { "name": "Graham Campbell", - "email": "graham@alt-three.com" + "email": "hello@gjcampbell.co.uk" } ], "description": "Option Type for PHP", @@ -1312,7 +1359,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.7.5" + "source": "https://github.com/schmittjoh/php-option/tree/1.8.0" }, "funding": [ { @@ -1324,37 +1371,37 @@ "type": "tidelift" } ], - "time": "2020-07-20T17:29:33+00:00" + "time": "2021-08-28T21:27:29+00:00" }, { "name": "phpspec/prophecy", - "version": "1.13.0", + "version": "1.14.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", + "php": "^7.2 || ~8.0, <8.2", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^6.0", + "phpspec/phpspec": "^6.0 || ^7.0", "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -1389,29 +1436,29 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + "source": "https://github.com/phpspec/prophecy/tree/1.14.0" }, - "time": "2021-03-17T13:42:18+00:00" + "time": "2021-09-10T09:02:12+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.6", + "version": "9.2.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f6293e1b30a2354e8428e004689671b83871edde" + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", - "reference": "f6293e1b30a2354e8428e004689671b83871edde", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", + "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", + "nikic/php-parser": "^4.12.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -1460,7 +1507,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" }, "funding": [ { @@ -1468,7 +1515,7 @@ "type": "github" } ], - "time": "2021-03-28T07:26:59+00:00" + "time": "2021-09-17T05:39:03+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1713,16 +1760,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.8", + "version": "9.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb" + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/191768ccd5c85513b4068bdbe99bb6390c7d54fb", - "reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "shasum": "" }, "require": { @@ -1738,7 +1785,7 @@ "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-code-coverage": "^9.2.7", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -1800,7 +1847,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.8" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" }, "funding": [ { @@ -1812,7 +1859,7 @@ "type": "github" } ], - "time": "2021-07-31T15:17:34+00:00" + "time": "2021-09-25T07:38:51+00:00" }, { "name": "sebastian/cli-parser", @@ -2992,31 +3039,31 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.3.0", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56" + "reference": "accaddf133651d4b5cf81a119f25296736ffc850" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", - "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/accaddf133651d4b5cf81a119f25296736ffc850", + "reference": "accaddf133651d4b5cf81a119f25296736ffc850", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.1", + "graham-campbell/result-type": "^1.0.2", "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.7.4", - "symfony/polyfill-ctype": "^1.17", - "symfony/polyfill-mbstring": "^1.17", - "symfony/polyfill-php80": "^1.17" + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5.1" + "phpunit/phpunit": "^7.5.20 || ^8.5.21 || ^9.5.10" }, "suggest": { "ext-filter": "Required to use the boolean validator." @@ -3039,13 +3086,11 @@ "authors": [ { "name": "Graham Campbell", - "email": "graham@alt-three.com", - "homepage": "https://gjcampbell.co.uk/" + "email": "hello@gjcampbell.co.uk" }, { "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://vancelucas.com/" + "email": "vance@vancelucas.com" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -3056,7 +3101,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.1" }, "funding": [ { @@ -3068,7 +3113,7 @@ "type": "tidelift" } ], - "time": "2021-01-20T15:23:13+00:00" + "time": "2021-10-02T19:24:42+00:00" }, { "name": "webmozart/assert", diff --git a/docs/Examples.md b/docs/Examples.md index 77c246b..0ca16bf 100644 --- a/docs/Examples.md +++ b/docs/Examples.md @@ -33,7 +33,7 @@ foreach ($files['files'] as $file) { ```php $space = new Spaces('api-key', 'api-secret')->space('my-space-name'); -$file = $space->uploadFile('./localfile.txt'); +$file = $space->uploadFile('./localfile.txt', 'remote-filename.txt'); ``` [API docs for uploading files](Space.md#spaceuploadfile) diff --git a/docs/Space.md b/docs/Space.md index 19c5155..b78b97d 100644 --- a/docs/Space.md +++ b/docs/Space.md @@ -492,7 +492,7 @@ Upload a file **Description** ```php -public uploadText (string $text, string $filename, array $params => []) +public uploadText (string $text, string $filename, array $params = [], bool $private = true) ``` Upload a string of text to file @@ -507,6 +507,8 @@ Upload a string of text to file : The filepath/name to save to * `(array) $params` : Any extra parameters. [See here](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#upload-property) +* `(bool) $private` +: True for the file to be private, false to allow public access **Return Values** diff --git a/tests/SpaceTest.php b/tests/SpaceTest.php index 6c1177f..e6cdfaa 100644 --- a/tests/SpaceTest.php +++ b/tests/SpaceTest.php @@ -71,6 +71,14 @@ class SpaceTest extends TestCase { $file = self::$space->uploadText("Lorem ipsum", "lorem-ipsum.txt"); $this->assertInstanceOf(File::class, $file); + $this->assertFalse($file->isPublic()); + } + + public function testCanPublicUploadText() + { + $file = self::$space->uploadText("Lorem ipsum", "lorem-ipsum.txt", [], false); + $this->assertInstanceOf(File::class, $file); + $this->assertTrue($file->isPublic()); } public function testCanUploadFile() From c0b1a4314181ed494379e559f81e67b5da15490b Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Tue, 8 Feb 2022 17:26:51 +0000 Subject: [PATCH 05/22] Dependency updates (minor versions only) --- composer.json | 4 +- composer.lock | 563 +++++++++++++++++++++++++++++++++++--------------- 2 files changed, 394 insertions(+), 173 deletions(-) diff --git a/composer.json b/composer.json index 9bcd3ca..b85a7a9 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ }, "require-dev": { "clean/phpdoc-md": "^0.19.1", - "phpunit/phpunit": "^9.5", - "vlucas/phpdotenv": "^5.3" + "phpunit/phpunit": "^9.5.13", + "vlucas/phpdotenv": "^v5.4.1" } } diff --git a/composer.lock b/composer.lock index ead38a8..e024185 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1816f8accc7ad31a0207e9cb583918ae", + "content-hash": "0c1d22d2479a5dae3c8909cac6e4399c", "packages": [ { "name": "aws/aws-crt-php", @@ -58,16 +58,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.196.1", + "version": "3.209.19", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "2845899d05c66a00d88eabbf7cf5d3dbae2da58a" + "reference": "8ad887dc242150d2f3b72e867ca74c7c1e3baa19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2845899d05c66a00d88eabbf7cf5d3dbae2da58a", - "reference": "2845899d05c66a00d88eabbf7cf5d3dbae2da58a", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/8ad887dc242150d2f3b72e867ca74c7c1e3baa19", + "reference": "8ad887dc242150d2f3b72e867ca74c7c1e3baa19", "shasum": "" }, "require": { @@ -77,7 +77,7 @@ "ext-simplexml": "*", "guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0", "guzzlehttp/promises": "^1.4.0", - "guzzlehttp/psr7": "^1.7.0", + "guzzlehttp/psr7": "^1.7.0|^2.0", "mtdowling/jmespath.php": "^2.6", "php": ">=5.5" }, @@ -111,12 +111,12 @@ } }, "autoload": { - "psr-4": { - "Aws\\": "src/" - }, "files": [ "src/functions.php" - ] + ], + "psr-4": { + "Aws\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -143,30 +143,31 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.196.1" + "source": "https://github.com/aws/aws-sdk-php/tree/3.209.19" }, - "time": "2021-10-01T18:23:06+00:00" + "time": "2022-02-07T19:14:57+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.3.0", + "version": "7.4.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "7008573787b430c1c1f650e3722d9bba59967628" + "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", - "reference": "7008573787b430c1c1f650e3722d9bba59967628", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79", + "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.4", - "guzzlehttp/psr7": "^1.7 || ^2.0", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.8.3 || ^2.1", "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0" + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" }, "provide": { "psr/http-client-implementation": "1.0" @@ -176,7 +177,7 @@ "ext-curl": "*", "php-http/client-integration-tests": "^3.0", "phpunit/phpunit": "^8.5.5 || ^9.3.5", - "psr/log": "^1.1" + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { "ext-curl": "Required for CURL handler support", @@ -186,7 +187,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.3-dev" + "dev-master": "7.4-dev" } }, "autoload": { @@ -202,19 +203,43 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, { "name": "Márk Sági-Kazár", "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", @@ -228,7 +253,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.3.0" + "source": "https://github.com/guzzle/guzzle/tree/7.4.1" }, "funding": [ { @@ -240,28 +265,24 @@ "type": "github" }, { - "url": "https://github.com/alexeyshockov", - "type": "github" - }, - { - "url": "https://github.com/gmponos", - "type": "github" + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" } ], - "time": "2021-03-23T11:33:13+00:00" + "time": "2021-12-06T18:43:05+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.4.1", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", "shasum": "" }, "require": { @@ -273,7 +294,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -289,10 +310,25 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle promises library", @@ -301,35 +337,52 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.1" + "source": "https://github.com/guzzle/promises/tree/1.5.1" }, - "time": "2021-03-07T09:25:29+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2021-10-22T20:56:57+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.8.2", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "dc960a912984efb74d0a90222870c72c87f10c91" + "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", - "reference": "dc960a912984efb74d0a90222870c72c87f10c91", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72", + "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3.0" }, "provide": { + "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + "bamarni/composer-bin-plugin": "^1.4.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.8 || ^9.3.10" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -337,30 +390,53 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "2.1-dev" } }, "autoload": { "psr-4": { "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, { "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "PSR-7 message implementation that also provides common utility methods", @@ -376,9 +452,23 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.8.2" + "source": "https://github.com/guzzle/psr7/tree/2.1.0" }, - "time": "2021-04-26T09:17:50+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2021-10-06T17:43:30+00:00" }, { "name": "mtdowling/jmespath.php", @@ -493,6 +583,61 @@ }, "time": "2020-06-29T06:28:15+00:00" }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, + "time": "2019-04-30T12:38:16+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -591,22 +736,92 @@ "time": "2019-03-08T08:55:37+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", + "name": "symfony/deprecation-contracts", + "version": "v2.5.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", "shasum": "" }, "require": { "php": ">=7.1" }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-12T14:48:14+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.24.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", + "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, "suggest": { "ext-mbstring": "For best performance" }, @@ -652,7 +867,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" }, "funding": [ { @@ -668,7 +883,7 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2021-11-30T18:21:41+00:00" } ], "packages-dev": [ @@ -861,16 +1076,16 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.0.2", + "version": "v1.0.4", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "84afea85c6841deeea872f36249a206e878a5de0" + "reference": "0690bde05318336c7221785f2a932467f98b64ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/84afea85c6841deeea872f36249a206e878a5de0", - "reference": "84afea85c6841deeea872f36249a206e878a5de0", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/0690bde05318336c7221785f2a932467f98b64ca", + "reference": "0690bde05318336c7221785f2a932467f98b64ca", "shasum": "" }, "require": { @@ -893,7 +1108,8 @@ "authors": [ { "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], "description": "An Implementation Of The Result Type", @@ -906,7 +1122,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.2" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.4" }, "funding": [ { @@ -918,7 +1134,7 @@ "type": "tidelift" } ], - "time": "2021-08-28T21:34:50+00:00" + "time": "2021-11-21T21:41:47+00:00" }, { "name": "myclabs/deep-copy", @@ -937,9 +1153,6 @@ "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" - }, "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", @@ -947,12 +1160,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -980,16 +1193,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.0", + "version": "v4.13.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "50953a2691a922aa1769461637869a0a2faa3f53" + "reference": "210577fe3cf7badcc5814d99455df46564f3c077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", - "reference": "50953a2691a922aa1769461637869a0a2faa3f53", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077", "shasum": "" }, "require": { @@ -1030,9 +1243,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" }, - "time": "2021-09-20T12:20:58+00:00" + "time": "2021-11-30T19:35:32+00:00" }, { "name": "phar-io/manifest", @@ -1096,16 +1309,16 @@ }, { "name": "phar-io/version", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "reference": "15a90844ad40f127afd244c0cad228de2a80052a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/phar-io/version/zipball/15a90844ad40f127afd244c0cad228de2a80052a", + "reference": "15a90844ad40f127afd244c0cad228de2a80052a", "shasum": "" }, "require": { @@ -1141,9 +1354,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" + "source": "https://github.com/phar-io/version/tree/3.1.1" }, - "time": "2021-02-23T14:00:09+00:00" + "time": "2022-02-07T21:56:48+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1200,16 +1413,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { @@ -1220,7 +1433,8 @@ "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.2" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -1250,22 +1464,22 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" }, - "time": "2020-09-03T19:13:55+00:00" + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.5.1", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", - "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", "shasum": "" }, "require": { @@ -1300,22 +1514,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" }, - "time": "2021-10-02T14:08:47+00:00" + "time": "2022-01-04T19:58:01+00:00" }, { "name": "phpoption/phpoption", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "5455cb38aed4523f99977c4a12ef19da4bfe2a28" + "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/5455cb38aed4523f99977c4a12ef19da4bfe2a28", - "reference": "5455cb38aed4523f99977c4a12ef19da4bfe2a28", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", + "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", "shasum": "" }, "require": { @@ -1323,7 +1537,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^6.5.14 || ^7.0.20 || ^8.5.19 || ^9.5.8" + "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" }, "type": "library", "extra": { @@ -1343,11 +1557,13 @@ "authors": [ { "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" }, { "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" } ], "description": "Option Type for PHP", @@ -1359,7 +1575,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.8.0" + "source": "https://github.com/schmittjoh/php-option/tree/1.8.1" }, "funding": [ { @@ -1371,20 +1587,20 @@ "type": "tidelift" } ], - "time": "2021-08-28T21:27:29+00:00" + "time": "2021-12-04T23:24:31+00:00" }, { "name": "phpspec/prophecy", - "version": "1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", "shasum": "" }, "require": { @@ -1436,29 +1652,29 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" }, - "time": "2021-09-10T09:02:12+00:00" + "time": "2021-12-08T12:19:24+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.7", + "version": "9.2.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" + "reference": "d5850aaf931743067f4bfc1ae4cbd06468400687" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", - "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d5850aaf931743067f4bfc1ae4cbd06468400687", + "reference": "d5850aaf931743067f4bfc1ae4cbd06468400687", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.12.0", + "nikic/php-parser": "^4.13.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -1507,7 +1723,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.10" }, "funding": [ { @@ -1515,20 +1731,20 @@ "type": "github" } ], - "time": "2021-09-17T05:39:03+00:00" + "time": "2021-12-05T09:12:13+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.5", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { @@ -1567,7 +1783,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { @@ -1575,7 +1791,7 @@ "type": "github" } ], - "time": "2020-09-28T05:57:25+00:00" + "time": "2021-12-02T12:48:52+00:00" }, { "name": "phpunit/php-invoker", @@ -1760,16 +1976,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.10", + "version": "9.5.13", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" + "reference": "597cb647654ede35e43b137926dfdfef0fb11743" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/597cb647654ede35e43b137926dfdfef0fb11743", + "reference": "597cb647654ede35e43b137926dfdfef0fb11743", "shasum": "" }, "require": { @@ -1820,11 +2036,11 @@ } }, "autoload": { - "classmap": [ - "src/" - ], "files": [ "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1847,11 +2063,11 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.13" }, "funding": [ { - "url": "https://phpunit.de/donate.html", + "url": "https://phpunit.de/sponsors.html", "type": "custom" }, { @@ -1859,7 +2075,7 @@ "type": "github" } ], - "time": "2021-09-25T07:38:51+00:00" + "time": "2022-01-24T07:33:35+00:00" }, { "name": "sebastian/cli-parser", @@ -2290,16 +2506,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", "shasum": "" }, "require": { @@ -2348,14 +2564,14 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" }, "funding": [ { @@ -2363,7 +2579,7 @@ "type": "github" } ], - "time": "2020-09-28T05:24:23+00:00" + "time": "2021-11-11T14:18:36+00:00" }, { "name": "sebastian/global-state", @@ -2827,21 +3043,24 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "30885182c981ab175d4d034db0f6f469898070ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, @@ -2886,7 +3105,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" }, "funding": [ { @@ -2902,20 +3121,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2021-10-20T20:35:02+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.23.1", + "version": "v1.24.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", + "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", "shasum": "" }, "require": { @@ -2932,12 +3151,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -2969,7 +3188,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" }, "funding": [ { @@ -2985,7 +3204,7 @@ "type": "tidelift" } ], - "time": "2021-07-28T13:41:28+00:00" + "time": "2021-09-13T13:58:33+00:00" }, { "name": "theseer/tokenizer", @@ -3039,16 +3258,16 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.3.1", + "version": "v5.4.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "accaddf133651d4b5cf81a119f25296736ffc850" + "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/accaddf133651d4b5cf81a119f25296736ffc850", - "reference": "accaddf133651d4b5cf81a119f25296736ffc850", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/264dce589e7ce37a7ba99cb901eed8249fbec92f", + "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f", "shasum": "" }, "require": { @@ -3071,7 +3290,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3-dev" + "dev-master": "5.4-dev" } }, "autoload": { @@ -3086,11 +3305,13 @@ "authors": [ { "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk" + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" }, { "name": "Vance Lucas", - "email": "vance@vancelucas.com" + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -3101,7 +3322,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.1" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.4.1" }, "funding": [ { @@ -3113,7 +3334,7 @@ "type": "tidelift" } ], - "time": "2021-10-02T19:24:42+00:00" + "time": "2021-12-12T23:22:04+00:00" }, { "name": "webmozart/assert", @@ -3183,5 +3404,5 @@ "php": ">=7.3" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.2.0" } From bdd06aa0b737c67e0cf1539deac6bc45cdd6af61 Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Tue, 8 Feb 2022 18:07:13 +0000 Subject: [PATCH 06/22] Updated tests to use random (md5 of unixtime) space names --- tests/FileTest.php | 10 ++++------ tests/SpaceTest.php | 10 ++++------ tests/SpacesTest.php | 14 +++++++------- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/tests/FileTest.php b/tests/FileTest.php index bf7516f..f5c7f2c 100644 --- a/tests/FileTest.php +++ b/tests/FileTest.php @@ -8,6 +8,7 @@ use SpacesAPI\Spaces; class FileTest extends TestCase { + private static $tempSpaceName; private static $space; private static $file; @@ -19,18 +20,15 @@ class FileTest extends TestCase $spaces = new Spaces($_ENV['SPACES_KEY'], $_ENV['SPACES_SECRET']); - try { - $spaces->space('spaces-api-test')->destroy(); - } catch (SpaceDoesntExistException $e) { - } + self::$tempSpaceName = md5(time()); - self::$space = $spaces->create('spaces-api-test'); + self::$space = $spaces->create(self::$tempSpaceName); self::$file = self::$space->uploadText('Lorem ipsum', 'lorem-ipsum.txt'); } public static function tearDownAfterClass(): void { - (new Spaces($_ENV['SPACES_KEY'], $_ENV['SPACES_SECRET']))->space('spaces-api-test')->destroy(); + self::$space->destroy(); } public function testCanUpdatePrivacy() diff --git a/tests/SpaceTest.php b/tests/SpaceTest.php index e6cdfaa..f416539 100644 --- a/tests/SpaceTest.php +++ b/tests/SpaceTest.php @@ -9,6 +9,7 @@ use SpacesAPI\Spaces; class SpaceTest extends TestCase { + private static $tempSpaceName; private static $space; public static function setUpBeforeClass(): void @@ -19,17 +20,14 @@ class SpaceTest extends TestCase $spaces = new Spaces($_ENV['SPACES_KEY'], $_ENV['SPACES_SECRET']); - try { - $spaces->space('spaces-api-test')->destroy(); - } catch (SpaceDoesntExistException $e) { - } + self::$tempSpaceName = md5(time()); - self::$space = $spaces->create('spaces-api-test'); + self::$space = $spaces->create(self::$tempSpaceName); } public static function tearDownAfterClass(): void { -// (new Spaces($_ENV['SPACES_KEY'], $_ENV['SPACES_SECRET']))->space('spaces-api-test')->destroy(); + self::$space->destroy(); } public function testCanUpdateSpacePrivacy() diff --git a/tests/SpacesTest.php b/tests/SpacesTest.php index 765d85f..9b9a00a 100644 --- a/tests/SpacesTest.php +++ b/tests/SpacesTest.php @@ -10,21 +10,21 @@ use SpacesAPI\Spaces; class SpacesTest extends TestCase { + private static $tempSpaceName; + public static function setUpBeforeClass(): void { $dotenv = Dotenv::createImmutable(__DIR__ . "/.."); $dotenv->load(); $dotenv->required(['SPACES_KEY', 'SPACES_SECRET']); - try { - (new Spaces($_ENV['SPACES_KEY'], $_ENV['SPACES_SECRET']))->space('spaces-api-test')->destroy(); - } catch (SpaceDoesntExistException $e) { - } + // This should hopefully always be unique amongst all DO spaces + self::$tempSpaceName = md5(time()); } public static function tearDownAfterClass(): void { - (new Spaces($_ENV['SPACES_KEY'], $_ENV['SPACES_SECRET']))->space('spaces-api-test')->destroy(); + (new Spaces($_ENV['SPACES_KEY'], $_ENV['SPACES_SECRET']))->space(self::$tempSpaceName)->destroy(); } public function testAuthenticationCanFail() @@ -53,7 +53,7 @@ class SpacesTest extends TestCase */ public function testCanCreateSpace(Spaces $spaces) { - $space = $spaces->create('spaces-api-test'); + $space = $spaces->create(self::$tempSpaceName); $this->assertInstanceOf(Space::class, $space); return $space; @@ -69,7 +69,7 @@ class SpacesTest extends TestCase $spaceFound = false; foreach ($list as $name => $space) { - if ($name == 'spaces-api-test' && $space->getName() == 'spaces-api-test') { + if ($name == self::$tempSpaceName && $space->getName() == self::$tempSpaceName) { $spaceFound = true; } } From 6b438e0b9a7f9aaf3ded1832fb3bdab15e34d56c Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Tue, 8 Feb 2022 18:13:17 +0000 Subject: [PATCH 07/22] Added a file move method --- SpacesAPI/File.php | 13 +++++++++++++ docs/File.md | 25 +++++++++++++++++++++++++ tests/FileTest.php | 11 +++++++++++ 3 files changed, 49 insertions(+) diff --git a/SpacesAPI/File.php b/SpacesAPI/File.php index 6917d3e..789a9f0 100644 --- a/SpacesAPI/File.php +++ b/SpacesAPI/File.php @@ -224,6 +224,19 @@ class File return new self($this->space, $newFilename); } + /** + * @param string $newFilename + * + * @return \SpacesAPI\File + */ + public function move(string $newFilename): File + { + $newFile = $this->copy($newFilename, $this->isPublic()); + $this->delete(); + + return $newFile; + } + /** * Get the public URL * This URL will not work if the file is private diff --git a/docs/File.md b/docs/File.md index f347f44..bdca5b1 100644 --- a/docs/File.md +++ b/docs/File.md @@ -30,6 +30,7 @@ Rather obtain an instance from `\SpacesAPI\Space::list()`, `\SpacesAPI\Spaces::f |[isPublic](#fileispublic)|Is this file publicly accessible| |[makePrivate](#filemakeprivate)|Make file non-publicly accessible| |[makePublic](#filemakepublic)|Make file publicly accessible| +|[move](#filemove)|Move and/or rename file| @@ -288,4 +289,28 @@ Make file publicly accessible `void` +
+ + +### File::move + +**Description** + +```php +public move (string $newFilename) +``` + +Move or rename a file +The `File` instance on which you call `move` will become invalid and calling methods on it will result in a `FileDoesntExistException` + + +**Parameters** + +* `(string) $newFilename` + +**Return Values** + +`\SpacesAPI\File` : An instance for the new file + +
diff --git a/tests/FileTest.php b/tests/FileTest.php index f5c7f2c..aa5174b 100644 --- a/tests/FileTest.php +++ b/tests/FileTest.php @@ -62,6 +62,17 @@ class FileTest extends TestCase self::$space->file('lorem-ipsum-2.txt'); } + public function testCanMoveRenameFile() + { + $file = self::$file->copy('test.txt'); + $file->move('renamed-file.txt'); + + $this->assertEquals("Lorem ipsum", self::$space->file('renamed-file.txt')->getContents()); + + $this->expectException(FileDoesntExistException::class); + self::$space->file('test.txt'); + } + public function testCanGetURL() { $this->assertStringContainsString('lorem-ipsum.txt', self::$file->getURL()); From 591d0be7587301dbc2d9f5c44d61da56be799238 Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Tue, 8 Feb 2022 18:16:12 +0000 Subject: [PATCH 08/22] Public perms on file copy/move will now retain the current value --- SpacesAPI/File.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SpacesAPI/File.php b/SpacesAPI/File.php index 789a9f0..59aa070 100644 --- a/SpacesAPI/File.php +++ b/SpacesAPI/File.php @@ -4,6 +4,8 @@ namespace SpacesAPI; use SpacesAPI\Exceptions\FileDoesntExistException; +use function PHPUnit\Framework\isNull; + /** * Represents a single file * @@ -211,14 +213,14 @@ class File * * @return \SpacesAPI\File */ - public function copy(string $newFilename, bool $public = false): File + public function copy(string $newFilename): File { $this->s3->copy( $this->space_name, $this->_filename, $this->space_name, $newFilename, - ($public) ? 'public-read' : 'private' + ($this->isPublic()) ? 'public-read' : 'private' ); return new self($this->space, $newFilename); @@ -231,7 +233,7 @@ class File */ public function move(string $newFilename): File { - $newFile = $this->copy($newFilename, $this->isPublic()); + $newFile = $this->copy($newFilename); $this->delete(); return $newFile; From a2bb0f4129b3380c9d684b2e62bb1a01976630f2 Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Tue, 8 Feb 2022 18:17:19 +0000 Subject: [PATCH 09/22] Minor version bump --- composer.json | 2 +- composer.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index b85a7a9..92ff425 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "sociallydev/spaces-api", "description": "Library for accessing Digital Ocean spaces", - "version":"3.3.0", + "version":"3.4.0", "type": "library", "license": "MIT", "authors": [ diff --git a/composer.lock b/composer.lock index e024185..d0b3d74 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0c1d22d2479a5dae3c8909cac6e4399c", + "content-hash": "b358e1fa4d30bd8a5395002c1ff5fc85", "packages": [ { "name": "aws/aws-crt-php", From d7f0b36dc117992141beb163c3b8ebddf1556624 Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Wed, 9 Feb 2022 09:01:21 +0000 Subject: [PATCH 10/22] Moved files now retain the current Object --- SpacesAPI/File.php | 6 ++++-- docs/File.md | 3 +-- tests/FileTest.php | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/SpacesAPI/File.php b/SpacesAPI/File.php index 59aa070..964a571 100644 --- a/SpacesAPI/File.php +++ b/SpacesAPI/File.php @@ -233,10 +233,12 @@ class File */ public function move(string $newFilename): File { - $newFile = $this->copy($newFilename); + $this->copy($newFilename); $this->delete(); + $this->_filename = $newFilename; + $this->fetchFileInfo(); - return $newFile; + return $this; } /** diff --git a/docs/File.md b/docs/File.md index bdca5b1..3e50692 100644 --- a/docs/File.md +++ b/docs/File.md @@ -301,8 +301,7 @@ public move (string $newFilename) ``` Move or rename a file -The `File` instance on which you call `move` will become invalid and calling methods on it will result in a `FileDoesntExistException` - +The instance of `File` is now the moved object **Parameters** diff --git a/tests/FileTest.php b/tests/FileTest.php index aa5174b..d43bce3 100644 --- a/tests/FileTest.php +++ b/tests/FileTest.php @@ -67,7 +67,7 @@ class FileTest extends TestCase $file = self::$file->copy('test.txt'); $file->move('renamed-file.txt'); - $this->assertEquals("Lorem ipsum", self::$space->file('renamed-file.txt')->getContents()); + $this->assertEquals("renamed-file.txt", $file->filename); $this->expectException(FileDoesntExistException::class); self::$space->file('test.txt'); From b7d1a40e70921660b1479c77396f78a6a76ca7d8 Mon Sep 17 00:00:00 2001 From: Juh Champ <44661803+juhchamp@users.noreply.github.com> Date: Sat, 5 Mar 2022 01:52:04 -0300 Subject: [PATCH 11/22] The uploadFile method of Space class updated --- SpacesAPI/Space.php | 6 +++++- tests/SpaceTest.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/SpacesAPI/Space.php b/SpacesAPI/Space.php index cffcbde..74a7230 100644 --- a/SpacesAPI/Space.php +++ b/SpacesAPI/Space.php @@ -302,16 +302,20 @@ class Space * Upload a file * * @param string $filepath The path to the file, including the filename. Relative and absolute paths are accepted. + * @param string $mimeType The file mime type to pass as ContentType for the file (e.g. 'image/jpeg'). * @param string|null $filename The remote filename. If `null`, the local filename will be used. + * @param bool $private True for the file to be private, false to allow public access. * * @return \SpacesAPI\File */ - public function uploadFile(string $filepath, ?string $filename = null): File + public function uploadFile(string $filepath, string $mimeType, ?string $filename = null, bool $private = true): File { $this->s3->putObject([ 'Bucket' => $this->name, 'Key' => ($filename) ?: basename($filepath), 'SourceFile' => $filepath, + 'ContentType' => $mimeType, + 'ACL' => ($private) ? 'private' : 'public-read' ]); return new File($this, ($filename) ?: basename($filepath), [], false); diff --git a/tests/SpaceTest.php b/tests/SpaceTest.php index f416539..0ccccef 100644 --- a/tests/SpaceTest.php +++ b/tests/SpaceTest.php @@ -82,7 +82,7 @@ class SpaceTest extends TestCase public function testCanUploadFile() { $tmpFile = tempnam(sys_get_temp_dir(), 'spaces-test'); - $file = self::$space->uploadFile($tmpFile, 'upload-test.txt'); + $file = self::$space->uploadFile($tmpFile, 'text/plain', 'upload-test.txt', false); $this->assertInstanceOf(File::class, $file); } From dc5dc27ff330f6ed01a52da3cb8bb5ad24730626 Mon Sep 17 00:00:00 2001 From: Juh Champ <44661803+juhchamp@users.noreply.github.com> Date: Wed, 23 Mar 2022 16:58:37 -0300 Subject: [PATCH 12/22] uploadFile method of Space class updated and testCanUploadFileWithMimeType method added to SpaceTest. --- SpacesAPI/Space.php | 4 ++-- tests/SpaceTest.php | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/SpacesAPI/Space.php b/SpacesAPI/Space.php index 74a7230..a257062 100644 --- a/SpacesAPI/Space.php +++ b/SpacesAPI/Space.php @@ -302,13 +302,13 @@ class Space * Upload a file * * @param string $filepath The path to the file, including the filename. Relative and absolute paths are accepted. - * @param string $mimeType The file mime type to pass as ContentType for the file (e.g. 'image/jpeg'). * @param string|null $filename The remote filename. If `null`, the local filename will be used. + * @param string|null $mimeType The file mime type to pass as ContentType for the file (e.g. 'image/jpeg'). * @param bool $private True for the file to be private, false to allow public access. * * @return \SpacesAPI\File */ - public function uploadFile(string $filepath, string $mimeType, ?string $filename = null, bool $private = true): File + public function uploadFile(string $filepath, ?string $filename = null, ?string $mimeType = null, bool $private = true): File { $this->s3->putObject([ 'Bucket' => $this->name, diff --git a/tests/SpaceTest.php b/tests/SpaceTest.php index 0ccccef..976d9f6 100644 --- a/tests/SpaceTest.php +++ b/tests/SpaceTest.php @@ -82,7 +82,14 @@ class SpaceTest extends TestCase public function testCanUploadFile() { $tmpFile = tempnam(sys_get_temp_dir(), 'spaces-test'); - $file = self::$space->uploadFile($tmpFile, 'text/plain', 'upload-test.txt', false); + $file = self::$space->uploadFile($tmpFile, 'upload-test.txt'); + $this->assertInstanceOf(File::class, $file); + } + + public function testCanUploadFileWithMimeType() + { + $tmpFile = tempnam(sys_get_temp_dir(), 'spaces-test'); + $file = self::$space->uploadFile($tmpFile, 'upload-test.txt', 'text/plain'); $this->assertInstanceOf(File::class, $file); } From de48ddb481e9d2b0de8f5975f0ecf3b74d4727dc Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Wed, 30 Mar 2022 11:21:42 +0100 Subject: [PATCH 13/22] Added extra test assertion for `Space::uploadFile` mimeType argument Added extra parameters for `Space::uploadFile` to docs --- docs/Space.md | 6 +++++- tests/SpaceTest.php | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/Space.md b/docs/Space.md index b78b97d..61082f1 100644 --- a/docs/Space.md +++ b/docs/Space.md @@ -463,7 +463,7 @@ Recursively upload an entire directory **Description** ```php -public uploadFile (string $filepath, string|null $filename = null) +public uploadFile (string $filepath, string|null $filename = null, string|null $mimeType = null, bool $private = true) ``` Upload a file @@ -476,6 +476,10 @@ Upload a file : The path to the file, including the filename. Relative and absolute paths are accepted. * `(string|null) $filename` : The remote filename. If `null`, the local filename will be used. Default `null` +* `(string|null) $mimeType` +: The files mimeType. If `null` the mimeType is inferred from the file by DigitalOcean Spaces. Default `null` +* `(bool)` $private +: If `true` then the file is private, if `false` the file is publicly available. Default `true` **Return Values** diff --git a/tests/SpaceTest.php b/tests/SpaceTest.php index 976d9f6..a16f70d 100644 --- a/tests/SpaceTest.php +++ b/tests/SpaceTest.php @@ -91,6 +91,7 @@ class SpaceTest extends TestCase $tmpFile = tempnam(sys_get_temp_dir(), 'spaces-test'); $file = self::$space->uploadFile($tmpFile, 'upload-test.txt', 'text/plain'); $this->assertInstanceOf(File::class, $file); + $this->assertEquals('text/plain', $file->content_type); } /** From 6d365b0f6a85cdda146291f907d7cd37e6039ae9 Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Wed, 30 Mar 2022 11:25:19 +0100 Subject: [PATCH 14/22] Bumped dependencies and released new minor version 3.5.0 up from 3.4.0 --- composer.json | 2 +- composer.lock | 233 ++++++++++++++++++++++++++------------------------ 2 files changed, 120 insertions(+), 115 deletions(-) diff --git a/composer.json b/composer.json index 92ff425..a2528f2 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "sociallydev/spaces-api", "description": "Library for accessing Digital Ocean spaces", - "version":"3.4.0", + "version":"3.5.0", "type": "library", "license": "MIT", "authors": [ diff --git a/composer.lock b/composer.lock index d0b3d74..2550ff7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b358e1fa4d30bd8a5395002c1ff5fc85", + "content-hash": "cbf18797bb5c045fb59c022bb837c645", "packages": [ { "name": "aws/aws-crt-php", @@ -58,16 +58,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.209.19", + "version": "3.216.4", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "8ad887dc242150d2f3b72e867ca74c7c1e3baa19" + "reference": "fd16bb2ecc4e1a47b145163d0bd7744c4578656d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/8ad887dc242150d2f3b72e867ca74c7c1e3baa19", - "reference": "8ad887dc242150d2f3b72e867ca74c7c1e3baa19", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/fd16bb2ecc4e1a47b145163d0bd7744c4578656d", + "reference": "fd16bb2ecc4e1a47b145163d0bd7744c4578656d", "shasum": "" }, "require": { @@ -143,22 +143,22 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.209.19" + "source": "https://github.com/aws/aws-sdk-php/tree/3.216.4" }, - "time": "2022-02-07T19:14:57+00:00" + "time": "2022-03-29T18:29:23+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.4.1", + "version": "7.4.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79" + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79", - "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", "shasum": "" }, "require": { @@ -191,12 +191,12 @@ } }, "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -253,7 +253,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.1" + "source": "https://github.com/guzzle/guzzle/tree/7.4.2" }, "funding": [ { @@ -269,7 +269,7 @@ "type": "tidelift" } ], - "time": "2021-12-06T18:43:05+00:00" + "time": "2022-03-20T14:16:28+00:00" }, { "name": "guzzlehttp/promises", @@ -298,12 +298,12 @@ } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -357,16 +357,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.1.0", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72" + "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72", - "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", + "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", "shasum": "" }, "require": { @@ -390,7 +390,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, "autoload": { @@ -452,7 +452,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.1.0" + "source": "https://github.com/guzzle/psr7/tree/2.2.1" }, "funding": [ { @@ -468,7 +468,7 @@ "type": "tidelift" } ], - "time": "2021-10-06T17:43:30+00:00" + "time": "2022-03-20T21:55:58+00:00" }, { "name": "mtdowling/jmespath.php", @@ -502,12 +502,12 @@ } }, "autoload": { - "psr-4": { - "JmesPath\\": "src/" - }, "files": [ "src/JmesPath.php" - ] + ], + "psr-4": { + "JmesPath\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -804,7 +804,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -836,12 +836,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -867,7 +867,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" }, "funding": [ { @@ -949,12 +949,12 @@ ], "type": "library", "autoload": { - "psr-4": { - "Clean\\PhpDocMd\\": "src/" - }, "files": [ "src/snippets.php" - ] + ], + "psr-4": { + "Clean\\PhpDocMd\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1007,29 +1007,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.4.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" }, "type": "library", "autoload": { @@ -1056,7 +1057,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" }, "funding": [ { @@ -1072,7 +1073,7 @@ "type": "tidelift" } ], - "time": "2020-11-10T18:47:58+00:00" + "time": "2022-03-03T08:28:38+00:00" }, { "name": "graham-campbell/result-type", @@ -1138,25 +1139,29 @@ }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { @@ -1181,7 +1186,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" }, "funding": [ { @@ -1189,7 +1194,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2022-03-03T13:19:32+00:00" }, { "name": "nikic/php-parser", @@ -1309,16 +1314,16 @@ }, { "name": "phar-io/version", - "version": "3.1.1", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "15a90844ad40f127afd244c0cad228de2a80052a" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/15a90844ad40f127afd244c0cad228de2a80052a", - "reference": "15a90844ad40f127afd244c0cad228de2a80052a", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { @@ -1354,9 +1359,9 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.1" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2022-02-07T21:56:48+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -1470,16 +1475,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706" + "reference": "77a32518733312af16a44300404e945338981de3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706", - "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", + "reference": "77a32518733312af16a44300404e945338981de3", "shasum": "" }, "require": { @@ -1514,9 +1519,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" }, - "time": "2022-01-04T19:58:01+00:00" + "time": "2022-03-15T21:29:03+00:00" }, { "name": "phpoption/phpoption", @@ -1658,16 +1663,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.10", + "version": "9.2.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "d5850aaf931743067f4bfc1ae4cbd06468400687" + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d5850aaf931743067f4bfc1ae4cbd06468400687", - "reference": "d5850aaf931743067f4bfc1ae4cbd06468400687", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", "shasum": "" }, "require": { @@ -1723,7 +1728,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.10" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" }, "funding": [ { @@ -1731,7 +1736,7 @@ "type": "github" } ], - "time": "2021-12-05T09:12:13+00:00" + "time": "2022-03-07T09:28:20+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1976,16 +1981,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.13", + "version": "9.5.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "597cb647654ede35e43b137926dfdfef0fb11743" + "reference": "35ea4b7f3acabb26f4bb640f8c30866c401da807" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/597cb647654ede35e43b137926dfdfef0fb11743", - "reference": "597cb647654ede35e43b137926dfdfef0fb11743", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/35ea4b7f3acabb26f4bb640f8c30866c401da807", + "reference": "35ea4b7f3acabb26f4bb640f8c30866c401da807", "shasum": "" }, "require": { @@ -2001,7 +2006,7 @@ "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.7", + "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -2015,7 +2020,7 @@ "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.4", + "sebastian/type": "^3.0", "sebastian/version": "^3.0.2" }, "require-dev": { @@ -2063,7 +2068,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.13" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.19" }, "funding": [ { @@ -2075,7 +2080,7 @@ "type": "github" } ], - "time": "2022-01-24T07:33:35+00:00" + "time": "2022-03-15T09:57:31+00:00" }, { "name": "sebastian/cli-parser", @@ -2583,16 +2588,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.3", + "version": "5.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", "shasum": "" }, "require": { @@ -2635,7 +2640,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" }, "funding": [ { @@ -2643,7 +2648,7 @@ "type": "github" } ], - "time": "2021-06-11T13:31:12+00:00" + "time": "2022-02-14T08:28:10+00:00" }, { "name": "sebastian/lines-of-code", @@ -2934,28 +2939,28 @@ }, { "name": "sebastian/type", - "version": "2.3.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", - "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", "shasum": "" }, "require": { "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^9.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2978,7 +2983,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" }, "funding": [ { @@ -2986,7 +2991,7 @@ "type": "github" } ], - "time": "2021-06-15T12:49:02+00:00" + "time": "2022-03-15T09:54:48+00:00" }, { "name": "sebastian/version", @@ -3043,7 +3048,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -3075,12 +3080,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3105,7 +3110,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" }, "funding": [ { @@ -3125,16 +3130,16 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.24.0", + "version": "v1.25.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", - "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", "shasum": "" }, "require": { @@ -3188,7 +3193,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" }, "funding": [ { @@ -3204,7 +3209,7 @@ "type": "tidelift" } ], - "time": "2021-09-13T13:58:33+00:00" + "time": "2022-03-04T08:16:47+00:00" }, { "name": "theseer/tokenizer", From 26d6b8335659ab2f579b924ec86bc7e649b3ccc3 Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Wed, 30 Mar 2022 11:27:01 +0100 Subject: [PATCH 15/22] Updated version numbers in github bug report template --- .github/ISSUE_TEMPLATE/BUG.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/BUG.yml b/.github/ISSUE_TEMPLATE/BUG.yml index beade0b..f0870fc 100644 --- a/.github/ISSUE_TEMPLATE/BUG.yml +++ b/.github/ISSUE_TEMPLATE/BUG.yml @@ -18,6 +18,9 @@ body: label: Version description: What version of Spaces-API is this occuring on? Versions below 3 will not be fixed. Please upgrade. options: + - 3.5.0 + - 3.4.0 + - 3.3.0 - 3.2.0 - 3.1.0 - 3.0.0 From e9cdacc684976ad9f04f053c86481f2f10759121 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 May 2022 22:26:34 +0000 Subject: [PATCH 16/22] Bump guzzlehttp/guzzle from 7.4.2 to 7.4.3 Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.4.2 to 7.4.3. - [Release notes](https://github.com/guzzle/guzzle/releases) - [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md) - [Commits](https://github.com/guzzle/guzzle/compare/7.4.2...7.4.3) --- updated-dependencies: - dependency-name: guzzlehttp/guzzle dependency-type: indirect ... Signed-off-by: dependabot[bot] --- composer.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.lock b/composer.lock index 2550ff7..7c39699 100644 --- a/composer.lock +++ b/composer.lock @@ -149,16 +149,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.2", + "version": "7.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" + "reference": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/74a8602c6faec9ef74b7a9391ac82c5e65b1cdab", + "reference": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab", "shasum": "" }, "require": { @@ -253,7 +253,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.2" + "source": "https://github.com/guzzle/guzzle/tree/7.4.3" }, "funding": [ { @@ -269,7 +269,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T14:16:28+00:00" + "time": "2022-05-25T13:24:33+00:00" }, { "name": "guzzlehttp/promises", @@ -737,16 +737,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.0", + "version": "v2.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { @@ -784,7 +784,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1" }, "funding": [ { @@ -800,7 +800,7 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -3409,5 +3409,5 @@ "php": ">=7.3" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } From 3a32727c28af94eef3f86ca4e875a98530693a8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 20:58:52 +0000 Subject: [PATCH 17/22] Bump guzzlehttp/guzzle from 7.4.3 to 7.4.5 Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.4.3 to 7.4.5. - [Release notes](https://github.com/guzzle/guzzle/releases) - [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md) - [Commits](https://github.com/guzzle/guzzle/compare/7.4.3...7.4.5) --- updated-dependencies: - dependency-name: guzzlehttp/guzzle dependency-type: indirect ... Signed-off-by: dependabot[bot] --- composer.lock | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/composer.lock b/composer.lock index 7c39699..a8151e7 100644 --- a/composer.lock +++ b/composer.lock @@ -149,22 +149,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.3", + "version": "7.4.5", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab" + "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/74a8602c6faec9ef74b7a9391ac82c5e65b1cdab", - "reference": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", + "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/psr7": "^1.9 || ^2.4", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -253,7 +253,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.3" + "source": "https://github.com/guzzle/guzzle/tree/7.4.5" }, "funding": [ { @@ -269,7 +269,7 @@ "type": "tidelift" } ], - "time": "2022-05-25T13:24:33+00:00" + "time": "2022-06-20T22:16:13+00:00" }, { "name": "guzzlehttp/promises", @@ -357,16 +357,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.2.1", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" + "reference": "13388f00956b1503577598873fffb5ae994b5737" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/13388f00956b1503577598873fffb5ae994b5737", + "reference": "13388f00956b1503577598873fffb5ae994b5737", "shasum": "" }, "require": { @@ -390,7 +390,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -452,7 +452,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.2.1" + "source": "https://github.com/guzzle/psr7/tree/2.4.0" }, "funding": [ { @@ -468,7 +468,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T21:55:58+00:00" + "time": "2022-06-20T21:43:11+00:00" }, { "name": "mtdowling/jmespath.php", @@ -804,16 +804,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { @@ -828,7 +828,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -867,7 +867,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" }, "funding": [ { @@ -883,7 +883,7 @@ "type": "tidelift" } ], - "time": "2021-11-30T18:21:41+00:00" + "time": "2022-05-24T11:49:31+00:00" } ], "packages-dev": [ From c52d22a70e239a343968d0707442f94c48311e16 Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Fri, 11 Nov 2022 09:55:47 +0000 Subject: [PATCH 18/22] Allowed passing validation flag to Space::file() --- SpacesAPI/Space.php | 5 +- composer.json | 2 +- composer.lock | 418 ++++++++++++++++++++------------------------ docs/Space.md | 4 +- 4 files changed, 194 insertions(+), 235 deletions(-) diff --git a/SpacesAPI/Space.php b/SpacesAPI/Space.php index a257062..8ef5ced 100644 --- a/SpacesAPI/Space.php +++ b/SpacesAPI/Space.php @@ -325,13 +325,14 @@ class Space * Get an instance of \SpacesAPI\File for a given filename * * @param string $filename + * @package bool $validate * * @return \SpacesAPI\File * @throws \SpacesAPI\Exceptions\FileDoesntExistException Thrown if the file doesn't exist */ - public function file(string $filename): File + public function file(string $filename, bool $validate = true): File { - return new File($this, $filename); + return new File($this, $filename, [], $validate); } /** diff --git a/composer.json b/composer.json index a2528f2..a365e90 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "sociallydev/spaces-api", "description": "Library for accessing Digital Ocean spaces", - "version":"3.5.0", + "version":"3.6.0", "type": "library", "license": "MIT", "authors": [ diff --git a/composer.lock b/composer.lock index a8151e7..c3a48a5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cbf18797bb5c045fb59c022bb837c645", + "content-hash": "7d7e52ae944bdcc52309b9908e6db236", "packages": [ { "name": "aws/aws-crt-php", @@ -58,16 +58,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.216.4", + "version": "3.242.0", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "fd16bb2ecc4e1a47b145163d0bd7744c4578656d" + "reference": "cab6d4f830ce275a1742a3e35e2625917b006dd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/fd16bb2ecc4e1a47b145163d0bd7744c4578656d", - "reference": "fd16bb2ecc4e1a47b145163d0bd7744c4578656d", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/cab6d4f830ce275a1742a3e35e2625917b006dd2", + "reference": "cab6d4f830ce275a1742a3e35e2625917b006dd2", "shasum": "" }, "require": { @@ -75,9 +75,9 @@ "ext-json": "*", "ext-pcre": "*", "ext-simplexml": "*", - "guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0", + "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", "guzzlehttp/promises": "^1.4.0", - "guzzlehttp/psr7": "^1.7.0|^2.0", + "guzzlehttp/psr7": "^1.8.5 || ^2.3", "mtdowling/jmespath.php": "^2.6", "php": ">=5.5" }, @@ -85,6 +85,8 @@ "andrewsville/php-token-reflection": "^1.4", "aws/aws-php-sns-message-validator": "~1.0", "behat/behat": "~3.0", + "composer/composer": "^1.10.22", + "dms/phpunit-arraysubset-asserts": "^0.4.0", "doctrine/cache": "~1.4", "ext-dom": "*", "ext-openssl": "*", @@ -92,10 +94,11 @@ "ext-sockets": "*", "nette/neon": "^2.3", "paragonie/random_compat": ">= 2", - "phpunit/phpunit": "^4.8.35|^5.4.3", + "phpunit/phpunit": "^4.8.35 || ^5.6.3 || ^9.5", "psr/cache": "^1.0", "psr/simple-cache": "^1.0", - "sebastian/comparator": "^1.2.3" + "sebastian/comparator": "^1.2.3 || ^4.0", + "yoast/phpunit-polyfills": "^1.0" }, "suggest": { "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", @@ -143,22 +146,22 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.216.4" + "source": "https://github.com/aws/aws-sdk-php/tree/3.242.0" }, - "time": "2022-03-29T18:29:23+00:00" + "time": "2022-11-10T19:15:37+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.4.5", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", - "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { @@ -173,10 +176,10 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -186,8 +189,12 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "7.4-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -253,7 +260,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.5" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -269,20 +276,20 @@ "type": "tidelift" } ], - "time": "2022-06-20T22:16:13+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -337,7 +344,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -353,20 +360,20 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.4.0", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "13388f00956b1503577598873fffb5ae994b5737" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/13388f00956b1503577598873fffb5ae994b5737", - "reference": "13388f00956b1503577598873fffb5ae994b5737", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -380,15 +387,19 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { "dev-master": "2.4-dev" } @@ -452,7 +463,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.0" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -468,7 +479,7 @@ "type": "tidelift" } ], - "time": "2022-06-20T21:43:11+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "mtdowling/jmespath.php", @@ -737,7 +748,7 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.1", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -784,7 +795,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -804,16 +815,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -828,7 +839,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -867,7 +878,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -883,7 +894,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" } ], "packages-dev": [ @@ -922,27 +933,27 @@ }, { "name": "clean/phpdoc-md", - "version": "0.19.1", + "version": "0.19.2", "source": { "type": "git", "url": "https://github.com/clean/phpdoc-md.git", - "reference": "3a15f1bda437b76c6658ce34f5b52e8c5a10ada3" + "reference": "fd18c3eb7359431406b65da6c508bb6126588792" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clean/phpdoc-md/zipball/3a15f1bda437b76c6658ce34f5b52e8c5a10ada3", - "reference": "3a15f1bda437b76c6658ce34f5b52e8c5a10ada3", + "url": "https://api.github.com/repos/clean/phpdoc-md/zipball/fd18c3eb7359431406b65da6c508bb6126588792", + "reference": "fd18c3eb7359431406b65da6c508bb6126588792", "shasum": "" }, "require": { - "clean/phpatlas": "0.2.0", - "clean/view": "0.1.0", + "clean/phpatlas": "^0.2", + "clean/view": "^0.1", + "php": "^5.6|^7|^8", "phpdocumentor/reflection-docblock": "^3|^4|^5" }, "require-dev": { - "clean/mpr": "dev-master", - "codeclimate/php-test-reporter": "dev-master", - "phpunit/phpunit": "<6" + "clean/mpr": "^1", + "phpunit/phpunit": ">5" }, "bin": [ "bin/phpdoc-md" @@ -967,9 +978,9 @@ ], "support": { "issues": "https://github.com/clean/phpdoc-md/issues", - "source": "https://github.com/clean/phpdoc-md/tree/0.19.1" + "source": "https://github.com/clean/phpdoc-md/tree/0.19.2" }, - "time": "2020-02-25T12:57:26+00:00" + "time": "2022-08-25T15:00:20+00:00" }, { "name": "clean/view", @@ -1077,24 +1088,24 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.0.4", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "0690bde05318336c7221785f2a932467f98b64ca" + "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/0690bde05318336c7221785f2a932467f98b64ca", - "reference": "0690bde05318336c7221785f2a932467f98b64ca", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/a878d45c1914464426dc94da61c9e1d36ae262a8", + "reference": "a878d45c1914464426dc94da61c9e1d36ae262a8", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0", - "phpoption/phpoption": "^1.8" + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9" }, "require-dev": { - "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + "phpunit/phpunit": "^8.5.28 || ^9.5.21" }, "type": "library", "autoload": { @@ -1123,7 +1134,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.4" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.0" }, "funding": [ { @@ -1135,7 +1146,7 @@ "type": "tidelift" } ], - "time": "2021-11-21T21:41:47+00:00" + "time": "2022-07-30T15:56:11+00:00" }, { "name": "myclabs/deep-copy", @@ -1198,16 +1209,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.2", + "version": "v4.15.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", "shasum": "" }, "require": { @@ -1248,9 +1259,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" }, - "time": "2021-11-30T19:35:32+00:00" + "time": "2022-09-04T07:30:47+00:00" }, { "name": "phar-io/manifest", @@ -1475,25 +1486,30 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.1", + "version": "1.6.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { "ext-tokenizer": "*", - "psalm/phar": "^4.8" + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { @@ -1519,35 +1535,39 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" }, - "time": "2022-03-15T21:29:03+00:00" + "time": "2022-10-14T12:47:21+00:00" }, { "name": "phpoption/phpoption", - "version": "1.8.1", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15" + "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", - "reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", + "reference": "dc5ff11e274a90cc1c743f66c9ad700ce50db9ab", "shasum": "" }, "require": { - "php": "^7.0 || ^8.0" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + "bamarni/composer-bin-plugin": "^1.8", + "phpunit/phpunit": "^8.5.28 || ^9.5.21" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1580,7 +1600,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.8.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.0" }, "funding": [ { @@ -1592,94 +1612,27 @@ "type": "tidelift" } ], - "time": "2021-12-04T23:24:31+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" + "time": "2022-07-30T15:51:26+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.15", + "version": "9.2.18", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" + "reference": "12fddc491826940cf9b7e88ad9664cf51f0f6d0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/12fddc491826940cf9b7e88ad9664cf51f0f6d0a", + "reference": "12fddc491826940cf9b7e88ad9664cf51f0f6d0a", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.14", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -1728,7 +1681,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.18" }, "funding": [ { @@ -1736,7 +1689,7 @@ "type": "github" } ], - "time": "2022-03-07T09:28:20+00:00" + "time": "2022-10-27T13:35:33+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1981,16 +1934,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.19", + "version": "9.5.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "35ea4b7f3acabb26f4bb640f8c30866c401da807" + "reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/35ea4b7f3acabb26f4bb640f8c30866c401da807", - "reference": "35ea4b7f3acabb26f4bb640f8c30866c401da807", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/851867efcbb6a1b992ec515c71cdcf20d895e9d2", + "reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2", "shasum": "" }, "require": { @@ -2005,7 +1958,6 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", @@ -2013,20 +1965,16 @@ "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", + "sebastian/comparator": "^4.0.8", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", + "sebastian/exporter": "^4.0.5", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", + "sebastian/type": "^3.2", "sebastian/version": "^3.0.2" }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*" @@ -2068,7 +2016,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.19" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.26" }, "funding": [ { @@ -2078,9 +2026,13 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2022-03-15T09:57:31+00:00" + "time": "2022-10-28T06:00:21+00:00" }, { "name": "sebastian/cli-parser", @@ -2251,16 +2203,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { @@ -2313,7 +2265,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -2321,7 +2273,7 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { "name": "sebastian/complexity", @@ -2448,16 +2400,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.3", + "version": "5.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", "shasum": "" }, "require": { @@ -2499,7 +2451,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" }, "funding": [ { @@ -2507,20 +2459,20 @@ "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2022-04-03T09:37:03+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", "shasum": "" }, "require": { @@ -2576,7 +2528,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" }, "funding": [ { @@ -2584,7 +2536,7 @@ "type": "github" } ], - "time": "2021-11-11T14:18:36+00:00" + "time": "2022-09-14T06:03:37+00:00" }, { "name": "sebastian/global-state", @@ -2939,16 +2891,16 @@ }, { "name": "sebastian/type", - "version": "3.0.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", "shasum": "" }, "require": { @@ -2960,7 +2912,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -2983,7 +2935,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" }, "funding": [ { @@ -2991,7 +2943,7 @@ "type": "github" } ], - "time": "2022-03-15T09:54:48+00:00" + "time": "2022-09-12T14:47:03+00:00" }, { "name": "sebastian/version", @@ -3048,16 +3000,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.25.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -3072,7 +3024,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3110,7 +3062,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -3126,20 +3078,20 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.25.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -3148,7 +3100,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3193,7 +3145,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -3209,7 +3161,7 @@ "type": "tidelift" } ], - "time": "2022-03-04T08:16:47+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "theseer/tokenizer", @@ -3263,16 +3215,16 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.4.1", + "version": "v5.5.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f" + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/264dce589e7ce37a7ba99cb901eed8249fbec92f", - "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", "shasum": "" }, "require": { @@ -3287,15 +3239,19 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.21 || ^9.5.10" + "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" }, "suggest": { "ext-filter": "Required to use the boolean validator." }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.5-dev" } }, "autoload": { @@ -3327,7 +3283,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.4.1" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" }, "funding": [ { @@ -3339,25 +3295,25 @@ "type": "tidelift" } ], - "time": "2021-12-12T23:22:04+00:00" + "time": "2022-10-16T01:01:54+00:00" }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -3395,9 +3351,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], @@ -3409,5 +3365,5 @@ "php": ">=7.3" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/docs/Space.md b/docs/Space.md index 61082f1..69d114b 100644 --- a/docs/Space.md +++ b/docs/Space.md @@ -180,7 +180,7 @@ Recursively download an entire directory. **Description** ```php -public file (string $filename) +public file (string $filename, bool $validate = true) ``` Get an instance of \SpacesAPI\File for a given filename @@ -190,6 +190,8 @@ Get an instance of \SpacesAPI\File for a given filename **Parameters** * `(string) $filename` +* `(bool) $validate` +: Whether to validate the file exits. Defaults to `true` **Return Values** From 6bc100cf902a3a7654908a1adaf9ad8a4f2b9c35 Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Wed, 1 Feb 2023 11:19:59 +0000 Subject: [PATCH 19/22] Added move example to readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 588a067..87723a7 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,9 @@ $file2url = $file2->getSignedURL("2 hours"); // Make a copy $file3 = $file2->copy('remote-file-3.txt'); +// Move or rename a file +$file2->move('new-filename.txt') + // Make a file public and get the URL $file3->makePublic(); $file3url = $file3->getURL(); From 4f4b6148d23044237f14b7dd10c32910d95098c9 Mon Sep 17 00:00:00 2001 From: Aleksandar Kolakov <4527112+alexkolakov@users.noreply.github.com> Date: Sun, 18 Dec 2022 12:18:36 +0200 Subject: [PATCH 20/22] Fixed hardcoded region in Spaces constructor --- SpacesAPI/Spaces.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpacesAPI/Spaces.php b/SpacesAPI/Spaces.php index d822e8a..c248664 100644 --- a/SpacesAPI/Spaces.php +++ b/SpacesAPI/Spaces.php @@ -36,7 +36,7 @@ class Spaces { $this->s3 = new S3Client([ "version" => "latest", - "region" => "us-east-1", + "region" => $region, "endpoint" => "https://$region.$host", "credentials" => ["key" => $accessKey, "secret" => $secretKey], "ua_append" => "SociallyDev-Spaces-API/2", From 8ac092ea9685f7390abc63389335f55fc68fa720 Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Fri, 15 Dec 2023 11:06:58 +0000 Subject: [PATCH 21/22] Version bump from bugfix --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a365e90..8eec5d8 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "sociallydev/spaces-api", "description": "Library for accessing Digital Ocean spaces", - "version":"3.6.0", + "version":"3.6.1", "type": "library", "license": "MIT", "authors": [ From 6b0f8f5e0344d6f6aefed164dd056ee9bb04d969 Mon Sep 17 00:00:00 2001 From: David Wakelin Date: Fri, 15 Dec 2023 11:07:08 +0000 Subject: [PATCH 22/22] Added deprecation notice --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 87723a7..b9137c1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ -![Spaces-API](https://imgur.com/NYNsQyl.png "Devang Srivastava's Spaces-API") +# This library is deprecated +We recommend using the [official SDK](https://github.com/DigitalOceanPHP/Client) or the [Laravel package](https://github.com/GrahamCampbell/Laravel-DigitalOcean) -PHP library for accessing Digital Ocean spaces +All issues will be closed and new PRs will not be accepted ## Installation Install via composer