diff --git a/composer.json b/composer.json index e8fdcab..49d156e 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,8 @@ "require": { "php": ">=8.0", "saloonphp/saloon": "^3.0", - "saloonphp/rate-limit-plugin": "^2.0" + "saloonphp/rate-limit-plugin": "^2.0", + "saloonphp/pagination-plugin": "^2.0" }, "require-dev": { "phpunit/phpunit": "^9.5", diff --git a/composer.lock b/composer.lock index 76c9a30..6f4d0c9 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": "c948fa5b54783ca306ee1ac6aca5b405", + "content-hash": "ba690e877d669dc0496f3fcc66a03a91", "packages": [ { "name": "guzzlehttp/guzzle", @@ -385,20 +385,20 @@ }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -422,7 +422,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -434,9 +434,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", @@ -535,6 +535,60 @@ }, "time": "2019-03-08T08:55:37+00:00" }, + { + "name": "saloonphp/pagination-plugin", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/saloonphp/pagination-plugin.git", + "reference": "45d447e832fa6c6f3b58b233bc2c5423bfef0181" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/saloonphp/pagination-plugin/zipball/45d447e832fa6c6f3b58b233bc2c5423bfef0181", + "reference": "45d447e832fa6c6f3b58b233bc2c5423bfef0181", + "shasum": "" + }, + "require": { + "php": "^8.1", + "saloonphp/saloon": "^3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.5", + "illuminate/collections": "^10.9", + "pestphp/pest": "^2.6", + "phpstan/phpstan": "^1.9", + "spatie/invade": "^2.0", + "spatie/ray": "^1.33" + }, + "suggest": { + "illuminate/collections": "Used to provide LazyCollections via the collect() method on paginators." + }, + "type": "library", + "autoload": { + "psr-4": { + "Saloon\\PaginationPlugin\\": "src/", + "Saloon\\PaginationPlugin\\Tests\\": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sam Carré", + "email": "29132017+Sammyjo20@users.noreply.github.com", + "role": "Developer" + } + ], + "description": "Official Pagination Plugin For Saloon v3", + "homepage": "https://github.com/saloonphp/pagination-plugin", + "support": { + "source": "https://github.com/saloonphp/pagination-plugin/tree/v2.2.0" + }, + "time": "2023-12-08T20:04:07+00:00" + }, { "name": "saloonphp/rate-limit-plugin", "version": "v2.0.0", @@ -591,16 +645,16 @@ }, { "name": "saloonphp/saloon", - "version": "v3.6.0", + "version": "v3.9.1", "source": { "type": "git", "url": "https://github.com/saloonphp/saloon.git", - "reference": "fba00c03aebc0af33830997c7bebdcfe32105c27" + "reference": "113332a57c698ee2af24fb68691490b91f56ad33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/saloonphp/saloon/zipball/fba00c03aebc0af33830997c7bebdcfe32105c27", - "reference": "fba00c03aebc0af33830997c7bebdcfe32105c27", + "url": "https://api.github.com/repos/saloonphp/saloon/zipball/113332a57c698ee2af24fb68691490b91f56ad33", + "reference": "113332a57c698ee2af24fb68691490b91f56ad33", "shasum": "" }, "require": { @@ -620,15 +674,17 @@ "illuminate/collections": "^9.39 || ^10.0", "league/flysystem": "^3.0", "pestphp/pest": "^2.6", - "phpstan/phpstan": "^1.9", + "phpstan/phpstan": "^1.11.4", "saloonphp/xml-wrangler": "^1.1", "spatie/ray": "^1.33", - "symfony/dom-crawler": "^6.0" + "symfony/dom-crawler": "^6.0 || ^7.0", + "symfony/var-dumper": "^6.3 || ^7.0" }, "suggest": { "illuminate/collections": "Required for the response collect() method.", "saloonphp/xml-wrangler": "Required for the response xmlReader() method.", - "symfony/dom-crawler": "Required for the response dom() method." + "symfony/dom-crawler": "Required for the response dom() method.", + "symfony/var-dumper": "Required for default debugging drivers." }, "type": "library", "autoload": { @@ -658,32 +714,28 @@ ], "support": { "issues": "https://github.com/saloonphp/saloon/issues", - "source": "https://github.com/saloonphp/saloon/tree/v3.6.0" + "source": "https://github.com/saloonphp/saloon/tree/v3.9.1" }, "funding": [ { "url": "https://github.com/sammyjo20", "type": "github" - }, - { - "url": "https://ko-fi.com/sammyjo20", - "type": "ko_fi" } ], - "time": "2024-01-21T15:20:13+00:00" + "time": "2024-06-26T06:26:47+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.4.0", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { @@ -692,7 +744,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -721,7 +773,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" }, "funding": [ { @@ -737,7 +789,7 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-04-18T09:32:20+00:00" } ], "packages-dev": [ @@ -813,16 +865,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", - "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", "shasum": "" }, "require": { @@ -830,11 +882,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", @@ -860,7 +913,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" }, "funding": [ { @@ -868,20 +921,20 @@ "type": "tidelift" } ], - "time": "2023-03-08T13:26:56+00:00" + "time": "2024-06-12T14:39:25+00:00" }, { "name": "nikic/php-parser", - "version": "v5.0.0", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", - "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/683130c2ff8c2739f4822ff7ac5c873ec529abd1", + "reference": "683130c2ff8c2739f4822ff7ac5c873ec529abd1", "shasum": "" }, "require": { @@ -892,7 +945,7 @@ }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^9.0" }, "bin": [ "bin/php-parse" @@ -924,26 +977,27 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.1.0" }, - "time": "2024-01-07T17:17:35+00:00" + "time": "2024-07-01T20:03:41+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + "reference": "54750ef60c58e43759730615a392c31c80e23176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", - "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-phar": "*", "ext-xmlwriter": "*", "phar-io/version": "^3.0.1", @@ -984,9 +1038,15 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/2.0.3" + "source": "https://github.com/phar-io/manifest/tree/2.0.4" }, - "time": "2021-07-20T11:28:43+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" }, { "name": "phar-io/version", @@ -1041,16 +1101,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.30", + "version": "9.2.31", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089" + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089", - "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", + "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", "shasum": "" }, "require": { @@ -1107,7 +1167,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" }, "funding": [ { @@ -1115,7 +1175,7 @@ "type": "github" } ], - "time": "2023-12-22T06:47:57+00:00" + "time": "2024-03-02T06:37:42+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1360,16 +1420,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.16", + "version": "9.6.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f" + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3767b2c56ce02d01e3491046f33466a1ae60a37f", - "reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8", + "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8", "shasum": "" }, "require": { @@ -1443,7 +1503,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.16" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19" }, "funding": [ { @@ -1459,20 +1519,20 @@ "type": "tidelift" } ], - "time": "2024-01-19T07:03:14+00:00" + "time": "2024-04-05T04:35:58+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", "shasum": "" }, "require": { @@ -1507,7 +1567,7 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" }, "funding": [ { @@ -1515,7 +1575,7 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-03-02T06:27:43+00:00" }, { "name": "sebastian/code-unit", @@ -1761,16 +1821,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -1815,7 +1875,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -1823,7 +1883,7 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "sebastian/environment", @@ -1890,16 +1950,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.5", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", - "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", + "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", "shasum": "" }, "require": { @@ -1955,7 +2015,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" }, "funding": [ { @@ -1963,20 +2023,20 @@ "type": "github" } ], - "time": "2022-09-14T06:03:37+00:00" + "time": "2024-03-02T06:33:00+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.6", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bde739e7565280bda77be70044ac1047bc007e34" + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", - "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", "shasum": "" }, "require": { @@ -2019,7 +2079,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" }, "funding": [ { @@ -2027,7 +2087,7 @@ "type": "github" } ], - "time": "2023-08-02T09:26:13+00:00" + "time": "2024-03-02T06:35:11+00:00" }, { "name": "sebastian/lines-of-code", @@ -2263,16 +2323,16 @@ }, { "name": "sebastian/resource-operations", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", + "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", "shasum": "" }, "require": { @@ -2284,7 +2344,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -2305,8 +2365,7 @@ "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" }, "funding": [ { @@ -2314,7 +2373,7 @@ "type": "github" } ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-03-14T16:00:52+00:00" }, { "name": "sebastian/type", @@ -2427,16 +2486,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.8.1", + "version": "3.10.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "14f5fff1e64118595db5408e946f3a22c75807f7" + "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/14f5fff1e64118595db5408e946f3a22c75807f7", - "reference": "14f5fff1e64118595db5408e946f3a22c75807f7", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877", + "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877", "shasum": "" }, "require": { @@ -2503,20 +2562,20 @@ "type": "open_collective" } ], - "time": "2024-01-11T20:47:48+00:00" + "time": "2024-05-22T21:24:41+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.30.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", "shasum": "" }, "require": { @@ -2530,9 +2589,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -2570,7 +2626,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" }, "funding": [ { @@ -2586,20 +2642,20 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-06-19T12:30:46+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.4.2", + "version": "v6.4.9", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "68d6573ec98715ddcae5a0a85bee3c1c27a4c33f" + "reference": "c31566e4ca944271cc8d8ac6887cbf31b8c6a172" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/68d6573ec98715ddcae5a0a85bee3c1c27a4c33f", - "reference": "68d6573ec98715ddcae5a0a85bee3c1c27a4c33f", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c31566e4ca944271cc8d8ac6887cbf31b8c6a172", + "reference": "c31566e4ca944271cc8d8ac6887cbf31b8c6a172", "shasum": "" }, "require": { @@ -2655,7 +2711,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.2" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.9" }, "funding": [ { @@ -2671,20 +2727,20 @@ "type": "tidelift" } ], - "time": "2023-12-28T19:16:56+00:00" + "time": "2024-06-27T13:23:14+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", - "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", + "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", "shasum": "" }, "require": { @@ -2713,7 +2769,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.2" + "source": "https://github.com/theseer/tokenizer/tree/1.2.3" }, "funding": [ { @@ -2721,7 +2777,7 @@ "type": "github" } ], - "time": "2023-11-20T00:12:19+00:00" + "time": "2024-03-03T12:36:25+00:00" } ], "aliases": [], diff --git a/src/MiddlewareConnector.php b/src/MiddlewareConnector.php index ae3fa08..4e156ff 100644 --- a/src/MiddlewareConnector.php +++ b/src/MiddlewareConnector.php @@ -48,14 +48,21 @@ use Saloon\Contracts\Authenticator; use Saloon\Http\PendingRequest; use Saloon\Http\Connector; +use Saloon\Http\Request; +use Saloon\Http\Response; +use Saloon\PaginationPlugin\Contracts\HasPagination; +use Saloon\PaginationPlugin\OffsetPaginator; +use Saloon\PaginationPlugin\PagedPaginator; use Saloon\RateLimitPlugin\Contracts\RateLimitStore; use Saloon\RateLimitPlugin\Limit; use Saloon\RateLimitPlugin\Stores\MemoryStore; use Saloon\RateLimitPlugin\Traits\HasRateLimits; +use Saloon\Traits\Plugins\AlwaysThrowOnErrors; -class MiddlewareConnector extends Connector +class MiddlewareConnector extends Connector implements HasPagination { use HasRateLimits; + use AlwaysThrowOnErrors; public const BASE_URL_EU_DEV = 'https://eu-dev.middleware.ewarehousing-solutions.com'; public const BASE_URL_EU = 'https://eu.middleware.ewarehousing-solutions.com'; @@ -198,4 +205,32 @@ protected function resolveRateLimitStore(): RateLimitStore { return new MemoryStore(); } + + public function paginate(Request $request): OffsetPaginator + { + return new class(connector: $this, request: $request) extends OffsetPaginator + { + protected ?int $perPageLimit = 100; + + protected function isLastPage(Response $response): bool + { + return count($this->getPageItems($response, $this->request)) < $this->perPageLimit; + } + + protected function getPageItems(Response $response, Request $request): array + { + return $response->json(); + } + + protected function applyPagination(Request $request): Request + { + $request->query()->merge([ + 'page' => $this->getCurrentPage(), + 'limit' => $this->perPageLimit, + ]); + + return $request; + } + }; + } } diff --git a/src/Requests/Article/GetArticleCollectionRequest.php b/src/Requests/Article/GetArticleCollectionRequest.php index 34829cc..434a4ed 100644 --- a/src/Requests/Article/GetArticleCollectionRequest.php +++ b/src/Requests/Article/GetArticleCollectionRequest.php @@ -10,8 +10,9 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; -class GetArticleCollectionRequest extends Request +class GetArticleCollectionRequest extends Request implements Paginatable { protected Method $method = Method::GET; diff --git a/src/Requests/Batch/GetBatchCollectionRequest.php b/src/Requests/Batch/GetBatchCollectionRequest.php index 1f380ab..216909d 100644 --- a/src/Requests/Batch/GetBatchCollectionRequest.php +++ b/src/Requests/Batch/GetBatchCollectionRequest.php @@ -10,8 +10,9 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; -class GetBatchCollectionRequest extends Request +class GetBatchCollectionRequest extends Request implements Paginatable { protected Method $method = Method::GET; diff --git a/src/Requests/Customer/GetCustomerCollectionRequest.php b/src/Requests/Customer/GetCustomerCollectionRequest.php index a3cbabf..fe19979 100644 --- a/src/Requests/Customer/GetCustomerCollectionRequest.php +++ b/src/Requests/Customer/GetCustomerCollectionRequest.php @@ -4,8 +4,9 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; -class GetCustomerCollectionRequest extends Request +class GetCustomerCollectionRequest extends Request implements Paginatable { protected Method $method = Method::GET; diff --git a/src/Requests/Inbound/GetInboundCollectionRequest.php b/src/Requests/Inbound/GetInboundCollectionRequest.php index 3bbddd2..92020a9 100644 --- a/src/Requests/Inbound/GetInboundCollectionRequest.php +++ b/src/Requests/Inbound/GetInboundCollectionRequest.php @@ -10,8 +10,9 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; -class GetInboundCollectionRequest extends Request +class GetInboundCollectionRequest extends Request implements Paginatable { protected Method $method = Method::GET; diff --git a/src/Requests/Logs/GetLogsCollectionRequest.php b/src/Requests/Logs/GetLogsCollectionRequest.php index 3d33dbd..ea1c787 100644 --- a/src/Requests/Logs/GetLogsCollectionRequest.php +++ b/src/Requests/Logs/GetLogsCollectionRequest.php @@ -10,8 +10,9 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; -class GetLogsCollectionRequest extends Request +class GetLogsCollectionRequest extends Request implements Paginatable { protected Method $method = Method::GET; diff --git a/src/Requests/Order/GetOrderCollectionRequest.php b/src/Requests/Order/GetOrderCollectionRequest.php index 39cec7e..aec6c3a 100644 --- a/src/Requests/Order/GetOrderCollectionRequest.php +++ b/src/Requests/Order/GetOrderCollectionRequest.php @@ -10,8 +10,9 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; -class GetOrderCollectionRequest extends Request +class GetOrderCollectionRequest extends Request implements Paginatable { protected Method $method = Method::GET; diff --git a/src/Requests/Order/GetOrderDocumentCollectionRequest.php b/src/Requests/Order/GetOrderDocumentCollectionRequest.php index c2531c7..1927366 100644 --- a/src/Requests/Order/GetOrderDocumentCollectionRequest.php +++ b/src/Requests/Order/GetOrderDocumentCollectionRequest.php @@ -10,8 +10,9 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; -class GetOrderDocumentCollectionRequest extends Request +class GetOrderDocumentCollectionRequest extends Request implements Paginatable { protected Method $method = Method::GET; diff --git a/src/Requests/Shipment/GetShipmentCollectionRequest.php b/src/Requests/Shipment/GetShipmentCollectionRequest.php index 9c55c22..9834116 100644 --- a/src/Requests/Shipment/GetShipmentCollectionRequest.php +++ b/src/Requests/Shipment/GetShipmentCollectionRequest.php @@ -10,8 +10,9 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; -class GetShipmentCollectionRequest extends Request +class GetShipmentCollectionRequest extends Request implements Paginatable { protected Method $method = Method::GET; diff --git a/src/Requests/ShippingMethod/GetShippingMethodCollectionRequest.php b/src/Requests/ShippingMethod/GetShippingMethodCollectionRequest.php index 4bae099..f763f53 100644 --- a/src/Requests/ShippingMethod/GetShippingMethodCollectionRequest.php +++ b/src/Requests/ShippingMethod/GetShippingMethodCollectionRequest.php @@ -10,8 +10,9 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; -class GetShippingMethodCollectionRequest extends Request +class GetShippingMethodCollectionRequest extends Request implements Paginatable { protected Method $method = Method::GET; diff --git a/src/Requests/StockLevel/GetStockLevelCollectionRequest.php b/src/Requests/StockLevel/GetStockLevelCollectionRequest.php index 2ee7b50..1a68ae9 100644 --- a/src/Requests/StockLevel/GetStockLevelCollectionRequest.php +++ b/src/Requests/StockLevel/GetStockLevelCollectionRequest.php @@ -10,8 +10,9 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; -class GetStockLevelCollectionRequest extends Request +class GetStockLevelCollectionRequest extends Request implements Paginatable { protected Method $method = Method::GET; diff --git a/src/Requests/Variant/GetVariantCollectionRequest.php b/src/Requests/Variant/GetVariantCollectionRequest.php index d4a6a89..de53a4f 100644 --- a/src/Requests/Variant/GetVariantCollectionRequest.php +++ b/src/Requests/Variant/GetVariantCollectionRequest.php @@ -10,8 +10,9 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; -class GetVariantCollectionRequest extends Request +class GetVariantCollectionRequest extends Request implements Paginatable { protected Method $method = Method::GET; diff --git a/src/Requests/Webhook/GetWebhookCollectionRequest.php b/src/Requests/Webhook/GetWebhookCollectionRequest.php index 5bf34b4..e5fc62a 100644 --- a/src/Requests/Webhook/GetWebhookCollectionRequest.php +++ b/src/Requests/Webhook/GetWebhookCollectionRequest.php @@ -10,8 +10,9 @@ use Saloon\Enums\Method; use Saloon\Http\Request; +use Saloon\PaginationPlugin\Contracts\Paginatable; -class GetWebhookCollectionRequest extends Request +class GetWebhookCollectionRequest extends Request implements Paginatable { protected Method $method = Method::GET;