Jelajahi Sumber

remove meilisearch(php7.4 required)

joe 3 tahun lalu
induk
melakukan
dce3546ce9
100 mengubah file dengan 266 tambahan dan 7389 penghapusan
  1. 26 26
      app/models/store/StoreProduct.php
  2. 1 4
      composer.json
  3. 84 788
      composer.lock
  4. 61 61
      tw/command/Maintain.php
  5. 0 2
      vendor/clue/stream-filter/.github/FUNDING.yml
  6. 0 86
      vendor/clue/stream-filter/CHANGELOG.md
  7. 0 21
      vendor/clue/stream-filter/LICENSE
  8. 0 326
      vendor/clue/stream-filter/README.md
  9. 0 26
      vendor/clue/stream-filter/composer.json
  10. 0 120
      vendor/clue/stream-filter/src/CallbackFilter.php
  11. 0 327
      vendor/clue/stream-filter/src/functions.php
  12. 0 6
      vendor/clue/stream-filter/src/functions_include.php
  13. 0 6
      vendor/composer/autoload_classmap.php
  14. 2 7
      vendor/composer/autoload_files.php
  15. 1 14
      vendor/composer/autoload_psr4.php
  16. 3 84
      vendor/composer/autoload_static.php
  17. 84 818
      vendor/composer/installed.json
  18. 2 176
      vendor/composer/installed.php
  19. 2 2
      vendor/composer/platform_check.php
  20. 0 21
      vendor/http-interop/http-factory-guzzle/LICENSE
  21. 0 3
      vendor/http-interop/http-factory-guzzle/README.md
  22. 0 33
      vendor/http-interop/http-factory-guzzle/composer.json
  23. 0 15
      vendor/http-interop/http-factory-guzzle/src/RequestFactory.php
  24. 0 15
      vendor/http-interop/http-factory-guzzle/src/ResponseFactory.php
  25. 0 24
      vendor/http-interop/http-factory-guzzle/src/ServerRequestFactory.php
  26. 0 43
      vendor/http-interop/http-factory-guzzle/src/StreamFactory.php
  27. 0 25
      vendor/http-interop/http-factory-guzzle/src/UploadedFileFactory.php
  28. 0 15
      vendor/http-interop/http-factory-guzzle/src/UriFactory.php
  29. 0 21
      vendor/meilisearch/meilisearch-php/LICENSE
  30. 0 285
      vendor/meilisearch/meilisearch-php/README.md
  31. 0 60
      vendor/meilisearch/meilisearch-php/composer.json
  32. 0 54
      vendor/meilisearch/meilisearch-php/src/Client.php
  33. 0 21
      vendor/meilisearch/meilisearch-php/src/Contracts/Endpoint.php
  34. 0 18
      vendor/meilisearch/meilisearch-php/src/Contracts/Http.php
  35. 0 64
      vendor/meilisearch/meilisearch-php/src/Delegates/HandlesIndex.php
  36. 0 34
      vendor/meilisearch/meilisearch-php/src/Delegates/HandlesSystem.php
  37. 0 104
      vendor/meilisearch/meilisearch-php/src/Endpoints/Delegates/HandlesDocuments.php
  38. 0 18
      vendor/meilisearch/meilisearch-php/src/Endpoints/Delegates/HandlesDumps.php
  39. 0 33
      vendor/meilisearch/meilisearch-php/src/Endpoints/Delegates/HandlesKeys.php
  40. 0 150
      vendor/meilisearch/meilisearch-php/src/Endpoints/Delegates/HandlesSettings.php
  41. 0 28
      vendor/meilisearch/meilisearch-php/src/Endpoints/Delegates/HandlesTasks.php
  42. 0 22
      vendor/meilisearch/meilisearch-php/src/Endpoints/Dumps.php
  43. 0 12
      vendor/meilisearch/meilisearch-php/src/Endpoints/Health.php
  44. 0 239
      vendor/meilisearch/meilisearch-php/src/Endpoints/Indexes.php
  45. 0 37
      vendor/meilisearch/meilisearch-php/src/Endpoints/Keys.php
  46. 0 12
      vendor/meilisearch/meilisearch-php/src/Endpoints/Stats.php
  47. 0 50
      vendor/meilisearch/meilisearch-php/src/Endpoints/Tasks.php
  48. 0 12
      vendor/meilisearch/meilisearch-php/src/Endpoints/Version.php
  49. 0 89
      vendor/meilisearch/meilisearch-php/src/Exceptions/ApiException.php
  50. 0 15
      vendor/meilisearch/meilisearch-php/src/Exceptions/CommunicationException.php
  51. 0 28
      vendor/meilisearch/meilisearch-php/src/Exceptions/InvalidArgumentException.php
  52. 0 48
      vendor/meilisearch/meilisearch-php/src/Exceptions/InvalidResponseBodyException.php
  53. 0 16
      vendor/meilisearch/meilisearch-php/src/Exceptions/JsonDecodingException.php
  54. 0 16
      vendor/meilisearch/meilisearch-php/src/Exceptions/JsonEncodingException.php
  55. 0 32
      vendor/meilisearch/meilisearch-php/src/Exceptions/TimeOutException.php
  56. 0 195
      vendor/meilisearch/meilisearch-php/src/Http/Client.php
  57. 0 43
      vendor/meilisearch/meilisearch-php/src/Http/Serialize/Json.php
  58. 0 31
      vendor/meilisearch/meilisearch-php/src/Http/Serialize/SerializerInterface.php
  59. 0 15
      vendor/meilisearch/meilisearch-php/src/MeiliSearch.php
  60. 0 198
      vendor/meilisearch/meilisearch-php/src/Search/SearchResult.php
  61. 0 24
      vendor/php-http/client-common/.php_cs.dist
  62. 0 276
      vendor/php-http/client-common/CHANGELOG.md
  63. 0 19
      vendor/php-http/client-common/LICENSE
  64. 0 55
      vendor/php-http/client-common/README.md
  65. 0 67
      vendor/php-http/client-common/composer.json
  66. 0 42
      vendor/php-http/client-common/src/BatchClient.php
  67. 0 34
      vendor/php-http/client-common/src/BatchClientInterface.php
  68. 0 157
      vendor/php-http/client-common/src/BatchResult.php
  69. 0 152
      vendor/php-http/client-common/src/Deferred.php
  70. 0 25
      vendor/php-http/client-common/src/EmulatedHttpAsyncClient.php
  71. 0 24
      vendor/php-http/client-common/src/EmulatedHttpClient.php
  72. 0 37
      vendor/php-http/client-common/src/Exception/BatchException.php
  73. 0 16
      vendor/php-http/client-common/src/Exception/CircularRedirectionException.php
  74. 0 16
      vendor/php-http/client-common/src/Exception/ClientErrorException.php
  75. 0 33
      vendor/php-http/client-common/src/Exception/HttpClientNoMatchException.php
  76. 0 16
      vendor/php-http/client-common/src/Exception/HttpClientNotFoundException.php
  77. 0 16
      vendor/php-http/client-common/src/Exception/LoopException.php
  78. 0 16
      vendor/php-http/client-common/src/Exception/MultipleRedirectionException.php
  79. 0 16
      vendor/php-http/client-common/src/Exception/ServerErrorException.php
  80. 0 36
      vendor/php-http/client-common/src/FlexibleHttpClient.php
  81. 0 31
      vendor/php-http/client-common/src/HttpAsyncClientDecorator.php
  82. 0 39
      vendor/php-http/client-common/src/HttpAsyncClientEmulator.php
  83. 0 32
      vendor/php-http/client-common/src/HttpClientDecorator.php
  84. 0 35
      vendor/php-http/client-common/src/HttpClientEmulator.php
  85. 0 24
      vendor/php-http/client-common/src/HttpClientPool.php
  86. 0 70
      vendor/php-http/client-common/src/HttpClientPool/HttpClientPool.php
  87. 0 181
      vendor/php-http/client-common/src/HttpClientPool/HttpClientPoolItem.php
  88. 0 45
      vendor/php-http/client-common/src/HttpClientPool/LeastUsedClientPool.php
  89. 0 31
      vendor/php-http/client-common/src/HttpClientPool/RandomClientPool.php
  90. 0 42
      vendor/php-http/client-common/src/HttpClientPool/RoundRobinClientPool.php
  91. 0 74
      vendor/php-http/client-common/src/HttpClientRouter.php
  92. 0 27
      vendor/php-http/client-common/src/HttpClientRouterInterface.php
  93. 0 150
      vendor/php-http/client-common/src/HttpMethodsClient.php
  94. 0 116
      vendor/php-http/client-common/src/HttpMethodsClientInterface.php
  95. 0 33
      vendor/php-http/client-common/src/Plugin.php
  96. 0 76
      vendor/php-http/client-common/src/Plugin/AddHostPlugin.php
  97. 0 78
      vendor/php-http/client-common/src/Plugin/AddPathPlugin.php
  98. 0 38
      vendor/php-http/client-common/src/Plugin/AuthenticationPlugin.php
  99. 0 57
      vendor/php-http/client-common/src/Plugin/BaseUriPlugin.php
  100. 0 39
      vendor/php-http/client-common/src/Plugin/ContentLengthPlugin.php

+ 26 - 26
app/models/store/StoreProduct.php

@@ -16,7 +16,7 @@ use app\models\store\{
 };
 use app\models\user\UserSearch;
 use think\facade\Config;
-use MeiliSearch\Client;
+// use MeiliSearch\Client;
 
 /**
  * TODO 产品Model
@@ -98,29 +98,29 @@ class StoreProduct extends BaseModel
      * @param string $keywords 搜索关键字
      * @return json 直接返回搜索结果到前端
      */
-    protected static function search_by_keywords($keywords, $uid)
-    {
-        $show_benefit = Config::get('app.show_benefit', false);
-
-        $ml = new Client(config('meilisearch.addr', '127.0.0.1'), config('meilisearch.key'));
-        $idx = $ml->index('products');
-        $hits = $idx->search($keywords)->getHits();
-
-        $list = [];
-        $fields = 'id,store_name,cate_id,image,price,stock,spec_type';
-        $fields = explode(',', $fields);
-        // shrink hits in-place
-        foreach ($hits as $hit) {
-            $item = [];
-            foreach ($fields as $field) {
-                $item[$field] = $hit[$field];
-            }
-            $item['sales'] = $hit['sales'] + $hit['ficti'];
-
-            $list[] = $item;
-        }
-        return self::setLevelPrice($list, $uid);
-    }
+    // protected static function search_by_keywords($keywords, $uid)
+    // {
+    //     $show_benefit = Config::get('app.show_benefit', false);
+
+    //     $ml = new Client(config('meilisearch.addr', '127.0.0.1'), config('meilisearch.key'));
+    //     $idx = $ml->index('products');
+    //     $hits = $idx->search($keywords)->getHits();
+
+    //     $list = [];
+    //     $fields = 'id,store_name,cate_id,image,price,stock,spec_type';
+    //     $fields = explode(',', $fields);
+    //     // shrink hits in-place
+    //     foreach ($hits as $hit) {
+    //         $item = [];
+    //         foreach ($fields as $field) {
+    //             $item[$field] = $hit[$field];
+    //         }
+    //         $item['sales'] = $hit['sales'] + $hit['ficti'];
+
+    //         $list[] = $item;
+    //     }
+    //     return self::setLevelPrice($list, $uid);
+    // }
 
     public static function getProductList($data, $uid)
     {
@@ -148,8 +148,8 @@ class StoreProduct extends BaseModel
         if (!empty($keyword)) {
             UserSearch::InsertHistory($uid ?? 1, $keyword);
 
-            return self::search_by_keywords($keyword, $uid);
-            // $model->where('keyword|store_name', 'LIKE', htmlspecialchars("%$keyword%"));
+            // return self::search_by_keywords($keyword, $uid);
+            $model->where('keyword|store_name', 'LIKE', htmlspecialchars("%$keyword%"));
         }
         if ($news != 0) {
             $model->where('is_new', 1);

+ 1 - 4
composer.json

@@ -44,10 +44,7 @@
         "pda/pheanstalk": "^4.0",
         "robthree/twofactorauth": "^1.8",
         "yurunsoft/yurun-oauth-login": "^3.0",
-        "yurunsoft/pay-sdk": "^3.1",
-        "meilisearch/meilisearch-php": "^0.22.0",
-        "php-http/guzzle6-adapter": "^2.0",
-        "http-interop/http-factory-guzzle": "^1.0"
+        "yurunsoft/pay-sdk": "^3.1"
     },
     "autoload": {
         "psr-4": {

File diff ditekan karena terlalu besar
+ 84 - 788
composer.lock


+ 61 - 61
tw/command/Maintain.php

@@ -13,7 +13,7 @@ use think\console\Input;
 use think\console\input\Argument;
 use think\console\Output;
 use \think\facade\Config;
-use MeiliSearch\Client;
+// use MeiliSearch\Client;
 use tw\lib\robot\Robots;
 
 /**
@@ -351,66 +351,66 @@ class Maintain extends Command
      * 因为这样实现简单,另外商品总的数据量不会很大
      * 
      */
-    protected function reindex()
-    {
-        $ml = new Client(config('meilisearch.addr'), config('meilisearch.key'));
-        // remove first
-        $ml->deleteIndex('products');
-        // rebuild
-        $idx = $ml->index('products');
-
-        // setup
-        $idx->updateSearchableAttributes([
-            'store_name',
-            'store_info',
-            'keyword',
-        ]);
-        $idx->updateFilterableAttributes([
-            'cate_id',
-            'price',
-            'is_hot',
-            'is_benefit',
-            'is_best',
-            'is_new',
-            'add_time',
-            'is_good',
-        ]);
-        $idx->updateSortableAttributes([
-            'price',
-            'sales',
-            'cost',
-            'browse',
-        ]);
-        // get all products
-        $page = 1;
-        $limit = 20;
-        $count = 0;
-        while (true) {
-            $products = StoreProduct::where('is_del', 0)
-                ->where('stock', '>', 0)
-                ->where('is_show', 1)
-                ->field('id,image,slider_image,store_name,
-                    store_info,keyword,cate_id,price,vip_price,ot_price,postage,
-                    unit_name,sort,sales,stock,
-                    is_hot,is_benefit,is_best,is_new,add_time,is_postage, 
-                    give_integral,cost,is_good,ficti,spec_type,browse')
-                ->page($page, $limit)->select()->toArray();
-
-            $count += count($products);
-
-            if (count($products) > 0) {
-                $idx->addDocuments($products, 'id');
-            }
-            // no more rows
-            if (count($products) < $limit) {
-                break;
-            }
-
-            // loop
-            $page += 1;
-        }
-        echo "re-index all products finished. total=$count" . PHP_EOL;
-    }
+    // protected function reindex()
+    // {
+    //     $ml = new Client(config('meilisearch.addr'), config('meilisearch.key'));
+    //     // remove first
+    //     $ml->deleteIndex('products');
+    //     // rebuild
+    //     $idx = $ml->index('products');
+
+    //     // setup
+    //     $idx->updateSearchableAttributes([
+    //         'store_name',
+    //         'store_info',
+    //         'keyword',
+    //     ]);
+    //     $idx->updateFilterableAttributes([
+    //         'cate_id',
+    //         'price',
+    //         'is_hot',
+    //         'is_benefit',
+    //         'is_best',
+    //         'is_new',
+    //         'add_time',
+    //         'is_good',
+    //     ]);
+    //     $idx->updateSortableAttributes([
+    //         'price',
+    //         'sales',
+    //         'cost',
+    //         'browse',
+    //     ]);
+    //     // get all products
+    //     $page = 1;
+    //     $limit = 20;
+    //     $count = 0;
+    //     while (true) {
+    //         $products = StoreProduct::where('is_del', 0)
+    //             ->where('stock', '>', 0)
+    //             ->where('is_show', 1)
+    //             ->field('id,image,slider_image,store_name,
+    //                 store_info,keyword,cate_id,price,vip_price,ot_price,postage,
+    //                 unit_name,sort,sales,stock,
+    //                 is_hot,is_benefit,is_best,is_new,add_time,is_postage, 
+    //                 give_integral,cost,is_good,ficti,spec_type,browse')
+    //             ->page($page, $limit)->select()->toArray();
+
+    //         $count += count($products);
+
+    //         if (count($products) > 0) {
+    //             $idx->addDocuments($products, 'id');
+    //         }
+    //         // no more rows
+    //         if (count($products) < $limit) {
+    //             break;
+    //         }
+
+    //         // loop
+    //         $page += 1;
+    //     }
+    //     echo "re-index all products finished. total=$count" . PHP_EOL;
+    // }
 
     protected function _all_products_on_sale()
     {

+ 0 - 2
vendor/clue/stream-filter/.github/FUNDING.yml

@@ -1,2 +0,0 @@
-github: clue
-custom: https://clue.engineering/support

+ 0 - 86
vendor/clue/stream-filter/CHANGELOG.md

@@ -1,86 +0,0 @@
-# Changelog
-
-## 1.6.0 (2022-02-21)
-
-*   Feature: Support PHP 8.1 release.
-    (#45 by @clue)
-
-*   Improve documentation to use fully-qualified function names.
-    (#43 by @SimonFrings and #42 by @PaulRotmann)
-
-*   Improve test suite and use GitHub actions for continuous integration (CI).
-    (#39 and #40 by @SimonFrings)
-
-## 1.5.0 (2020-10-02)
-
-*   Feature: Improve performance by using global imports.
-    (#38 by @clue)
-
-*   Improve API documentation and add support / sponsorship info.
-    (#30 by @clue and #35 by @SimonFrings)
-
-*   Improve test suite and add `.gitattributes` to exclude dev files from exports.
-    Prepare PHP 8 support, update to PHPUnit 9 and simplify test matrix.
-    (#32 and #37 by @clue and #34 and #36 by @SimonFrings)
-
-## 1.4.1 (2019-04-09)
-
-*   Fix: Check if the function is declared before declaring it.
-    (#23 by @Niko9911)
-
-*   Improve test suite to also test against PHP 7.2 and
-    add test for base64 encoding and decoding filters.
-    (#22 by @arubacao and #25 by @Nyholm and @clue)
-
-## 1.4.0 (2017-08-18)
-
-*   Feature / Fix: The `fun()` function does not pass filter parameter `null`
-    to underlying `stream_filter_append()` by default
-    (#15 by @Nyholm)
-
-    Certain filters (such as `convert.quoted-printable-encode`) do not accept
-    a filter parameter at all. If no explicit filter parameter is given, we no
-    longer pass a default `null` value.
-
-    ```php
-    $encode = Filter\fun('convert.quoted-printable-encode');
-    assert('t=C3=A4st' === $encode('täst'));
-    ```
-
-*   Add examples and improve documentation
-    (#13 and #20 by @clue and #18 by @Nyholm)
-
-*   Improve test suite by adding PHPUnit to require-dev,
-    fix HHVM build for now again and ignore future HHVM build errors,
-    lock Travis distro so new future defaults will not break the build
-    and test on PHP 7.1
-    (#12, #14 and #19 by @clue and #16 by @Nyholm)
-
-## 1.3.0 (2015-11-08)
-
-*   Feature: Support accessing built-in filters as callbacks
-    (#5 by @clue)
-
-    ```php
-    $fun = Filter\fun('zlib.deflate');
-
-    $ret = $fun('hello') . $fun('world') . $fun();
-    assert('helloworld' === gzinflate($ret));
-    ```
-
-## 1.2.0 (2015-10-23)
-
-* Feature: Invoke close event when closing filter (flush buffer)
-  (#9 by @clue)
-
-## 1.1.0 (2015-10-22)
-
-* Feature: Abort filter operation when catching an Exception
-  (#10 by @clue)
-
-* Feature: Additional safeguards to prevent filter state corruption
-  (#7 by @clue)
-
-## 1.0.0 (2015-10-18)
-
-* First tagged release

+ 0 - 21
vendor/clue/stream-filter/LICENSE

@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Christian Lück
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.

+ 0 - 326
vendor/clue/stream-filter/README.md

@@ -1,326 +0,0 @@
-# clue/stream-filter
-
-[![CI status](https://github.com/clue/stream-filter/workflows/CI/badge.svg)](https://github.com/clue/stream-filter/actions)
-[![installs on Packagist](https://img.shields.io/packagist/dt/clue/stream-filter?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/stream-filter)
-
-A simple and modern approach to stream filtering in PHP
-
-**Table of contents**
-
-* [Why?](#why)
-* [Support us](#support-us)
-* [Usage](#usage)
-    * [append()](#append)
-    * [prepend()](#prepend)
-    * [fun()](#fun)
-    * [remove()](#remove)
-* [Install](#install)
-* [Tests](#tests)
-* [License](#license)
-
-## Why?
-
-PHP's stream filtering system is great!
-
-It offers very powerful stream filtering options and comes with a useful set of built-in filters.
-These filters can be used to easily and efficiently perform various transformations on-the-fly, such as:
-
-* read from a gzip'ed input file,
-* transcode from ISO-8859-1 (Latin1) to UTF-8,
-* write to a bzip output file
-* and much more.
-
-But let's face it:
-Its API is [*difficult to work with*](https://www.php.net/manual/en/php-user-filter.filter.php)
-and its documentation is [*subpar*](https://stackoverflow.com/questions/27103269/what-is-a-bucket-brigade).
-This combined means its powerful features are often neglected.
-
-This project aims to make these features more accessible to a broader audience.
-* **Lightweight, SOLID design** -
-  Provides a thin abstraction that is [*just good enough*](https://en.wikipedia.org/wiki/Principle_of_good_enough)
-  and does not get in your way.
-  Custom filters require trivial effort.
-* **Good test coverage** -
-  Comes with an automated tests suite and is regularly tested in the *real world*
-
-## Support us
-
-We invest a lot of time developing, maintaining and updating our awesome
-open-source projects. You can help us sustain this high-quality of our work by
-[becoming a sponsor on GitHub](https://github.com/sponsors/clue). Sponsors get
-numerous benefits in return, see our [sponsoring page](https://github.com/sponsors/clue)
-for details.
-
-Let's take these projects to the next level together! 🚀
-
-## Usage
-
-This lightweight library consists only of a few simple functions.
-All functions reside under the `Clue\StreamFilter` namespace.
-
-The below examples refer to all functions with their fully-qualified names like this:
-
-```php
-Clue\StreamFilter\append(…);
-```
-
-As of PHP 5.6+ you can also import each required function into your code like this:
-
-```php
-use function Clue\StreamFilter\append;
-
-append(…);
-```
-
-Alternatively, you can also use an import statement similar to this:
-
-```php
-use Clue\StreamFilter as Filter;
-
-Filter\append(…);
-```
-
-### append()
-
-The `append(resource<stream> $stream, callable $callback, int $read_write = STREAM_FILTER_ALL): resource<stream filter>` function can be used to
-append a filter callback to the given stream.
-
-Each stream can have a list of filters attached.
-This function appends a filter to the end of this list.
-
-If the given filter can not be added, it throws an `Exception`.
-
-The `$stream` can be any valid stream resource, such as:
-
-```php
-$stream = fopen('demo.txt', 'w+');
-```
-
-The `$callback` should be a valid callable function which accepts 
-an individual chunk of data and should return the updated chunk:
-
-```php
-$filter = Clue\StreamFilter\append($stream, function ($chunk) {
-    // will be called each time you read or write a $chunk to/from the stream
-    return $chunk;
-});
-```
-
-As such, you can also use native PHP functions or any other `callable`:
-
-```php
-Clue\StreamFilter\append($stream, 'strtoupper');
-
-// will write "HELLO" to the underlying stream
-fwrite($stream, 'hello');
-```
-
-If the `$callback` accepts invocation without parameters,
-then this signature will be invoked once ending (flushing) the filter:
-
-```php
-Clue\StreamFilter\append($stream, function ($chunk = null) {
-    if ($chunk === null) {
-        // will be called once ending the filter
-        return 'end';
-    }
-    // will be called each time you read or write a $chunk to/from the stream
-    return $chunk;
-});
-
-fclose($stream);
-```
-
-> Note: Legacy PHP versions (PHP < 5.4) do not support passing additional data
-from the end signal handler if the stream is being closed.
-
-If your callback throws an `Exception`, then the filter process will be aborted.
-In order to play nice with PHP's stream handling,
-the `Exception` will be transformed to a PHP warning instead:
-
-```php
-Clue\StreamFilter\append($stream, function ($chunk) {
-    throw new \RuntimeException('Unexpected chunk');
-});
-
-// raises an E_USER_WARNING with "Error invoking filter: Unexpected chunk"
-fwrite($stream, 'hello');
-```
-
-The optional `$read_write` parameter can be used to only invoke the `$callback`
-when either writing to the stream or only when reading from the stream:
-
-```php
-Clue\StreamFilter\append($stream, function ($chunk) {
-    // will be called each time you write to the stream
-    return $chunk;
-}, STREAM_FILTER_WRITE);
-
-Clue\StreamFilter\append($stream, function ($chunk) {
-    // will be called each time you read from the stream
-    return $chunk;
-}, STREAM_FILTER_READ);
-```
-
-This function returns a filter resource which can be passed to [`remove()`](#remove).
-
-> Note that once a filter has been added to stream, the stream can no longer be passed to
-> [`stream_select()`](https://www.php.net/manual/en/function.stream-select.php)
-> (and family).
->
-> > Warning: stream_select(): cannot cast a filtered stream on this system in {file} on line {line}
->
-> This is due to limitations of PHP's stream filter support, as it can no longer reliably
-> tell when the underlying stream resource is actually ready.
-> As an alternative, consider calling `stream_select()` on the unfiltered stream and
-> then pass the unfiltered data through the [`fun()`](#fun) function.
-
-### prepend()
-
-The `prepend(resource<stream> $stream, callable $callback, int $read_write = STREAM_FILTER_ALL): resource<stream filter>` function can be used to
-prepend a filter callback to the given stream.
-
-Each stream can have a list of filters attached.
-This function prepends a filter to the start of this list.
-
-If the given filter can not be added, it throws an `Exception`.
-
-```php
-$filter = Clue\StreamFilter\prepend($stream, function ($chunk) {
-    // will be called each time you read or write a $chunk to/from the stream
-    return $chunk;
-});
-```
-
-This function returns a filter resource which can be passed to [`remove()`](#remove).
-
-Except for the position in the list of filters, this function behaves exactly
-like the [`append()`](#append) function.
-For more details about its behavior, see also the [`append()`](#append) function.
-
-### fun()
-
-The `fun(string $filter, mixed $parameters = null): callable` function can be used to
-create a filter function which uses the given built-in `$filter`.
-
-PHP comes with a useful set of [built-in filters](https://www.php.net/manual/en/filters.php).
-Using `fun()` makes accessing these as easy as passing an input string to filter
-and getting the filtered output string.
-
-```php
-$fun = Clue\StreamFilter\fun('string.rot13');
-
-assert('grfg' === $fun('test'));
-assert('test' === $fun($fun('test'));
-```
-
-Please note that not all filter functions may be available depending 
-on installed PHP extensions and the PHP version in use.
-In particular, [HHVM](https://hhvm.com/) may not offer the same filter functions
-or parameters as Zend PHP.
-Accessing an unknown filter function will result in a `RuntimeException`:
-
-```php
-Clue\StreamFilter\fun('unknown'); // throws RuntimeException
-```
-
-Some filters may accept or require additional filter parameters – most
-filters do not require filter parameters.
-If given, the optional `$parameters` argument will be passed to the
-underlying filter handler as-is.
-In particular, note how *not passing* this parameter at all differs from
-explicitly passing a `null` value (which many filters do not accept).
-Please refer to the individual filter definition for more details.
-For example, the `string.strip_tags` filter can be invoked like this:
-
-```php
-$fun = Clue\StreamFilter\fun('string.strip_tags', '<a><b>');
-
-$ret = $fun('<b>h<br>i</b>');
-assert('<b>hi</b>' === $ret);
-```
-
-Under the hood, this function allocates a temporary memory stream, so it's
-recommended to clean up the filter function after use.
-Also, some filter functions (in particular the
-[zlib compression filters](https://www.php.net/manual/en/filters.compression.php))
-may use internal buffers and may emit a final data chunk on close.
-The filter function can be closed by invoking without any arguments:
-
-```php
-$fun = Clue\StreamFilter\fun('zlib.deflate');
-
-$ret = $fun('hello') . $fun('world') . $fun();
-assert('helloworld' === gzinflate($ret));
-```
-
-The filter function must not be used anymore after it has been closed.
-Doing so will result in a `RuntimeException`:
-
-```php
-$fun = Clue\StreamFilter\fun('string.rot13');
-$fun();
-
-$fun('test'); // throws RuntimeException
-```
-
-> Note: If you're using the zlib compression filters, then you should be wary
-about engine inconsistencies between different PHP versions and HHVM.
-These inconsistencies exist in the underlying PHP engines and there's little we
-can do about this in this library.
-[Our test suite](tests/) contains several test cases that exhibit these issues.
-If you feel some test case is missing or outdated, we're happy to accept PRs! :)
-
-### remove()
-
-The `remove(resource<stream filter> $filter): bool` function can be used to
-remove a filter previously added via [`append()`](#append) or [`prepend()`](#prepend).
-
-```php
-$filter = Clue\StreamFilter\append($stream, function () {
-    // …
-});
-Clue\StreamFilter\remove($filter);
-```
-
-## Install
-
-The recommended way to install this library is [through Composer](https://getcomposer.org/).
-[New to Composer?](https://getcomposer.org/doc/00-intro.md)
-
-This project follows [SemVer](https://semver.org/).
-This will install the latest supported version:
-
-```bash
-$ composer require clue/stream-filter:^1.6
-```
-
-See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
-
-This project aims to run on any platform and thus does not require any PHP
-extensions and supports running on legacy PHP 5.3 through current PHP 8+ and
-HHVM.
-It's *highly recommended to use the latest supported PHP version* for this project.
-Older PHP versions may suffer from a number of inconsistencies documented above.
-
-## Tests
-
-To run the test suite, you first need to clone this repo and then install all
-dependencies [through Composer](https://getcomposer.org/):
-
-```bash
-$ composer install
-```
-
-To run the test suite, go to the project root and run:
-
-```bash
-$ vendor/bin/phpunit
-```
-
-## License
-
-This project is released under the permissive [MIT license](LICENSE).
-
-> Did you know that I offer custom development services and issuing invoices for
-  sponsorships of releases and for contributions? Contact me (@clue) for details.

+ 0 - 26
vendor/clue/stream-filter/composer.json

@@ -1,26 +0,0 @@
-{
-    "name": "clue/stream-filter",
-    "description": "A simple and modern approach to stream filtering in PHP",
-    "keywords": ["stream", "callback", "filter", "php_user_filter", "stream_filter_append", "stream_filter_register", "bucket brigade"],
-    "homepage": "https://github.com/clue/php-stream-filter",
-    "license": "MIT",
-    "authors": [
-        {
-            "name": "Christian Lück",
-            "email": "christian@clue.engineering"
-        }
-    ],
-    "require": {
-        "php": ">=5.3"
-    },
-    "require-dev": {
-        "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36"
-    },
-    "autoload": {
-        "psr-4": { "Clue\\StreamFilter\\": "src/" },
-        "files": [ "src/functions_include.php" ]
-    },
-    "autoload-dev": {
-        "psr-4": { "Clue\\Tests\\StreamFilter\\": "tests/" }
-    }
-}

+ 0 - 120
vendor/clue/stream-filter/src/CallbackFilter.php

@@ -1,120 +0,0 @@
-<?php
-
-namespace Clue\StreamFilter;
-
-/**
- * @internal
- * @see append()
- * @see prepend()
- */
-class CallbackFilter extends \php_user_filter
-{
-    private $callback;
-    private $closed = true;
-    private $supportsClose = false;
-
-    /** @return bool */
-    #[\ReturnTypeWillChange]
-    public function onCreate()
-    {
-        $this->closed = false;
-
-        if (!\is_callable($this->params)) {
-            throw new \InvalidArgumentException('No valid callback parameter given to stream_filter_(append|prepend)');
-        }
-        $this->callback = $this->params;
-
-        // callback supports end event if it accepts invocation without arguments
-        $ref = new \ReflectionFunction($this->callback);
-        $this->supportsClose = ($ref->getNumberOfRequiredParameters() === 0);
-
-        return true;
-    }
-
-    /** @return void */
-    #[\ReturnTypeWillChange]
-    public function onClose()
-    {
-        $this->closed = true;
-
-        // callback supports closing and is not already closed
-        if ($this->supportsClose) {
-            $this->supportsClose = false;
-            // invoke without argument to signal end and discard resulting buffer
-            try {
-                \call_user_func($this->callback);
-            } catch (\Exception $ignored) {
-                // this might be called during engine shutdown, so it's not safe
-                // to raise any errors or exceptions here
-                // trigger_error('Error closing filter: ' . $ignored->getMessage(), E_USER_WARNING);
-            }
-        }
-
-        $this->callback = null;
-    }
-
-    /** @return int */
-    #[\ReturnTypeWillChange]
-    public function filter($in, $out, &$consumed, $closing)
-    {
-        // concatenate whole buffer from input brigade
-        $data = '';
-        while ($bucket = \stream_bucket_make_writeable($in)) {
-            $consumed += $bucket->datalen;
-            $data .= $bucket->data;
-        }
-
-        // skip processing callback that already ended
-        if ($this->closed) {
-            return \PSFS_FEED_ME;
-        }
-
-        // only invoke filter function if buffer is not empty
-        // this may skip flushing a closing filter
-        if ($data !== '') {
-            try {
-                $data = \call_user_func($this->callback, $data);
-            } catch (\Exception $e) {
-                // exception should mark filter as closed
-                $this->onClose();
-                \trigger_error('Error invoking filter: ' . $e->getMessage(), \E_USER_WARNING);
-
-                return \PSFS_ERR_FATAL;
-            }
-        }
-
-        // mark filter as closed after processing closing chunk
-        if ($closing) {
-            $this->closed = true;
-
-            // callback supports closing and is not already closed
-            if ($this->supportsClose) {
-                $this->supportsClose = false;
-
-                // invoke without argument to signal end and append resulting buffer
-                try {
-                    $data .= \call_user_func($this->callback);
-                } catch (\Exception $e) {
-                    \trigger_error('Error ending filter: ' . $e->getMessage(), \E_USER_WARNING);
-
-                    return \PSFS_ERR_FATAL;
-                }
-            }
-        }
-
-        if ($data !== '') {
-            // create a new bucket for writing the resulting buffer to the output brigade
-            // reusing an existing bucket turned out to be bugged in some environments (ancient PHP versions and HHVM)
-            $bucket = @\stream_bucket_new($this->stream, $data);
-
-            // legacy PHP versions (PHP < 5.4) do not support passing data from the event signal handler
-            // because closing the stream invalidates the stream and its stream bucket brigade before
-            // invoking the filter close handler.
-            if ($bucket !== false) {
-                \stream_bucket_append($out, $bucket);
-            }
-        }
-
-        return \PSFS_PASS_ON;
-    }
-}

+ 0 - 327
vendor/clue/stream-filter/src/functions.php

@@ -1,327 +0,0 @@
-<?php
-
-namespace Clue\StreamFilter;
-
-/**
- * Append a filter callback to the given stream.
- *
- * Each stream can have a list of filters attached.
- * This function appends a filter to the end of this list.
- *
- * If the given filter can not be added, it throws an `Exception`.
- *
- * The `$stream` can be any valid stream resource, such as:
- *
- * ```php
- * $stream = fopen('demo.txt', 'w+');
- * ```
- *
- * The `$callback` should be a valid callable function which accepts
- * an individual chunk of data and should return the updated chunk:
- *
- * ```php
- * $filter = Clue\StreamFilter\append($stream, function ($chunk) {
- *     // will be called each time you read or write a $chunk to/from the stream
- *     return $chunk;
- * });
- * ```
- *
- * As such, you can also use native PHP functions or any other `callable`:
- *
- * ```php
- * Clue\StreamFilter\append($stream, 'strtoupper');
- *
- * // will write "HELLO" to the underlying stream
- * fwrite($stream, 'hello');
- * ```
- *
- * If the `$callback` accepts invocation without parameters,
- * then this signature will be invoked once ending (flushing) the filter:
- *
- * ```php
- * Clue\StreamFilter\append($stream, function ($chunk = null) {
- *     if ($chunk === null) {
- *         // will be called once ending the filter
- *         return 'end';
- *     }
- *     // will be called each time you read or write a $chunk to/from the stream
- *     return $chunk;
- * });
- *
- * fclose($stream);
- * ```
- *
- * > Note: Legacy PHP versions (PHP < 5.4) do not support passing additional data
- * from the end signal handler if the stream is being closed.
- *
- * If your callback throws an `Exception`, then the filter process will be aborted.
- * In order to play nice with PHP's stream handling,
- * the `Exception` will be transformed to a PHP warning instead:
- *
- * ```php
- * Clue\StreamFilter\append($stream, function ($chunk) {
- *     throw new \RuntimeException('Unexpected chunk');
- * });
- *
- * // raises an E_USER_WARNING with "Error invoking filter: Unexpected chunk"
- * fwrite($stream, 'hello');
- * ```
- *
- * The optional `$read_write` parameter can be used to only invoke the `$callback`
- * when either writing to the stream or only when reading from the stream:
- *
- * ```php
- * Clue\StreamFilter\append($stream, function ($chunk) {
- *     // will be called each time you write to the stream
- *     return $chunk;
- * }, STREAM_FILTER_WRITE);
- *
- * Clue\StreamFilter\append($stream, function ($chunk) {
- *     // will be called each time you read from the stream
- *     return $chunk;
- * }, STREAM_FILTER_READ);
- * ```
- *
- * This function returns a filter resource which can be passed to [`remove()`](#remove).
- *
- * > Note that once a filter has been added to stream, the stream can no longer be passed to
- * > [`stream_select()`](https://www.php.net/manual/en/function.stream-select.php)
- * > (and family).
- * >
- * > > Warning: stream_select(): cannot cast a filtered stream on this system in {file} on line {line}
- * >
- * > This is due to limitations of PHP's stream filter support, as it can no longer reliably
- * > tell when the underlying stream resource is actually ready.
- * > As an alternative, consider calling `stream_select()` on the unfiltered stream and
- * > then pass the unfiltered data through the [`fun()`](#fun) function.
- *
- * @param resource $stream
- * @param callable $callback
- * @param int $read_write
- * @return resource filter resource which can be used for `remove()`
- * @throws \Exception on error
- * @uses stream_filter_append()
- */
-function append($stream, $callback, $read_write = STREAM_FILTER_ALL)
-{
-    $ret = @\stream_filter_append($stream, register(), $read_write, $callback);
-
-    // PHP 8 throws above on type errors, older PHP and memory issues can throw here
-    // @codeCoverageIgnoreStart
-    if ($ret === false) {
-        $error = \error_get_last() + array('message' => '');
-        throw new \RuntimeException('Unable to append filter: ' . $error['message']);
-    }
-    // @codeCoverageIgnoreEnd
-
-    return $ret;
-}
-
-/**
- * Prepend a filter callback to the given stream.
- *
- * Each stream can have a list of filters attached.
- * This function prepends a filter to the start of this list.
- *
- * If the given filter can not be added, it throws an `Exception`.
- *
- * ```php
- * $filter = Clue\StreamFilter\prepend($stream, function ($chunk) {
- *     // will be called each time you read or write a $chunk to/from the stream
- *     return $chunk;
- * });
- * ```
- *
- * This function returns a filter resource which can be passed to [`remove()`](#remove).
- *
- * Except for the position in the list of filters, this function behaves exactly
- * like the [`append()`](#append) function.
- * For more details about its behavior, see also the [`append()`](#append) function.
- *
- * @param resource $stream
- * @param callable $callback
- * @param int $read_write
- * @return resource filter resource which can be used for `remove()`
- * @throws \Exception on error
- * @uses stream_filter_prepend()
- */
-function prepend($stream, $callback, $read_write = STREAM_FILTER_ALL)
-{
-    $ret = @\stream_filter_prepend($stream, register(), $read_write, $callback);
-
-    // PHP 8 throws above on type errors, older PHP and memory issues can throw here
-    // @codeCoverageIgnoreStart
-    if ($ret === false) {
-        $error = \error_get_last() + array('message' => '');
-        throw new \RuntimeException('Unable to prepend filter: ' . $error['message']);
-    }
-    // @codeCoverageIgnoreEnd
-
-    return $ret;
-}
-
-/**
- * Create a filter function which uses the given built-in `$filter`.
- *
- * PHP comes with a useful set of [built-in filters](https://www.php.net/manual/en/filters.php).
- * Using `fun()` makes accessing these as easy as passing an input string to filter
- * and getting the filtered output string.
- *
- * ```php
- * $fun = Clue\StreamFilter\fun('string.rot13');
- *
- * assert('grfg' === $fun('test'));
- * assert('test' === $fun($fun('test'));
- * ```
- *
- * Please note that not all filter functions may be available depending
- * on installed PHP extensions and the PHP version in use.
- * In particular, [HHVM](https://hhvm.com/) may not offer the same filter functions
- * or parameters as Zend PHP.
- * Accessing an unknown filter function will result in a `RuntimeException`:
- *
- * ```php
- * Clue\StreamFilter\fun('unknown'); // throws RuntimeException
- * ```
- *
- * Some filters may accept or require additional filter parameters – most
- * filters do not require filter parameters.
- * If given, the optional `$parameters` argument will be passed to the
- * underlying filter handler as-is.
- * In particular, note how *not passing* this parameter at all differs from
- * explicitly passing a `null` value (which many filters do not accept).
- * Please refer to the individual filter definition for more details.
- * For example, the `string.strip_tags` filter can be invoked like this:
- *
- * ```php
- * $fun = Clue\StreamFilter\fun('string.strip_tags', '<a><b>');
- *
- * $ret = $fun('<b>h<br>i</b>');
- * assert('<b>hi</b>' === $ret);
- * ```
- *
- * Under the hood, this function allocates a temporary memory stream, so it's
- * recommended to clean up the filter function after use.
- * Also, some filter functions (in particular the
- * [zlib compression filters](https://www.php.net/manual/en/filters.compression.php))
- * may use internal buffers and may emit a final data chunk on close.
- * The filter function can be closed by invoking without any arguments:
- *
- * ```php
- * $fun = Clue\StreamFilter\fun('zlib.deflate');
- *
- * $ret = $fun('hello') . $fun('world') . $fun();
- * assert('helloworld' === gzinflate($ret));
- * ```
- *
- * The filter function must not be used anymore after it has been closed.
- * Doing so will result in a `RuntimeException`:
- *
- * ```php
- * $fun = Clue\StreamFilter\fun('string.rot13');
- * $fun();
- *
- * $fun('test'); // throws RuntimeException
- * ```
- *
- * > Note: If you're using the zlib compression filters, then you should be wary
- * about engine inconsistencies between different PHP versions and HHVM.
- * These inconsistencies exist in the underlying PHP engines and there's little we
- * can do about this in this library.
- * [Our test suite](tests/) contains several test cases that exhibit these issues.
- * If you feel some test case is missing or outdated, we're happy to accept PRs! :)
- *
- * @param string $filter     built-in filter name. See stream_get_filters() or http://php.net/manual/en/filters.php
- * @param mixed  $parameters (optional) parameters to pass to the built-in filter as-is
- * @return callable a filter callback which can be append()'ed or prepend()'ed
- * @throws \RuntimeException on error
- * @link http://php.net/manual/en/filters.php
- * @see stream_get_filters()
- * @see append()
- */
-function fun($filter, $parameters = null)
-{
-    $fp = \fopen('php://memory', 'w');
-    if (\func_num_args() === 1) {
-        $filter = @\stream_filter_append($fp, $filter, \STREAM_FILTER_WRITE);
-    } else {
-        $filter = @\stream_filter_append($fp, $filter, \STREAM_FILTER_WRITE, $parameters);
-    }
-
-    if ($filter === false) {
-        \fclose($fp);
-        $error = \error_get_last() + array('message' => '');
-        throw new \RuntimeException('Unable to access built-in filter: ' . $error['message']);
-    }
-
-    // append filter function which buffers internally
-    $buffer = '';
-    append($fp, function ($chunk) use (&$buffer) {
-        $buffer .= $chunk;
-
-        // always return empty string in order to skip actually writing to stream resource
-        return '';
-    }, \STREAM_FILTER_WRITE);
-
-    $closed = false;
-
-    return function ($chunk = null) use ($fp, $filter, &$buffer, &$closed) {
-        if ($closed) {
-            throw new \RuntimeException('Unable to perform operation on closed stream');
-        }
-        if ($chunk === null) {
-            $closed = true;
-            $buffer = '';
-            \fclose($fp);
-            return $buffer;
-        }
-        // initialize buffer and invoke filters by attempting to write to stream
-        $buffer = '';
-        \fwrite($fp, $chunk);
-
-        // buffer now contains everything the filter function returned
-        return $buffer;
-    };
-}
-
-/**
- * Remove a filter previously added via `append()` or `prepend()`.
- *
- * ```php
- * $filter = Clue\StreamFilter\append($stream, function () {
- *     // …
- * });
- * Clue\StreamFilter\remove($filter);
- * ```
- *
- * @param resource $filter
- * @return bool true on success or false on error
- * @throws \RuntimeException on error
- * @uses stream_filter_remove()
- */
-function remove($filter)
-{
-    if (@\stream_filter_remove($filter) === false) {
-        // PHP 8 throws above on type errors, older PHP and memory issues can throw here
-        $error = \error_get_last();
-        throw new \RuntimeException('Unable to remove filter: ' . $error['message']);
-    }
-}
-
-/**
- * Registers the callback filter and returns the resulting filter name
- *
- * There should be little reason to call this function manually.
- *
- * @return string filter name
- * @uses CallbackFilter
- */
-function register()
-{
-    static $registered = null;
-    if ($registered === null) {
-        $registered = 'stream-callback';
-        \stream_filter_register($registered, __NAMESPACE__ . '\CallbackFilter');
-    }
-    return $registered;
-}

+ 0 - 6
vendor/clue/stream-filter/src/functions_include.php

@@ -1,6 +0,0 @@
-<?php
-
-// @codeCoverageIgnoreStart
-if (!\function_exists('Clue\\StreamFilter\\append')) {
-    require __DIR__ . '/functions.php';
-}

+ 0 - 6
vendor/composer/autoload_classmap.php

@@ -8,11 +8,9 @@ $baseDir = dirname($vendorDir);
 return array(
     'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
     'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
-    'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
     'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
     'DivisionByZeroError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php',
     'Error' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/Error.php',
-    'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
     'PHPUnit\\Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php',
     'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php',
     'PHPUnit\\Framework\\AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php',
@@ -474,7 +472,6 @@ return array(
     'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php',
     'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php',
     'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php',
-    'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
     'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php',
     'SebastianBergmann\\CodeCoverage\\CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php',
     'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Driver.php',
@@ -588,7 +585,6 @@ return array(
     'SebastianBergmann\\Type\\VoidType' => $vendorDir . '/sebastian/type/src/VoidType.php',
     'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
     'SessionUpdateTimestampHandlerInterface' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php',
-    'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
     'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php',
     'TheSeer\\Tokenizer\\Exception' => $vendorDir . '/theseer/tokenizer/src/Exception.php',
     'TheSeer\\Tokenizer\\NamespaceUri' => $vendorDir . '/theseer/tokenizer/src/NamespaceUri.php',
@@ -599,6 +595,4 @@ return array(
     'TheSeer\\Tokenizer\\Tokenizer' => $vendorDir . '/theseer/tokenizer/src/Tokenizer.php',
     'TheSeer\\Tokenizer\\XMLSerializer' => $vendorDir . '/theseer/tokenizer/src/XMLSerializer.php',
     'TypeError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/TypeError.php',
-    'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
-    'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
 );

+ 2 - 7
vendor/composer/autoload_files.php

@@ -7,10 +7,10 @@ $baseDir = dirname($vendorDir);
 
 return array(
     '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
-    '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
-    'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
     '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php',
+    '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
     'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
+    'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
     '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
     '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
     '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
@@ -18,13 +18,8 @@ return array(
     '538ca81a9a966a6716601ecf48f4eaef' => $vendorDir . '/opis/closure/functions.php',
     '023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php',
     '65fec9ebcfbb3cbb4fd0d519687aea01' => $vendorDir . '/danielstjules/stringy/src/Create.php',
-    'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
-    '9c67151ae59aff4788964ce8eb2a0f43' => $vendorDir . '/clue/stream-filter/src/functions_include.php',
     'b067bc7112e384b61c701452d53a14a8' => $vendorDir . '/mtdowling/jmespath.php/src/JmesPath.php',
-    '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
     '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
-    '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
-    '8cff32064859f4559445b89279f3199c' => $vendorDir . '/php-http/message/src/filters.php',
     '66453932bc1be9fb2f910a27947d11b6' => $vendorDir . '/alibabacloud/client/src/Functions.php',
     '6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
     '0d0b82117c23db94c492fee02b2ed01f' => $vendorDir . '/songshenzong/support/src/StringsHelpers.php',

+ 1 - 14
vendor/composer/autoload_psr4.php

@@ -24,8 +24,6 @@ return array(
     'Yurun\\OAuthLogin\\' => array($vendorDir . '/yurunsoft/yurun-oauth-login/src'),
     'Workerman\\' => array($vendorDir . '/workerman/workerman'),
     'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
-    'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
-    'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'),
     'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'),
     'Symfony\\Polyfill\\Php70\\' => array($vendorDir . '/symfony/polyfill-php70'),
     'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
@@ -34,7 +32,6 @@ return array(
     'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'),
     'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
     'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
-    'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'),
     'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'),
     'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
     'Symfony\\Bridge\\PsrHttpMessage\\' => array($vendorDir . '/symfony/psr-http-message-bridge'),
@@ -45,8 +42,7 @@ return array(
     'Qiniu\\' => array($vendorDir . '/qiniu/php-sdk/src/Qiniu'),
     'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
     'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
-    'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
-    'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
+    'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
     'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
     'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
     'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'),
@@ -55,17 +51,9 @@ return array(
     'Opis\\Closure\\' => array($vendorDir . '/opis/closure/src'),
     'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'),
     'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
-    'MeiliSearch\\' => array($vendorDir . '/meilisearch/meilisearch-php/src'),
     'League\\Flysystem\\Cached\\' => array($vendorDir . '/league/flysystem-cached-adapter/src'),
     'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
     'JmesPath\\' => array($vendorDir . '/mtdowling/jmespath.php/src'),
-    'Http\\Promise\\' => array($vendorDir . '/php-http/promise/src'),
-    'Http\\Message\\' => array($vendorDir . '/php-http/message/src', $vendorDir . '/php-http/message-factory/src'),
-    'Http\\Factory\\Guzzle\\' => array($vendorDir . '/http-interop/http-factory-guzzle/src'),
-    'Http\\Discovery\\' => array($vendorDir . '/php-http/discovery/src'),
-    'Http\\Client\\Common\\' => array($vendorDir . '/php-http/client-common/src'),
-    'Http\\Client\\' => array($vendorDir . '/php-http/httplug/src'),
-    'Http\\Adapter\\Guzzle6\\' => array($vendorDir . '/php-http/guzzle6-adapter/src'),
     'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
     'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
     'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
@@ -74,7 +62,6 @@ return array(
     'EasyWeChat\\' => array($vendorDir . '/overtrue/wechat/src'),
     'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
     'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
-    'Clue\\StreamFilter\\' => array($vendorDir . '/clue/stream-filter/src'),
     'Channel\\' => array($vendorDir . '/workerman/channel/src'),
     'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'),
     'Alipay\\EasySDK\\' => array($vendorDir . '/alipaysdk/easysdk/php/src'),

+ 3 - 84
vendor/composer/autoload_static.php

@@ -8,10 +8,10 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
 {
     public static $files = array (
         '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
-        '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
-        'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
         '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
+        '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
         'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
+        'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
         '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
         '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
         '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
@@ -19,13 +19,8 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         '538ca81a9a966a6716601ecf48f4eaef' => __DIR__ . '/..' . '/opis/closure/functions.php',
         '023d27dca8066ef29e6739335ea73bad' => __DIR__ . '/..' . '/symfony/polyfill-php70/bootstrap.php',
         '65fec9ebcfbb3cbb4fd0d519687aea01' => __DIR__ . '/..' . '/danielstjules/stringy/src/Create.php',
-        'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
-        '9c67151ae59aff4788964ce8eb2a0f43' => __DIR__ . '/..' . '/clue/stream-filter/src/functions_include.php',
         'b067bc7112e384b61c701452d53a14a8' => __DIR__ . '/..' . '/mtdowling/jmespath.php/src/JmesPath.php',
-        '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
         '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
-        '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
-        '8cff32064859f4559445b89279f3199c' => __DIR__ . '/..' . '/php-http/message/src/filters.php',
         '66453932bc1be9fb2f910a27947d11b6' => __DIR__ . '/..' . '/alibabacloud/client/src/Functions.php',
         '6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
         '0d0b82117c23db94c492fee02b2ed01f' => __DIR__ . '/..' . '/songshenzong/support/src/StringsHelpers.php',
@@ -81,8 +76,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         ),
         'S' => 
         array (
-            'Symfony\\Polyfill\\Php80\\' => 23,
-            'Symfony\\Polyfill\\Php73\\' => 23,
             'Symfony\\Polyfill\\Php72\\' => 23,
             'Symfony\\Polyfill\\Php70\\' => 23,
             'Symfony\\Polyfill\\Mbstring\\' => 26,
@@ -91,7 +84,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
             'Symfony\\Component\\VarDumper\\' => 28,
             'Symfony\\Component\\Translation\\' => 30,
             'Symfony\\Component\\Process\\' => 26,
-            'Symfony\\Component\\OptionsResolver\\' => 34,
             'Symfony\\Component\\HttpFoundation\\' => 33,
             'Symfony\\Component\\EventDispatcher\\' => 34,
             'Symfony\\Bridge\\PsrHttpMessage\\' => 30,
@@ -112,7 +104,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
             'Psr\\SimpleCache\\' => 16,
             'Psr\\Log\\' => 8,
             'Psr\\Http\\Message\\' => 17,
-            'Psr\\Http\\Client\\' => 16,
             'Psr\\Container\\' => 14,
             'Psr\\Cache\\' => 10,
             'Prophecy\\' => 9,
@@ -127,7 +118,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         'M' => 
         array (
             'Monolog\\' => 8,
-            'MeiliSearch\\' => 12,
         ),
         'L' => 
         array (
@@ -138,16 +128,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         array (
             'JmesPath\\' => 9,
         ),
-        'H' => 
-        array (
-            'Http\\Promise\\' => 13,
-            'Http\\Message\\' => 13,
-            'Http\\Factory\\Guzzle\\' => 20,
-            'Http\\Discovery\\' => 15,
-            'Http\\Client\\Common\\' => 19,
-            'Http\\Client\\' => 12,
-            'Http\\Adapter\\Guzzle6\\' => 21,
-        ),
         'G' => 
         array (
             'GuzzleHttp\\Psr7\\' => 16,
@@ -170,7 +150,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         ),
         'C' => 
         array (
-            'Clue\\StreamFilter\\' => 18,
             'Channel\\' => 8,
             'Carbon\\' => 7,
         ),
@@ -266,14 +245,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         array (
             0 => __DIR__ . '/..' . '/webmozart/assert/src',
         ),
-        'Symfony\\Polyfill\\Php80\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/symfony/polyfill-php80',
-        ),
-        'Symfony\\Polyfill\\Php73\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/symfony/polyfill-php73',
-        ),
         'Symfony\\Polyfill\\Php72\\' => 
         array (
             0 => __DIR__ . '/..' . '/symfony/polyfill-php72',
@@ -306,10 +277,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         array (
             0 => __DIR__ . '/..' . '/symfony/process',
         ),
-        'Symfony\\Component\\OptionsResolver\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/symfony/options-resolver',
-        ),
         'Symfony\\Component\\HttpFoundation\\' => 
         array (
             0 => __DIR__ . '/..' . '/symfony/http-foundation',
@@ -352,12 +319,7 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         ),
         'Psr\\Http\\Message\\' => 
         array (
-            0 => __DIR__ . '/..' . '/psr/http-factory/src',
-            1 => __DIR__ . '/..' . '/psr/http-message/src',
-        ),
-        'Psr\\Http\\Client\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/psr/http-client/src',
+            0 => __DIR__ . '/..' . '/psr/http-message/src',
         ),
         'Psr\\Container\\' => 
         array (
@@ -391,10 +353,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         array (
             0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog',
         ),
-        'MeiliSearch\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/meilisearch/meilisearch-php/src',
-        ),
         'League\\Flysystem\\Cached\\' => 
         array (
             0 => __DIR__ . '/..' . '/league/flysystem-cached-adapter/src',
@@ -407,35 +365,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         array (
             0 => __DIR__ . '/..' . '/mtdowling/jmespath.php/src',
         ),
-        'Http\\Promise\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/php-http/promise/src',
-        ),
-        'Http\\Message\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/php-http/message/src',
-            1 => __DIR__ . '/..' . '/php-http/message-factory/src',
-        ),
-        'Http\\Factory\\Guzzle\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/http-interop/http-factory-guzzle/src',
-        ),
-        'Http\\Discovery\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/php-http/discovery/src',
-        ),
-        'Http\\Client\\Common\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/php-http/client-common/src',
-        ),
-        'Http\\Client\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/php-http/httplug/src',
-        ),
-        'Http\\Adapter\\Guzzle6\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/php-http/guzzle6-adapter/src',
-        ),
         'GuzzleHttp\\Psr7\\' => 
         array (
             0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
@@ -468,10 +397,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         array (
             0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy',
         ),
-        'Clue\\StreamFilter\\' => 
-        array (
-            0 => __DIR__ . '/..' . '/clue/stream-filter/src',
-        ),
         'Channel\\' => 
         array (
             0 => __DIR__ . '/..' . '/workerman/channel/src',
@@ -552,11 +477,9 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
     public static $classMap = array (
         'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
         'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
-        'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
         'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
         'DivisionByZeroError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php',
         'Error' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/Error.php',
-        'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php',
         'PHPUnit\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php',
         'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php',
         'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php',
@@ -1018,7 +941,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php',
         'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php',
         'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php',
-        'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
         'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php',
         'SebastianBergmann\\CodeCoverage\\CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/CoveredCodeNotExecutedException.php',
         'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Driver.php',
@@ -1132,7 +1054,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         'SebastianBergmann\\Type\\VoidType' => __DIR__ . '/..' . '/sebastian/type/src/VoidType.php',
         'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
         'SessionUpdateTimestampHandlerInterface' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php',
-        'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php',
         'Text_Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php',
         'TheSeer\\Tokenizer\\Exception' => __DIR__ . '/..' . '/theseer/tokenizer/src/Exception.php',
         'TheSeer\\Tokenizer\\NamespaceUri' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUri.php',
@@ -1143,8 +1064,6 @@ class ComposerStaticInitf16474ac994ccc25392f403933800b79
         'TheSeer\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/theseer/tokenizer/src/Tokenizer.php',
         'TheSeer\\Tokenizer\\XMLSerializer' => __DIR__ . '/..' . '/theseer/tokenizer/src/XMLSerializer.php',
         'TypeError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/TypeError.php',
-        'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php',
-        'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php',
     );
 
     public static function getInitializer(ClassLoader $loader)

File diff ditekan karena terlalu besar
+ 84 - 818
vendor/composer/installed.json


+ 2 - 176
vendor/composer/installed.php

@@ -5,7 +5,7 @@
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
-        'reference' => 'ba488f1f151ad43238fe906578bed47fb69c2d32',
+        'reference' => '4bcc7ae4296cd3bfacd781e36d99113b923f32ff',
         'name' => 'topthink/think',
         'dev' => true,
     ),
@@ -82,15 +82,6 @@
             'reference' => 'ecf584f5b3a27929175ff0abdba52f0131bef795',
             'dev_requirement' => false,
         ),
-        'clue/stream-filter' => array(
-            'pretty_version' => 'v1.6.0',
-            'version' => '1.6.0.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../clue/stream-filter',
-            'aliases' => array(),
-            'reference' => 'd6169430c7731d8509da7aecd0af756a5747b78e',
-            'dev_requirement' => false,
-        ),
         'danielstjules/stringy' => array(
             'pretty_version' => '3.1.0',
             'version' => '3.1.0.0',
@@ -304,15 +295,6 @@
             'reference' => '9f83dded91781a01c63574e387eaa769be769115',
             'dev_requirement' => false,
         ),
-        'http-interop/http-factory-guzzle' => array(
-            'pretty_version' => '1.1.1',
-            'version' => '1.1.1.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../http-interop/http-factory-guzzle',
-            'aliases' => array(),
-            'reference' => '6e1efa1e020bf1c47cf0f13654e8ef9efb1463b3',
-            'dev_requirement' => false,
-        ),
         'league/flysystem' => array(
             'pretty_version' => '1.0.57',
             'version' => '1.0.57.0',
@@ -331,15 +313,6 @@
             'reference' => '08ef74e9be88100807a3b92cc9048a312bf01d6f',
             'dev_requirement' => false,
         ),
-        'meilisearch/meilisearch-php' => array(
-            'pretty_version' => 'v0.22.0',
-            'version' => '0.22.0.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../meilisearch/meilisearch-php',
-            'aliases' => array(),
-            'reference' => '0229ce11be0ac2ede91577bbcd6bdfe17af63e05',
-            'dev_requirement' => false,
-        ),
         'monolog/monolog' => array(
             'pretty_version' => '1.24.0',
             'version' => '1.24.0.0',
@@ -442,87 +415,6 @@
             'reference' => 'bae7c545bef187884426f042434e561ab1ddb182',
             'dev_requirement' => true,
         ),
-        'php-http/async-client-implementation' => array(
-            'dev_requirement' => false,
-            'provided' => array(
-                0 => '1.0',
-            ),
-        ),
-        'php-http/client-common' => array(
-            'pretty_version' => '2.5.0',
-            'version' => '2.5.0.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../php-http/client-common',
-            'aliases' => array(),
-            'reference' => 'd135751167d57e27c74de674d6a30cef2dc8e054',
-            'dev_requirement' => false,
-        ),
-        'php-http/client-implementation' => array(
-            'dev_requirement' => false,
-            'provided' => array(
-                0 => '1.0',
-            ),
-        ),
-        'php-http/discovery' => array(
-            'pretty_version' => '1.14.1',
-            'version' => '1.14.1.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../php-http/discovery',
-            'aliases' => array(),
-            'reference' => 'de90ab2b41d7d61609f504e031339776bc8c7223',
-            'dev_requirement' => false,
-        ),
-        'php-http/guzzle6-adapter' => array(
-            'pretty_version' => 'v2.0.2',
-            'version' => '2.0.2.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../php-http/guzzle6-adapter',
-            'aliases' => array(),
-            'reference' => '9d1a45eb1c59f12574552e81fb295e9e53430a56',
-            'dev_requirement' => false,
-        ),
-        'php-http/httplug' => array(
-            'pretty_version' => '2.3.0',
-            'version' => '2.3.0.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../php-http/httplug',
-            'aliases' => array(),
-            'reference' => 'f640739f80dfa1152533976e3c112477f69274eb',
-            'dev_requirement' => false,
-        ),
-        'php-http/message' => array(
-            'pretty_version' => '1.13.0',
-            'version' => '1.13.0.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../php-http/message',
-            'aliases' => array(),
-            'reference' => '7886e647a30a966a1a8d1dad1845b71ca8678361',
-            'dev_requirement' => false,
-        ),
-        'php-http/message-factory' => array(
-            'pretty_version' => 'v1.0.2',
-            'version' => '1.0.2.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../php-http/message-factory',
-            'aliases' => array(),
-            'reference' => 'a478cb11f66a6ac48d8954216cfed9aa06a501a1',
-            'dev_requirement' => false,
-        ),
-        'php-http/message-factory-implementation' => array(
-            'dev_requirement' => false,
-            'provided' => array(
-                0 => '1.0',
-            ),
-        ),
-        'php-http/promise' => array(
-            'pretty_version' => '1.1.0',
-            'version' => '1.1.0.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../php-http/promise',
-            'aliases' => array(),
-            'reference' => '4c4c1f9b7289a2ec57cde7f1e9762a5789506f88',
-            'dev_requirement' => false,
-        ),
         'phpdocumentor/reflection-common' => array(
             'pretty_version' => '2.2.0',
             'version' => '2.2.0.0',
@@ -649,36 +541,6 @@
             'reference' => 'b7ce3b176482dbbc1245ebf52b181af44c2cf55f',
             'dev_requirement' => false,
         ),
-        'psr/http-client' => array(
-            'pretty_version' => '1.0.1',
-            'version' => '1.0.1.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../psr/http-client',
-            'aliases' => array(),
-            'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
-            'dev_requirement' => false,
-        ),
-        'psr/http-client-implementation' => array(
-            'dev_requirement' => false,
-            'provided' => array(
-                0 => '1.0',
-            ),
-        ),
-        'psr/http-factory' => array(
-            'pretty_version' => '1.0.1',
-            'version' => '1.0.1.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../psr/http-factory',
-            'aliases' => array(),
-            'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be',
-            'dev_requirement' => false,
-        ),
-        'psr/http-factory-implementation' => array(
-            'dev_requirement' => false,
-            'provided' => array(
-                0 => '^1.0',
-            ),
-        ),
         'psr/http-message' => array(
             'pretty_version' => '1.0.1',
             'version' => '1.0.1.0',
@@ -880,15 +742,6 @@
             'reference' => '74b0d189ce75142f1706aad834d5a428dfc7c3c3',
             'dev_requirement' => false,
         ),
-        'symfony/deprecation-contracts' => array(
-            'pretty_version' => 'v2.5.0',
-            'version' => '2.5.0.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
-            'aliases' => array(),
-            'reference' => '6f981ee24cf69ee7ce9736146d1c57c2780598a8',
-            'dev_requirement' => false,
-        ),
         'symfony/event-dispatcher' => array(
             'pretty_version' => 'v2.8.50',
             'version' => '2.8.50.0',
@@ -907,15 +760,6 @@
             'reference' => '677ae5e892b081e71a665bfa7dd90fe61800c00e',
             'dev_requirement' => false,
         ),
-        'symfony/options-resolver' => array(
-            'pretty_version' => 'v5.4.3',
-            'version' => '5.4.3.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../symfony/options-resolver',
-            'aliases' => array(),
-            'reference' => 'cc1147cb11af1b43f503ac18f31aa3bec213aba8',
-            'dev_requirement' => false,
-        ),
         'symfony/polyfill-ctype' => array(
             'pretty_version' => 'v1.23.0',
             'version' => '1.23.0.0',
@@ -952,24 +796,6 @@
             'reference' => 'ab50dcf166d5f577978419edd37aa2bb8eabce0c',
             'dev_requirement' => false,
         ),
-        'symfony/polyfill-php73' => array(
-            'pretty_version' => 'v1.25.0',
-            'version' => '1.25.0.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../symfony/polyfill-php73',
-            'aliases' => array(),
-            'reference' => 'cc5db0e22b3cb4111010e48785a97f670b350ca5',
-            'dev_requirement' => false,
-        ),
-        'symfony/polyfill-php80' => array(
-            'pretty_version' => 'v1.25.0',
-            'version' => '1.25.0.0',
-            'type' => 'library',
-            'install_path' => __DIR__ . '/../symfony/polyfill-php80',
-            'aliases' => array(),
-            'reference' => '4407588e0d3f1f52efb65fbe92babe41f37fe50c',
-            'dev_requirement' => false,
-        ),
         'symfony/process' => array(
             'pretty_version' => 'v4.3.2',
             'version' => '4.3.2.0',
@@ -1045,7 +871,7 @@
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
-            'reference' => 'ba488f1f151ad43238fe906578bed47fb69c2d32',
+            'reference' => '4bcc7ae4296cd3bfacd781e36d99113b923f32ff',
             'dev_requirement' => false,
         ),
         'topthink/think-captcha' => array(

+ 2 - 2
vendor/composer/platform_check.php

@@ -4,8 +4,8 @@
 
 $issues = array();
 
-if (!(PHP_VERSION_ID >= 70400)) {
-    $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.';
+if (!(PHP_VERSION_ID >= 70108)) {
+    $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.8". You are running ' . PHP_VERSION . '.';
 }
 
 if ($issues) {

+ 0 - 21
vendor/http-interop/http-factory-guzzle/LICENSE

@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Woody Gilk
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.

+ 0 - 3
vendor/http-interop/http-factory-guzzle/README.md

@@ -1,3 +0,0 @@
-# HTTP Factory for Guzzle
-
-HTTP factory implemented for [Guzzle](https://github.com/guzzle/psr7).

+ 0 - 33
vendor/http-interop/http-factory-guzzle/composer.json

@@ -1,33 +0,0 @@
-{
-    "name": "http-interop/http-factory-guzzle",
-    "description": "An HTTP Factory using Guzzle PSR7",
-    "keywords": [
-        "psr-7",
-        "psr-17",
-        "http",
-        "factory"
-    ],
-    "license": "MIT",
-    "authors": [
-        {
-            "name": "PHP-FIG",
-            "homepage": "http://www.php-fig.org/"
-        }
-    ],
-    "provide": {
-        "psr/http-factory-implementation": "^1.0"
-    },
-    "require": {
-        "psr/http-factory": "^1.0",
-        "guzzlehttp/psr7": "^1.4.2||^2.0"
-    },
-    "require-dev": {
-        "http-interop/http-factory-tests": "^0.9",
-        "phpunit/phpunit": "^8.5"
-    },
-    "autoload": {
-        "psr-4": {
-            "Http\\Factory\\Guzzle\\": "src/"
-        }
-    }
-}

+ 0 - 15
vendor/http-interop/http-factory-guzzle/src/RequestFactory.php

@@ -1,15 +0,0 @@
-<?php
-
-namespace Http\Factory\Guzzle;
-
-use GuzzleHttp\Psr7\Request;
-use Psr\Http\Message\RequestFactoryInterface;
-use Psr\Http\Message\RequestInterface;
-
-class RequestFactory implements RequestFactoryInterface
-{
-    public function createRequest(string $method, $uri): RequestInterface
-    {
-        return new Request($method, $uri);
-    }
-}

+ 0 - 15
vendor/http-interop/http-factory-guzzle/src/ResponseFactory.php

@@ -1,15 +0,0 @@
-<?php
-
-namespace Http\Factory\Guzzle;
-
-use GuzzleHttp\Psr7\Response;
-use Psr\Http\Message\ResponseFactoryInterface;
-use Psr\Http\Message\ResponseInterface;
-
-class ResponseFactory implements ResponseFactoryInterface
-{
-    public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
-    {
-        return new Response($code, [], null, '1.1', $reasonPhrase);
-    }
-}

+ 0 - 24
vendor/http-interop/http-factory-guzzle/src/ServerRequestFactory.php

@@ -1,24 +0,0 @@
-<?php
-
-namespace Http\Factory\Guzzle;
-
-use GuzzleHttp\Psr7\ServerRequest;
-use Psr\Http\Message\ServerRequestFactoryInterface;
-use Psr\Http\Message\ServerRequestInterface;
-
-class ServerRequestFactory implements ServerRequestFactoryInterface
-{
-    public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface
-    {
-
-        if (empty($method)) {
-            if (!empty($serverParams['REQUEST_METHOD'])) {
-                $method = $serverParams['REQUEST_METHOD'];
-            } else {
-                throw new \InvalidArgumentException('Cannot determine HTTP method');
-            }
-        }
-
-        return new ServerRequest($method, $uri, [], null, '1.1', $serverParams);
-    }
-}

+ 0 - 43
vendor/http-interop/http-factory-guzzle/src/StreamFactory.php

@@ -1,43 +0,0 @@
-<?php
-
-namespace Http\Factory\Guzzle;
-
-use GuzzleHttp\Psr7\Stream;
-use GuzzleHttp\Psr7\Utils;
-use Psr\Http\Message\StreamFactoryInterface;
-use Psr\Http\Message\StreamInterface;
-
-use function function_exists;
-use function GuzzleHttp\Psr7\stream_for;
-use function GuzzleHttp\Psr7\try_fopen;
-
-class StreamFactory implements StreamFactoryInterface
-{
-    public function createStream(string $content = ''): StreamInterface
-    {
-        if (function_exists('GuzzleHttp\Psr7\stream_for')) {
-            // fallback for guzzlehttp/psr7<1.7.0
-            return stream_for($content);
-        }
-
-        return Utils::streamFor($content);
-    }
-
-    public function createStreamFromFile(string $file, string $mode = 'r'): StreamInterface
-    {
-        if (function_exists('GuzzleHttp\Psr7\try_fopen')) {
-            // fallback for guzzlehttp/psr7<1.7.0
-            $resource = try_fopen($file, $mode);
-        } else {
-            $resource = Utils::tryFopen($file, $mode);
-        }
-
-
-        return $this->createStreamFromResource($resource);
-    }
-
-    public function createStreamFromResource($resource): StreamInterface
-    {
-        return new Stream($resource);
-    }
-}

+ 0 - 25
vendor/http-interop/http-factory-guzzle/src/UploadedFileFactory.php

@@ -1,25 +0,0 @@
-<?php
-
-namespace Http\Factory\Guzzle;
-
-use GuzzleHttp\Psr7\UploadedFile;
-use Psr\Http\Message\UploadedFileFactoryInterface;
-use Psr\Http\Message\StreamInterface;
-use Psr\Http\Message\UploadedFileInterface;
-
-class UploadedFileFactory implements UploadedFileFactoryInterface
-{
-    public function createUploadedFile(
-        StreamInterface $stream,
-        int $size = null,
-        int $error = \UPLOAD_ERR_OK,
-        string $clientFilename = null,
-        string $clientMediaType = null
-    ): UploadedFileInterface {
-        if ($size === null) {
-            $size = $stream->getSize();
-        }
-
-        return new UploadedFile($stream, $size, $error, $clientFilename, $clientMediaType);
-    }
-}

+ 0 - 15
vendor/http-interop/http-factory-guzzle/src/UriFactory.php

@@ -1,15 +0,0 @@
-<?php
-
-namespace Http\Factory\Guzzle;
-
-use GuzzleHttp\Psr7\Uri;
-use Psr\Http\Message\UriFactoryInterface;
-use Psr\Http\Message\UriInterface;
-
-class UriFactory implements UriFactoryInterface
-{
-    public function createUri(string $uri = ''): UriInterface
-    {
-        return new Uri($uri);
-    }
-}

+ 0 - 21
vendor/meilisearch/meilisearch-php/LICENSE

@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2019-2021 Meili
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.

+ 0 - 285
vendor/meilisearch/meilisearch-php/README.md

@@ -1,285 +0,0 @@
-<p align="center">
-  <img src="https://raw.githubusercontent.com/meilisearch/integration-guides/main/assets/logos/meilisearch_php.svg" alt="Meilisearch-PHP" width="200" height="200" />
-</p>
-
-<h1 align="center">Meilisearch PHP</h1>
-
-<h4 align="center">
-  <a href="https://github.com/meilisearch/meilisearch">Meilisearch</a> |
-  <a href="https://docs.meilisearch.com">Documentation</a> |
-  <a href="https://slack.meilisearch.com">Slack</a> |
-  <a href="https://roadmap.meilisearch.com/tabs/1-under-consideration">Roadmap</a> |
-  <a href="https://www.meilisearch.com">Website</a> |
-  <a href="https://docs.meilisearch.com/faq">FAQ</a>
-</h4>
-
-<p align="center">
-  <a href="https://packagist.org/packages/meilisearch/meilisearch-php"><img src="https://img.shields.io/packagist/v/meilisearch/meilisearch-php" alt="Latest Stable Version"></a>
-  <a href="https://github.com/meilisearch/meilisearch-php/actions"><img src="https://github.com/meilisearch/meilisearch-php/workflows/Tests/badge.svg" alt="Test"></a>
-  <a href="https://github.com/meilisearch/meilisearch-php/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-informational" alt="License"></a>
-  <a href="https://app.bors.tech/repositories/28780"><img src="https://bors.tech/images/badge_small.svg" alt="Bors enabled"></a>
-</p>
-
-<p align="center">⚡ The Meilisearch API client written for PHP 🐘</p>
-
-**Meilisearch PHP** is the Meilisearch API client for PHP developers.
-
-**Meilisearch** is an open-source search engine. [Discover what Meilisearch is!](https://github.com/meilisearch/Meilisearch)
-
-## Table of Contents <!-- omit in toc -->
-
-- [📖 Documentation](#-documentation)
-- [🔧 Installation](#-installation)
-- [🚀 Getting Started](#-getting-started)
-- [🤖 Compatibility with Meilisearch](#-compatibility-with-meilisearch)
-- [💡 Learn More](#-learn-more)
-- [🧰 HTTP Client Compatibilities](#-http-client-compatibilities)
-  - [Customize your HTTP Client](#customize-your-http-client)
-- [⚙️ Development Workflow and Contributing](#️-development-workflow-and-contributing)
-
-## 📖 Documentation
-
-See our [Documentation](https://docs.meilisearch.com/learn/tutorials/getting_started.html) or our [API References](https://docs.meilisearch.com/reference/api/).
-
-## 🔧 Installation
-
-To get started, simply require the project using [Composer](https://getcomposer.org/).<br>
-You will also need to install packages that "provide" [`psr/http-client-implementation`](https://packagist.org/providers/psr/http-client-implementation) and [`psr/http-factory-implementation`](https://packagist.org/providers/psr/http-factory-implementation).<br>
-A list with compatible HTTP clients and client adapters can be found at [php-http.org](http://docs.php-http.org/en/latest/clients.html).
-
-**If you don't know which HTTP client to use, we recommend using Guzzle 7**:
-
-```bash
-composer require meilisearch/meilisearch-php guzzlehttp/guzzle http-interop/http-factory-guzzle:^1.0
-```
-
-Here is an example of installation with the `symfony/http-client`:
-
-```bash
-composer require meilisearch/meilisearch-php symfony/http-client nyholm/psr7:^1.0
-```
-
-💡 *More HTTP client installations compatible with this package can be found [in this section](#-http-client-compatibilities).*
-
-### Run Meilisearch <!-- omit in toc -->
-
-There are many easy ways to [download and run a Meilisearch instance](https://docs.meilisearch.com/reference/features/installation.html#download-and-launch).
-
-For example, using the `curl` command in your [Terminal](https://itconnect.uw.edu/learn/workshops/online-tutorials/web-publishing/what-is-a-terminal/):
-
-```sh
-#Install Meilisearch
-curl -L https://install.meilisearch.com | sh
-
-# Launch Meilisearch
-./meilisearch --master-key=masterKey
-```
-
-NB: you can also download Meilisearch from **Homebrew** or **APT** or even run it using **Docker**.
-
-## 🚀 Getting Started
-
-#### Add documents <!-- omit in toc -->
-
-```php
-<?php
-
-require_once __DIR__ . '/vendor/autoload.php';
-
-use MeiliSearch\Client;
-
-$client = new Client('http://127.0.0.1:7700', 'masterKey');
-
-# An index is where the documents are stored.
-$index = $client->index('movies');
-
-$documents = [
-    ['id' => 1,  'title' => 'Carol', 'genres' => ['Romance, Drama']],
-    ['id' => 2,  'title' => 'Wonder Woman', 'genres' => ['Action, Adventure']],
-    ['id' => 3,  'title' => 'Life of Pi', 'genres' => ['Adventure, Drama']],
-    ['id' => 4,  'title' => 'Mad Max: Fury Road', 'genres' => ['Adventure, Science Fiction']],
-    ['id' => 5,  'title' => 'Moana', 'genres' => ['Fantasy, Action']],
-    ['id' => 6,  'title' => 'Philadelphia', 'genres' => ['Drama']],
-];
-
-# If the index 'movies' does not exist, Meilisearch creates it when you first add the documents.
-$index->addDocuments($documents); // => { "uid": 0 }
-```
-
-With the `uid`, you can check the status (`enqueued`, `processing`, `succeeded` or `failed`) of your documents addition using the [task](https://docs.meilisearch.com/reference/api/tasks.html#get-task).
-
-#### Basic Search <!-- omit in toc -->
-
-```php
-// Meilisearch is typo-tolerant:
-$hits = $index->search('wondre woman')->getHits();
-print_r($hits);
-```
-
-Output:
-
-```php
-Array
-(
-    [0] => Array
-        (
-            [id] => 2
-            [title] => Wonder Woman
-            [genres] => Array
-                (
-                     [0] => Action, Adventure
-                )
-        )
-)
-```
-
-#### Custom Search <!-- omit in toc -->
-
-All the supported options are described in the [search parameters](https://docs.meilisearch.com/reference/features/search_parameters.html) section of the documentation.
-
-💡 **More about the `search()` method in [the Wiki](https://github.com/meilisearch/meilisearch-php/wiki/Search).**
-
-```php
-$index->search(
-    'phil',
-    [
-        'attributesToHighlight' => ['*'],
-    ]
-)->getRaw(); // Return in Array format
-```
-
-JSON output:
-
-```json
-{
-    "hits": [
-        {
-            "id": 6,
-            "title": "Philadelphia",
-            "genre": ["Drama"],
-            "_formatted": {
-                "id": 6,
-                "title": "<em>Phil</em>adelphia",
-                "genre": ["Drama"]
-            }
-        }
-    ],
-    "offset": 0,
-    "limit": 20,
-    "processingTimeMs": 0,
-    "query": "phil"
-}
-```
-#### Custom Search With Filters <!-- omit in toc -->
-
-If you want to enable filtering, you must add your attributes to the `filterableAttributes` index setting.
-
-```php
-$index->updateFilterableAttributes([
-  'id',
-  'genres'
-]);
-```
-
-You only need to perform this operation once.
-
-Note that Meilisearch will rebuild your index whenever you update `filterableAttributes`. Depending on the size of your dataset, this might take time. You can track the process using the [tasks](https://docs.meilisearch.com/reference/api/tasks.html#get-task)).
-
-Then, you can perform the search:
-
-```php
-$index->search(
-  'wonder',
-  [
-    'filter' => ['id > 1 AND genres = Action']
-  ]
-);
-```
-
-```json
-{
-  "hits": [
-    {
-      "id": 2,
-      "title": "Wonder Woman",
-      "genres": ["Action","Adventure"]
-    }
-  ],
-  "offset": 0,
-  "limit": 20,
-  "nbHits": 1,
-  "processingTimeMs": 0,
-  "query": "wonder"
-}
-```
-
-## 🤖 Compatibility with Meilisearch
-
-This package only guarantees the compatibility with the [version v0.25.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.25.0).
-
-## 💡 Learn More
-
-The following sections may interest you:
-
-- **Manipulate documents**: see the [API references](https://docs.meilisearch.com/reference/api/documents.html) or read more about [documents](https://docs.meilisearch.com/learn/core_concepts/documents.html).
-- **Search**: see the [API references](https://docs.meilisearch.com/reference/api/search.html) or follow our guide on [search parameters](https://docs.meilisearch.com/reference/features/search_parameters.html).
-- **Manage the indexes**: see the [API references](https://docs.meilisearch.com/reference/api/indexes.html) or read more about [indexes](https://docs.meilisearch.com/learn/core_concepts/indexes.html).
-- **Configure the index settings**: see the [API references](https://docs.meilisearch.com/reference/api/settings.html) or follow our guide on [settings parameters](https://docs.meilisearch.com/reference/features/settings.html).
-
-## 🧰 HTTP Client Compatibilities
-
-You could use any [PSR-18](https://www.php-fig.org/psr/psr-18/) compatible client to use with this SDK. No additional configurations are required.<br>
-A list of compatible HTTP clients and client adapters can be found at [php-http.org](http://docs.php-http.org/en/latest/clients.html).
-
-If you want to use this `meilisearch-php`:
-
-- with `guzzlehttp/guzzle` (Guzzle 7), run:
-
-```bash
-composer require meilisearch/meilisearch-php guzzlehttp/guzzle http-interop/http-factory-guzzle:^1.0
-```
-
-- with `php-http/guzzle6-adapter` (Guzzle < 7), run:
-
-```bash
-composer require meilisearch/meilisearch-php php-http/guzzle6-adapter:^2.0 http-interop/http-factory-guzzle:^1.0
-```
-
-- with `symfony/http-client`, run:
-
-```bash
-composer require meilisearch/meilisearch-php symfony/http-client nyholm/psr7:^1.0
-```
-
-- with `php-http/curl-client`, run:
-
-```bash
-composer require meilisearch/meilisearch-php php-http/curl-client nyholm/psr7:^1.0
-```
-
-- with `kriswallsmith/buzz`, run:
-
-```bash
-composer require meilisearch/meilisearch-php kriswallsmith/buzz nyholm/psr7:^1.0
-```
-
-### Customize your HTTP Client
-
-For some reason, you might want to pass a custom configuration to your own HTTP client.<br>
-Make sure you have a [PSR-18](https://www.php-fig.org/psr/psr-18/) compatible client when you initialize the Meilisearch client.
-
-Following the example in the [Getting Started](#-getting-started) section, with the Guzzle HTTP client:
-
-```php
-new Client('http://127.0.0.1:7700', 'masterKey', new GuzzleHttpClient(['timeout' => 2]));
-```
-
-## ⚙️ Development Workflow and Contributing
-
-Any new contribution is more than welcome in this project!
-
-If you want to know more about the development workflow or want to contribute, please visit our [contributing guidelines](/CONTRIBUTING.md) for detailed instructions!
-
-<hr>
-
-**Meilisearch** provides and maintains many **SDKs and Integration tools** like this one. We want to provide everyone with an **amazing search experience for any kind of project**. If you want to contribute, make suggestions, or just know what's going on right now, visit us in the [integration-guides](https://github.com/meilisearch/integration-guides) repository.

+ 0 - 60
vendor/meilisearch/meilisearch-php/composer.json

@@ -1,60 +0,0 @@
-{
-    "name": "meilisearch/meilisearch-php",
-    "description": "PHP wrapper for the Meilisearch API",
-    "keywords": ["meilisearch", "instant", "search", "api", "client", "php"],
-    "type": "library",
-    "license": "MIT",
-    "authors": [
-        {
-            "name": "Clementine Urquizar",
-            "email": "clementine@meilisearch.com"
-        }
-    ],
-    "minimum-stability": "stable",
-    "require": {
-        "php": "^7.4 || ^8.0",
-        "ext-json": "*",
-        "php-http/discovery": "^1.7",
-        "php-http/httplug": "^2.1",
-        "php-http/client-common": "^2.0"
-    },
-    "autoload": {
-        "psr-4": {
-            "MeiliSearch\\": "src/"
-        }
-    },
-    "autoload-dev": {
-        "psr-4": {
-            "Tests\\": "tests/"
-        }
-    },
-    "suggest": {
-        "guzzlehttp/guzzle": "Use Guzzle ^7 as HTTP client",
-        "http-interop/http-factory-guzzle": "Factory for guzzlehttp/guzzle"
-    },
-    "require-dev": {
-        "phpunit/phpunit": "^9.5",
-        "friendsofphp/php-cs-fixer": "^3.0",
-        "guzzlehttp/guzzle": "^7.1",
-        "http-interop/http-factory-guzzle": "^1.0",
-        "phpstan/phpstan": "^1.4",
-        "phpstan/extension-installer": "^1.1",
-        "phpstan/phpstan-strict-rules": "^1.1",
-        "phpstan/phpstan-phpunit": "^1.0",
-        "phpstan/phpstan-deprecation-rules": "^1.0"
-    },
-    "scripts": {
-        "lint": [
-            "./vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --verbose --config=.php-cs-fixer.dist.php --using-cache=no --dry-run --diff"
-        ],
-        "lint:fix": [
-            "./vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --verbose --config=.php-cs-fixer.dist.php --using-cache=no  --diff"
-        ],
-        "phpstan": [
-            "php ./vendor/bin/phpstan"
-        ],
-        "test": [
-            "sh scripts/tests.sh"
-        ]
-    }
-}

+ 0 - 54
vendor/meilisearch/meilisearch-php/src/Client.php

@@ -1,54 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch;
-
-use MeiliSearch\Delegates\HandlesIndex;
-use MeiliSearch\Delegates\HandlesSystem;
-use MeiliSearch\Endpoints\Delegates\HandlesDumps;
-use MeiliSearch\Endpoints\Delegates\HandlesKeys;
-use MeiliSearch\Endpoints\Delegates\HandlesTasks;
-use MeiliSearch\Endpoints\Dumps;
-use MeiliSearch\Endpoints\Health;
-use MeiliSearch\Endpoints\Indexes;
-use MeiliSearch\Endpoints\Keys;
-use MeiliSearch\Endpoints\Stats;
-use MeiliSearch\Endpoints\Tasks;
-use MeiliSearch\Endpoints\Version;
-use Psr\Http\Client\ClientInterface;
-use Psr\Http\Message\RequestFactoryInterface;
-
-class Client
-{
-    use HandlesDumps;
-    use HandlesIndex;
-    use HandlesTasks;
-    use HandlesKeys;
-    use HandlesSystem;
-
-    private $http;
-    private Indexes $index;
-    private Health $health;
-    private Version $version;
-    private Keys $keys;
-    private Stats $stats;
-    private Tasks $tasks;
-    private Dumps $dumps;
-
-    public function __construct(
-        string $url,
-        string $apiKey = null,
-        ClientInterface $httpClient = null,
-        RequestFactoryInterface $requestFactory = null
-    ) {
-        $this->http = new Http\Client($url, $apiKey, $httpClient, $requestFactory);
-        $this->index = new Indexes($this->http);
-        $this->health = new Health($this->http);
-        $this->version = new Version($this->http);
-        $this->stats = new Stats($this->http);
-        $this->tasks = new Tasks($this->http);
-        $this->keys = new Keys($this->http);
-        $this->dumps = new Dumps($this->http);
-    }
-}

+ 0 - 21
vendor/meilisearch/meilisearch-php/src/Contracts/Endpoint.php

@@ -1,21 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Contracts;
-
-abstract class Endpoint
-{
-    protected const PATH = '';
-    protected Http $http;
-
-    public function __construct(Http $http)
-    {
-        $this->http = $http;
-    }
-
-    public function show(): ?array
-    {
-        return $this->http->get(static::PATH);
-    }
-}

+ 0 - 18
vendor/meilisearch/meilisearch-php/src/Contracts/Http.php

@@ -1,18 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Contracts;
-
-interface Http
-{
-    public function get(string $path, array $query = []);
-
-    public function post(string $path, $body = null, array $query = [], string $contentType = null);
-
-    public function put(string $path, $body = null, array $query = []);
-
-    public function patch(string $path, $body = null, array $query = []);
-
-    public function delete(string $path, array $query = []);
-}

+ 0 - 64
vendor/meilisearch/meilisearch-php/src/Delegates/HandlesIndex.php

@@ -1,64 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Delegates;
-
-use MeiliSearch\Endpoints\Indexes;
-
-trait HandlesIndex
-{
-    /**
-     * @return Indexes[]
-     */
-    public function getAllIndexes(): array
-    {
-        return $this->index->all();
-    }
-
-    public function getAllRawIndexes(): array
-    {
-        return $this->index->allRaw();
-    }
-
-    public function getRawIndex(string $uid): array
-    {
-        return $this->index($uid)->fetchRawInfo();
-    }
-
-    public function index(string $uid): Indexes
-    {
-        return new Indexes($this->http, $uid);
-    }
-
-    public function getIndex(string $uid): Indexes
-    {
-        return $this->index($uid)->fetchInfo();
-    }
-
-    public function deleteIndex(string $uid): array
-    {
-        return $this->index($uid)->delete();
-    }
-
-    public function deleteAllIndexes(): array
-    {
-        $tasks = [];
-        $indexes = $this->getAllIndexes();
-        foreach ($indexes as $index) {
-            $tasks[] = $index->delete();
-        }
-
-        return $tasks;
-    }
-
-    public function createIndex(string $uid, array $options = []): array
-    {
-        return $this->index->create($uid, $options);
-    }
-
-    public function updateIndex(string $uid, array $options = []): array
-    {
-        return $this->index($uid)->update($options);
-    }
-}

+ 0 - 34
vendor/meilisearch/meilisearch-php/src/Delegates/HandlesSystem.php

@@ -1,34 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Delegates;
-
-trait HandlesSystem
-{
-    public function health(): ?array
-    {
-        return $this->health->show();
-    }
-
-    public function isHealthy(): bool
-    {
-        try {
-            $this->health->show();
-        } catch (\Exception $e) {
-            return false;
-        }
-
-        return true;
-    }
-
-    public function version(): array
-    {
-        return $this->version->show();
-    }
-
-    public function stats(): array
-    {
-        return $this->stats->show();
-    }
-}

+ 0 - 104
vendor/meilisearch/meilisearch-php/src/Endpoints/Delegates/HandlesDocuments.php

@@ -1,104 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Endpoints\Delegates;
-
-use Generator;
-use MeiliSearch\Exceptions\InvalidArgumentException;
-
-trait HandlesDocuments
-{
-    public function getDocument($documentId)
-    {
-        $this->assertValidDocumentId($documentId);
-
-        return $this->http->get(self::PATH.'/'.$this->uid.'/documents/'.$documentId);
-    }
-
-    public function getDocuments(array $query = [])
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/documents', $query);
-    }
-
-    public function addDocuments(array $documents, ?string $primaryKey = null)
-    {
-        return $this->http->post(self::PATH.'/'.$this->uid.'/documents', $documents, ['primaryKey' => $primaryKey]);
-    }
-
-    public function addDocumentsInBatches(array $documents, ?int $batchSize = 1000, ?string $primaryKey = null)
-    {
-        $promises = [];
-        foreach (self::batch($documents, $batchSize) as $batch) {
-            $promises[] = $this->addDocuments($batch, $primaryKey);
-        }
-
-        return $promises;
-    }
-
-    public function addDocumentsJson(string $documents, ?string $primaryKey = null)
-    {
-        return $this->http->post(self::PATH.'/'.$this->uid.'/documents', $documents, ['primaryKey' => $primaryKey], 'application/json');
-    }
-
-    public function addDocumentsNdjson(string $documents, ?string $primaryKey = null)
-    {
-        return $this->http->post(self::PATH.'/'.$this->uid.'/documents', $documents, ['primaryKey' => $primaryKey], 'application/x-ndjson');
-    }
-
-    public function addDocumentsCsv(string $documents, ?string $primaryKey = null)
-    {
-        return $this->http->post(self::PATH.'/'.$this->uid.'/documents', $documents, ['primaryKey' => $primaryKey], 'text/csv');
-    }
-
-    public function updateDocuments(array $documents, ?string $primaryKey = null)
-    {
-        return $this->http->put(self::PATH.'/'.$this->uid.'/documents', $documents, ['primaryKey' => $primaryKey]);
-    }
-
-    public function updateDocumentsInBatches(array $documents, ?int $batchSize = 1000, ?string $primaryKey = null)
-    {
-        $promises = [];
-        foreach (self::batch($documents, $batchSize) as $batch) {
-            $promises[] = $this->updateDocuments($documents, $primaryKey);
-        }
-
-        return $promises;
-    }
-
-    public function deleteAllDocuments(): array
-    {
-        return $this->http->delete(self::PATH.'/'.$this->uid.'/documents');
-    }
-
-    public function deleteDocument($documentId): array
-    {
-        $this->assertValidDocumentId($documentId);
-
-        return $this->http->delete(self::PATH.'/'.$this->uid.'/documents/'.$documentId);
-    }
-
-    public function deleteDocuments(array $documents): array
-    {
-        return $this->http->post(self::PATH.'/'.$this->uid.'/documents/delete-batch', $documents);
-    }
-
-    private function assertValidDocumentId($documentId): void
-    {
-        if (!\is_string($documentId) && !\is_int($documentId)) {
-            throw InvalidArgumentException::invalidType('documentId', ['string', 'int']);
-        }
-
-        if (\is_string($documentId) && '' === trim($documentId)) {
-            throw InvalidArgumentException::emptyArgument('documentId');
-        }
-    }
-
-    private static function batch(array $documents, int $batchSize): Generator
-    {
-        $batches = array_chunk($documents, $batchSize);
-        foreach ($batches as $batch) {
-            yield $batch;
-        }
-    }
-}

+ 0 - 18
vendor/meilisearch/meilisearch-php/src/Endpoints/Delegates/HandlesDumps.php

@@ -1,18 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Endpoints\Delegates;
-
-trait HandlesDumps
-{
-    public function createDump(): array
-    {
-        return $this->dumps->create();
-    }
-
-    public function getDumpStatus(string $uid): array
-    {
-        return $this->dumps->status($uid);
-    }
-}

+ 0 - 33
vendor/meilisearch/meilisearch-php/src/Endpoints/Delegates/HandlesKeys.php

@@ -1,33 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Endpoints\Delegates;
-
-trait HandlesKeys
-{
-    public function getKeys(): array
-    {
-        return $this->keys->all();
-    }
-
-    public function getKey($key): array
-    {
-        return $this->keys->get($key);
-    }
-
-    public function createKey(array $options = []): array
-    {
-        return $this->keys->create($options);
-    }
-
-    public function updateKey(string $key, array $options = []): array
-    {
-        return $this->keys->update($key, $options);
-    }
-
-    public function deleteKey(string $key): array
-    {
-        return $this->keys->delete($key);
-    }
-}

+ 0 - 150
vendor/meilisearch/meilisearch-php/src/Endpoints/Delegates/HandlesSettings.php

@@ -1,150 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Endpoints\Delegates;
-
-trait HandlesSettings
-{
-    // Settings - Ranking rules
-
-    public function getRankingRules(): array
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/settings/ranking-rules');
-    }
-
-    public function updateRankingRules(array $rankingRules): array
-    {
-        return $this->http->post(self::PATH.'/'.$this->uid.'/settings/ranking-rules', $rankingRules);
-    }
-
-    public function resetRankingRules(): array
-    {
-        return $this->http->delete(self::PATH.'/'.$this->uid.'/settings/ranking-rules');
-    }
-
-    // Settings - Distinct attribute
-
-    public function getDistinctAttribute()
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/settings/distinct-attribute');
-    }
-
-    public function updateDistinctAttribute(string $distinctAttribute): array
-    {
-        return $this->http->post(self::PATH.'/'.$this->uid.'/settings/distinct-attribute', $distinctAttribute);
-    }
-
-    public function resetDistinctAttribute(): array
-    {
-        return $this->http->delete(self::PATH.'/'.$this->uid.'/settings/distinct-attribute');
-    }
-
-    // Settings - Searchable attributes
-
-    public function getSearchableAttributes(): array
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/settings/searchable-attributes');
-    }
-
-    public function updateSearchableAttributes(array $searchableAttributes): array
-    {
-        return $this->http->post(self::PATH.'/'.$this->uid.'/settings/searchable-attributes', $searchableAttributes);
-    }
-
-    public function resetSearchableAttributes(): array
-    {
-        return $this->http->delete(self::PATH.'/'.$this->uid.'/settings/searchable-attributes');
-    }
-
-    // Settings - Displayed attributes
-
-    public function getDisplayedAttributes(): array
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/settings/displayed-attributes');
-    }
-
-    public function updateDisplayedAttributes(array $displayedAttributes): array
-    {
-        return $this->http->post(self::PATH.'/'.$this->uid.'/settings/displayed-attributes', $displayedAttributes);
-    }
-
-    public function resetDisplayedAttributes(): array
-    {
-        return $this->http->delete(self::PATH.'/'.$this->uid.'/settings/displayed-attributes');
-    }
-
-    // Settings - Stop-words
-
-    public function getStopWords(): array
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/settings/stop-words');
-    }
-
-    public function updateStopWords(array $stopWords): array
-    {
-        return $this->http->post(self::PATH.'/'.$this->uid.'/settings/stop-words', $stopWords);
-    }
-
-    public function resetStopWords(): array
-    {
-        return $this->http->delete(self::PATH.'/'.$this->uid.'/settings/stop-words');
-    }
-
-    // Settings - Synonyms
-
-    public function getSynonyms(): array
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/settings/synonyms');
-    }
-
-    public function updateSynonyms(array $synonyms): array
-    {
-        // Patch related to https://github.com/meilisearch/meilisearch-php/issues/204.
-        // Should be removed when implementing https://github.com/meilisearch/meilisearch-php/issues/209
-        if (0 === \count($synonyms)) {
-            $synonyms = null;
-        }
-
-        return $this->http->post(self::PATH.'/'.$this->uid.'/settings/synonyms', $synonyms);
-    }
-
-    public function resetSynonyms(): array
-    {
-        return $this->http->delete(self::PATH.'/'.$this->uid.'/settings/synonyms');
-    }
-
-    // Settings - Filterable Attributes
-
-    public function getFilterableAttributes(): array
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/settings/filterable-attributes');
-    }
-
-    public function updateFilterableAttributes(array $filterableAttributes): array
-    {
-        return $this->http->post(self::PATH.'/'.$this->uid.'/settings/filterable-attributes', $filterableAttributes);
-    }
-
-    public function resetFilterableAttributes(): array
-    {
-        return $this->http->delete(self::PATH.'/'.$this->uid.'/settings/filterable-attributes');
-    }
-
-    // Settings - Sortable Attributes
-
-    public function getSortableAttributes(): array
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/settings/sortable-attributes');
-    }
-
-    public function updateSortableAttributes(array $sortableAttributes): array
-    {
-        return $this->http->post(self::PATH.'/'.$this->uid.'/settings/sortable-attributes', $sortableAttributes);
-    }
-
-    public function resetSortableAttributes(): array
-    {
-        return $this->http->delete(self::PATH.'/'.$this->uid.'/settings/sortable-attributes');
-    }
-}

+ 0 - 28
vendor/meilisearch/meilisearch-php/src/Endpoints/Delegates/HandlesTasks.php

@@ -1,28 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Endpoints\Delegates;
-
-trait HandlesTasks
-{
-    public function getTask($uid): array
-    {
-        return $this->tasks->get($uid);
-    }
-
-    public function getTasks(): array
-    {
-        return $this->tasks->all();
-    }
-
-    public function waitForTask($uid, int $timeoutInMs = 5000, int $intervalInMs = 50): array
-    {
-        return $this->tasks->waitTask($uid, $timeoutInMs, $intervalInMs);
-    }
-
-    public function waitForTasks($uids, int $timeoutInMs = 5000, int $intervalInMs = 50): array
-    {
-        return $this->tasks->waitTasks($uids, $timeoutInMs, $intervalInMs);
-    }
-}

+ 0 - 22
vendor/meilisearch/meilisearch-php/src/Endpoints/Dumps.php

@@ -1,22 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Endpoints;
-
-use MeiliSearch\Contracts\Endpoint;
-
-class Dumps extends Endpoint
-{
-    protected const PATH = '/dumps';
-
-    public function create(): array
-    {
-        return $this->http->post(self::PATH);
-    }
-
-    public function status(string $uid): array
-    {
-        return $this->http->get(self::PATH.'/'.$uid.'/status');
-    }
-}

+ 0 - 12
vendor/meilisearch/meilisearch-php/src/Endpoints/Health.php

@@ -1,12 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Endpoints;
-
-use MeiliSearch\Contracts\Endpoint;
-
-class Health extends Endpoint
-{
-    protected const PATH = '/health';
-}

+ 0 - 239
vendor/meilisearch/meilisearch-php/src/Endpoints/Indexes.php

@@ -1,239 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Endpoints;
-
-use DateTime;
-use Exception;
-use MeiliSearch\Contracts\Endpoint;
-use MeiliSearch\Contracts\Http;
-use MeiliSearch\Endpoints\Delegates\HandlesDocuments;
-use MeiliSearch\Endpoints\Delegates\HandlesSettings;
-use MeiliSearch\Endpoints\Delegates\HandlesTasks;
-use MeiliSearch\Exceptions\ApiException;
-use MeiliSearch\Search\SearchResult;
-
-class Indexes extends Endpoint
-{
-    use HandlesDocuments;
-    use HandlesSettings;
-    use HandlesTasks;
-
-    protected const PATH = '/indexes';
-
-    private ?string $uid;
-    private ?string $primaryKey;
-    private ?string $createdAt;
-    private ?string $updatedAt;
-    private Tasks $tasks;
-
-    public function __construct(Http $http, $uid = null, $primaryKey = null, $createdAt = null, $updatedAt = null)
-    {
-        $this->uid = $uid;
-        $this->primaryKey = $primaryKey;
-        $this->createdAt = $createdAt;
-        $this->updatedAt = $updatedAt;
-        $this->tasks = new Tasks($http);
-
-        parent::__construct($http);
-    }
-
-    protected function newInstance(array $attributes): self
-    {
-        return new self(
-            $this->http,
-            $attributes['uid'],
-            $attributes['primaryKey'],
-            $attributes['createdAt'],
-            $attributes['updatedAt'],
-        );
-    }
-
-    /**
-     * @return $this
-     */
-    protected function fill(array $attributes): self
-    {
-        $this->uid = $attributes['uid'];
-        $this->primaryKey = $attributes['primaryKey'];
-        $this->createdAt = $attributes['createdAt'];
-        $this->updatedAt = $attributes['updatedAt'];
-
-        return $this;
-    }
-
-    /**
-     * @throws Exception|ApiException
-     */
-    public function create(string $uid, array $options = []): array
-    {
-        $options['uid'] = $uid;
-
-        return $this->http->post(self::PATH, $options);
-    }
-
-    public function all(): array
-    {
-        $indexes = [];
-
-        foreach ($this->allRaw() as $index) {
-            $indexes[] = $this->newInstance($index);
-        }
-
-        return $indexes;
-    }
-
-    public function allRaw(): array
-    {
-        return $this->http->get(self::PATH);
-    }
-
-    public function getPrimaryKey(): ?string
-    {
-        return $this->primaryKey;
-    }
-
-    public function fetchPrimaryKey(): ?string
-    {
-        return $this->fetchInfo()->getPrimaryKey();
-    }
-
-    public function getUid(): ?string
-    {
-        return $this->uid;
-    }
-
-    public function getCreatedAt(): ?DateTime
-    {
-        return static::parseDate($this->createdAt);
-    }
-
-    public function getCreatedAtString(): ?string
-    {
-        return $this->createdAt;
-    }
-
-    public function getUpdatedAt(): ?DateTime
-    {
-        return static::parseDate($this->updatedAt);
-    }
-
-    public function getUpdatedAtString(): ?string
-    {
-        return $this->updatedAt;
-    }
-
-    public function fetchRawInfo(): ?array
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid);
-    }
-
-    public function fetchInfo(): self
-    {
-        $response = $this->fetchRawInfo();
-
-        return $this->fill($response);
-    }
-
-    public function update($body): array
-    {
-        return $this->http->put(self::PATH.'/'.$this->uid, $body);
-    }
-
-    public function delete(): array
-    {
-        return $this->http->delete(self::PATH.'/'.$this->uid) ?? [];
-    }
-
-    // Tasks
-
-    public function getTask($uid): array
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/tasks'.'/'.$uid);
-    }
-
-    public function getTasks(): array
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/tasks');
-    }
-
-    // Search
-
-    /**
-     * @return SearchResult|array
-     */
-    public function search(?string $query, array $searchParams = [], array $options = [])
-    {
-        $result = $this->rawSearch($query, $searchParams);
-
-        if (\array_key_exists('raw', $options) && $options['raw']) {
-            return $result;
-        }
-
-        $searchResult = new SearchResult($result);
-        $searchResult->applyOptions($options);
-
-        return $searchResult;
-    }
-
-    public function rawSearch(?string $query, array $searchParams = []): array
-    {
-        $parameters = array_merge(
-            ['q' => $query],
-            $searchParams
-        );
-
-        return $this->http->post(self::PATH.'/'.$this->uid.'/search', $parameters);
-    }
-
-    // Stats
-
-    public function stats(): array
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/stats');
-    }
-
-    // Settings - Global
-
-    public function getSettings(): array
-    {
-        return $this->http->get(self::PATH.'/'.$this->uid.'/settings');
-    }
-
-    public function updateSettings($settings): array
-    {
-        // Patch related to https://github.com/meilisearch/meilisearch-php/issues/204
-        // Should be removed when implementing https://github.com/meilisearch/meilisearch-php/issues/209
-        if (\array_key_exists('synonyms', $settings) && 0 == \count($settings['synonyms'])) {
-            $settings['synonyms'] = null;
-        }
-
-        return $this->http->post(self::PATH.'/'.$this->uid.'/settings', $settings);
-    }
-
-    public function resetSettings(): array
-    {
-        return $this->http->delete(self::PATH.'/'.$this->uid.'/settings');
-    }
-
-    /**
-     * @throws Exception
-     */
-    public static function parseDate(?string $dateTime): ?DateTime
-    {
-        if (null === $dateTime) {
-            return null;
-        }
-
-        try {
-            return new DateTime($dateTime);
-        } catch (\Exception $e) {
-            // Trim 9th+ digit from fractional seconds. Meilisearch server can send 9 digits; PHP supports up to 8
-            $trimPattern = '/(^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{1,8})(?:\d{1,})?(Z|[\+-]\d{2}:\d{2})$/';
-            $trimmedDate = preg_replace($trimPattern, '$1$2', $dateTime);
-
-            return new DateTime($trimmedDate);
-        }
-    }
-}

+ 0 - 37
vendor/meilisearch/meilisearch-php/src/Endpoints/Keys.php

@@ -1,37 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Endpoints;
-
-use MeiliSearch\Contracts\Endpoint;
-
-class Keys extends Endpoint
-{
-    protected const PATH = '/keys';
-
-    public function get($key): array
-    {
-        return $this->http->get(self::PATH.'/'.$key);
-    }
-
-    public function all(): array
-    {
-        return $this->http->get(self::PATH.'/');
-    }
-
-    public function create(array $options = []): array
-    {
-        return $this->http->post(self::PATH, $options);
-    }
-
-    public function update(string $key, array $options = []): array
-    {
-        return $this->http->patch(self::PATH.'/'.$key, $options);
-    }
-
-    public function delete(string $key): array
-    {
-        return $this->http->delete(self::PATH.'/'.$key) ?? [];
-    }
-}

+ 0 - 12
vendor/meilisearch/meilisearch-php/src/Endpoints/Stats.php

@@ -1,12 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Endpoints;
-
-use MeiliSearch\Contracts\Endpoint;
-
-class Stats extends Endpoint
-{
-    protected const PATH = '/stats';
-}

+ 0 - 50
vendor/meilisearch/meilisearch-php/src/Endpoints/Tasks.php

@@ -1,50 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Endpoints;
-
-use MeiliSearch\Contracts\Endpoint;
-use MeiliSearch\Exceptions\TimeOutException;
-
-class Tasks extends Endpoint
-{
-    protected const PATH = '/tasks';
-
-    public function get($taskUid): array
-    {
-        return $this->http->get(self::PATH.'/'.$taskUid);
-    }
-
-    public function all(): array
-    {
-        return $this->http->get(self::PATH.'/');
-    }
-
-    /**
-     * @throws TimeOutException
-     */
-    public function waitTask($taskUid, int $timeoutInMs, int $intervalInMs): array
-    {
-        $timeout_temp = 0;
-        while ($timeoutInMs > $timeout_temp) {
-            $res = $this->get($taskUid);
-            if ('enqueued' != $res['status'] && 'processing' != $res['status']) {
-                return $res;
-            }
-            $timeout_temp += $intervalInMs;
-            usleep(1000 * $intervalInMs);
-        }
-        throw new TimeOutException();
-    }
-
-    public function waitTasks(array $taskUids, int $timeoutInMs, int $intervalInMs): array
-    {
-        $tasks = [];
-        foreach ($taskUids as $taskUid) {
-            $tasks[] = $this->waitTask($taskUid, $timeoutInMs, $intervalInMs);
-        }
-
-        return $tasks;
-    }
-}

+ 0 - 12
vendor/meilisearch/meilisearch-php/src/Endpoints/Version.php

@@ -1,12 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Endpoints;
-
-use MeiliSearch\Contracts\Endpoint;
-
-class Version extends Endpoint
-{
-    protected const PATH = '/version';
-}

+ 0 - 89
vendor/meilisearch/meilisearch-php/src/Exceptions/ApiException.php

@@ -1,89 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Exceptions;
-
-use Exception;
-use Psr\Http\Message\ResponseInterface;
-
-class ApiException extends Exception
-{
-    public $httpStatus = 0;
-    public $message = null;
-    public ?string $errorCode;
-    public ?string $errorType;
-    public ?string $errorLink;
-    public $httpBody = null;
-
-    public function __construct(ResponseInterface $response, $httpBody, $previous = null)
-    {
-        $this->httpBody = $httpBody;
-        $this->httpStatus = $response->getStatusCode();
-        $this->message = $this->getMessageFromHttpBody() ?? $response->getReasonPhrase();
-        $this->errorCode = $this->getErrorCodeFromHttpBody();
-        $this->errorLink = $this->getErrorLinkFromHttpBody();
-        $this->errorType = $this->getErrorTypeFromHttpBody();
-
-        parent::__construct($this->message, $this->httpStatus, $previous);
-    }
-
-    public function __toString()
-    {
-        $base = 'Meilisearch ApiException: Http Status: '.$this->httpStatus;
-
-        if (!\is_null($this->message)) {
-            $base .= ' - Message: '.$this->message;
-        }
-
-        if (!\is_null($this->errorCode)) {
-            $base .= ' - Code: '.$this->errorCode;
-        }
-
-        if (!\is_null($this->errorType)) {
-            $base .= ' - Type: '.$this->errorType;
-        }
-
-        if (!\is_null($this->errorLink)) {
-            $base .= ' - Link: '.$this->errorLink;
-        }
-
-        return $base;
-    }
-
-    private function getMessageFromHttpBody(): ?string
-    {
-        if (\is_array($this->httpBody) && \array_key_exists('message', $this->httpBody)) {
-            return $this->httpBody['message'];
-        }
-
-        return null;
-    }
-
-    private function getErrorCodeFromHttpBody(): ?string
-    {
-        if (\is_array($this->httpBody) && \array_key_exists('code', $this->httpBody)) {
-            return $this->httpBody['code'];
-        }
-
-        return null;
-    }
-
-    private function getErrorTypeFromHttpBody(): ?string
-    {
-        if (\is_array($this->httpBody) && \array_key_exists('type', $this->httpBody)) {
-            return $this->httpBody['type'];
-        }
-
-        return null;
-    }
-
-    private function getErrorLinkFromHttpBody(): ?string
-    {
-        if (\is_array($this->httpBody) && \array_key_exists('link', $this->httpBody)) {
-            return $this->httpBody['link'];
-        }
-
-        return null;
-    }
-}

+ 0 - 15
vendor/meilisearch/meilisearch-php/src/Exceptions/CommunicationException.php

@@ -1,15 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Exceptions;
-
-use Exception;
-
-class CommunicationException extends Exception
-{
-    public function __toString()
-    {
-        return 'Meilisearch CommunicationException: '.$this->getMessage();
-    }
-}

+ 0 - 28
vendor/meilisearch/meilisearch-php/src/Exceptions/InvalidArgumentException.php

@@ -1,28 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Exceptions;
-
-use Exception;
-
-final class InvalidArgumentException extends Exception
-{
-    public static function invalidType(string $argumentName, array $validTypes): self
-    {
-        return new self(
-            sprintf('Argument "%s" is not a valid type! Please provide an argument that is of type: "%s"', $argumentName, implode('","', $validTypes)),
-            400,
-            null
-        );
-    }
-
-    public static function emptyArgument(string $argumentName): self
-    {
-        return new self(
-            sprintf('Argument "%s" is empty.', $argumentName),
-            400,
-            null
-        );
-    }
-}

+ 0 - 48
vendor/meilisearch/meilisearch-php/src/Exceptions/InvalidResponseBodyException.php

@@ -1,48 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Exceptions;
-
-use Exception;
-use Psr\Http\Message\ResponseInterface;
-
-class InvalidResponseBodyException extends Exception
-{
-    public $httpStatus = 0;
-    public $httpBody = null;
-    public $message = null;
-
-    public function __construct(ResponseInterface $response, $httpBody, $previous = null)
-    {
-        $this->httpStatus = $response->getStatusCode();
-        $this->httpBody = $httpBody;
-        $this->message = $this->getMessageFromHttpBody() ?? $response->getReasonPhrase();
-
-        parent::__construct($this->message, $this->httpStatus, $previous);
-    }
-
-    public function __toString()
-    {
-        $base = 'Meilisearch InvalidResponseBodyException: Http Status: '.$this->httpStatus;
-
-        if ($this->message) {
-            $base .= ' - Message: '.$this->message;
-        }
-
-        return $base;
-    }
-
-    public function getMessageFromHttpBody(): ?string
-    {
-        if (null !== $this->httpBody) {
-            $rawText = strip_tags($this->httpBody);
-
-            if (!ctype_space($rawText)) {
-                return substr(trim($rawText), 0, 100);
-            }
-        }
-
-        return null;
-    }
-}

+ 0 - 16
vendor/meilisearch/meilisearch-php/src/Exceptions/JsonDecodingException.php

@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Exceptions;
-
-use Exception;
-use Throwable;
-
-final class JsonDecodingException extends Exception
-{
-    public function __construct(string $message, int $code = 0, ?Throwable $previous = null)
-    {
-        parent::__construct($message, $code, $previous);
-    }
-}

+ 0 - 16
vendor/meilisearch/meilisearch-php/src/Exceptions/JsonEncodingException.php

@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Exceptions;
-
-use Exception;
-use Throwable;
-
-final class JsonEncodingException extends Exception
-{
-    public function __construct(string $message, int $code = 0, ?Throwable $previous = null)
-    {
-        parent::__construct($message, $code, $previous);
-    }
-}

+ 0 - 32
vendor/meilisearch/meilisearch-php/src/Exceptions/TimeOutException.php

@@ -1,32 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Exceptions;
-
-use Exception;
-use Throwable;
-
-class TimeOutException extends Exception
-{
-    public $code = null;
-    public $message = null;
-
-    public function __construct(?string $message = null, ?int $code = null, ?Throwable $previous = null)
-    {
-        $this->message = $message ?? 'Request timed out';
-        $this->code = $code ?? 408;
-
-        parent::__construct($this->message, $this->code, $previous);
-    }
-
-    public function __toString()
-    {
-        $base = 'Meilisearch TimeOutException: Code: '.$this->code;
-        if ($this->message) {
-            return $base.' - Message: '.$this->message;
-        } else {
-            return $base;
-        }
-    }
-}

+ 0 - 195
vendor/meilisearch/meilisearch-php/src/Http/Client.php

@@ -1,195 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Http;
-
-use Http\Discovery\Psr17FactoryDiscovery;
-use Http\Discovery\Psr18ClientDiscovery;
-use MeiliSearch\Contracts\Http;
-use MeiliSearch\Exceptions\ApiException;
-use MeiliSearch\Exceptions\CommunicationException;
-use MeiliSearch\Exceptions\InvalidResponseBodyException;
-use MeiliSearch\Exceptions\JsonDecodingException;
-use MeiliSearch\Exceptions\JsonEncodingException;
-use MeiliSearch\Http\Serialize\Json;
-use MeiliSearch\MeiliSearch;
-use Psr\Http\Client\ClientExceptionInterface;
-use Psr\Http\Client\ClientInterface;
-use Psr\Http\Client\NetworkExceptionInterface;
-use Psr\Http\Message\RequestFactoryInterface;
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\ResponseInterface;
-use Psr\Http\Message\StreamFactoryInterface;
-
-class Client implements Http
-{
-    private ClientInterface $http;
-    private RequestFactoryInterface $requestFactory;
-    private StreamFactoryInterface $streamFactory;
-    private array $headers;
-    private ?string $apiKey;
-    private string $baseUrl;
-    private Json $json;
-
-    /**
-     * Client constructor.
-     */
-    public function __construct(
-        string $url,
-        string $apiKey = null,
-        ClientInterface $httpClient = null,
-        RequestFactoryInterface $reqFactory = null
-    ) {
-        $this->baseUrl = $url;
-        $this->apiKey = $apiKey;
-        $this->http = $httpClient ?? Psr18ClientDiscovery::find();
-        $this->requestFactory = $reqFactory ?? Psr17FactoryDiscovery::findRequestFactory();
-        $this->streamFactory = Psr17FactoryDiscovery::findStreamFactory();
-        $this->headers = array_filter([
-            'Authorization' => sprintf('Bearer %s', $this->apiKey),
-            'User-Agent' => MeiliSearch::qualifiedVersion(),
-        ]);
-        $this->json = new Json();
-    }
-
-    /**
-     * @return mixed
-     *
-     * @throws ClientExceptionInterface
-     * @throws ApiException
-     * @throws CommunicationException
-     */
-    public function get(string $path, array $query = [])
-    {
-        $request = $this->requestFactory->createRequest(
-            'GET',
-            $this->baseUrl.$path.$this->buildQueryString($query)
-        );
-
-        return $this->execute($request);
-    }
-
-    /**
-     * @param mixed|null $body
-     *
-     * @return mixed
-     *
-     * @throws ApiException
-     * @throws ClientExceptionInterface
-     * @throws CommunicationException
-     * @throws JsonEncodingException
-     */
-    public function post(string $path, $body = null, array $query = [], string $contentType = null)
-    {
-        if (!\is_null($contentType)) {
-            $this->headers['Content-type'] = $contentType;
-        } else {
-            $this->headers['Content-type'] = 'application/json';
-            $body = $this->json->serialize($body);
-        }
-        $request = $this->requestFactory->createRequest(
-            'POST',
-            $this->baseUrl.$path.$this->buildQueryString($query)
-            )->withBody($this->streamFactory->createStream($body));
-
-        return $this->execute($request);
-    }
-
-    public function put(string $path, $body = null, array $query = [])
-    {
-        $this->headers['Content-type'] = 'application/json';
-        $request = $this->requestFactory->createRequest(
-            'PUT',
-            $this->baseUrl.$path.$this->buildQueryString($query)
-        )->withBody($this->streamFactory->createStream($this->json->serialize($body)));
-
-        return $this->execute($request);
-    }
-
-    /**
-     * @param mixed|null $body
-     *
-     * @return mixed
-     *
-     * @throws ApiException
-     * @throws JsonEncodingException
-     */
-    public function patch(string $path, $body = null, array $query = [])
-    {
-        $this->headers['Content-type'] = 'application/json';
-        $request = $this->requestFactory->createRequest(
-            'PATCH',
-            $this->baseUrl.$path.$this->buildQueryString($query)
-        )->withBody($this->streamFactory->createStream($this->json->serialize($body)));
-
-        return $this->execute($request);
-    }
-
-    /**
-     * @return mixed
-     *
-     * @throws ClientExceptionInterface
-     * @throws ApiException
-     */
-    public function delete(string $path, array $query = [])
-    {
-        $request = $this->requestFactory->createRequest(
-            'DELETE',
-            $this->baseUrl.$path.$this->buildQueryString($query)
-        );
-
-        return $this->execute($request);
-    }
-
-    /**
-     * @return mixed
-     *
-     * @throws ApiException
-     * @throws ClientExceptionInterface
-     * @throws CommunicationException
-     */
-    private function execute(RequestInterface $request)
-    {
-        foreach ($this->headers as $header => $value) {
-            $request = $request->withAddedHeader($header, $value);
-        }
-
-        try {
-            return $this->parseResponse($this->http->sendRequest($request));
-        } catch (NetworkExceptionInterface $e) {
-            throw new CommunicationException($e->getMessage(), $e->getCode(), $e);
-        }
-    }
-
-    private function buildQueryString(array $queryParams = []): string
-    {
-        return \count($queryParams) > 0 ? '?'.http_build_query($queryParams) : '';
-    }
-
-    /**
-     * @return mixed
-     *
-     * @throws ApiException
-     * @throws InvalidResponseBodyException
-     * @throws JsonDecodingException
-     */
-    private function parseResponse(ResponseInterface $response)
-    {
-        if (204 === $response->getStatusCode()) {
-            return null;
-        }
-
-        if (!\in_array('application/json', $response->getHeader('content-type'), true)) {
-            throw new InvalidResponseBodyException($response, $response->getBody()->getContents());
-        }
-
-        if ($response->getStatusCode() >= 300) {
-            $body = $this->json->unserialize($response->getBody()->getContents()) ?? $response->getReasonPhrase();
-
-            throw new ApiException($response, $body);
-        }
-
-        return $this->json->unserialize($response->getBody()->getContents());
-    }
-}

+ 0 - 43
vendor/meilisearch/meilisearch-php/src/Http/Serialize/Json.php

@@ -1,43 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Http\Serialize;
-
-use JsonException;
-use MeiliSearch\Exceptions\JsonDecodingException;
-use MeiliSearch\Exceptions\JsonEncodingException;
-
-class Json implements SerializerInterface
-{
-    private const JSON_ENCODE_ERROR_MESSAGE = 'Encoding payload to json failed: "%s".';
-    private const JSON_DECODE_ERROR_MESSAGE = 'Decoding payload to json failed: "%s".';
-
-    /**
-     * {@inheritDoc}
-     */
-    public function serialize($data)
-    {
-        try {
-            $encoded = json_encode($data, JSON_THROW_ON_ERROR);
-        } catch (JsonException $e) {
-            throw new JsonEncodingException(sprintf(self::JSON_ENCODE_ERROR_MESSAGE, $e->getMessage()), $e->getCode(), $e);
-        }
-
-        return $encoded;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public function unserialize(string $string)
-    {
-        try {
-            $decoded = json_decode($string, true, 512, JSON_THROW_ON_ERROR);
-        } catch (JsonException $e) {
-            throw new JsonDecodingException(sprintf(self::JSON_DECODE_ERROR_MESSAGE, $e->getMessage()), $e->getCode(), $e);
-        }
-
-        return $decoded;
-    }
-}

+ 0 - 31
vendor/meilisearch/meilisearch-php/src/Http/Serialize/SerializerInterface.php

@@ -1,31 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Http\Serialize;
-
-use MeiliSearch\Exceptions\JsonDecodingException;
-use MeiliSearch\Exceptions\JsonEncodingException;
-
-interface SerializerInterface
-{
-    /**
-     * Serialize data into string.
-     *
-     * @param string|int|float|bool|array|null $data
-     *
-     * @return string|bool
-     *
-     * @throws JsonEncodingException
-     */
-    public function serialize($data);
-
-    /**
-     * Unserialize the given string.
-     *
-     * @return string|int|float|bool|array|null
-     *
-     * @throws JsonDecodingException
-     */
-    public function unserialize(string $string);
-}

+ 0 - 15
vendor/meilisearch/meilisearch-php/src/MeiliSearch.php

@@ -1,15 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch;
-
-class MeiliSearch
-{
-    public const VERSION = '0.22.0';
-
-    public static function qualifiedVersion()
-    {
-        return sprintf('Meilisearch PHP (v%s)', MeiliSearch::VERSION);
-    }
-}

+ 0 - 198
vendor/meilisearch/meilisearch-php/src/Search/SearchResult.php

@@ -1,198 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace MeiliSearch\Search;
-
-use ArrayIterator;
-use Countable;
-use IteratorAggregate;
-
-class SearchResult implements Countable, IteratorAggregate
-{
-    /**
-     * @var array<int, array<string, mixed>>
-     */
-    private array $hits;
-
-    /**
-     * `nbHits` is the attributes returned by the Meilisearch server
-     * and its value will not be modified by the methods in this class.
-     * Please, use `hitsCount` if you want to know the real size of the `hits` array at any time.
-     */
-    private int $nbHits;
-
-    private int $hitsCount;
-    private bool $exhaustiveNbHits;
-    private int $offset;
-    private int $limit;
-    private int $processingTimeMs;
-
-    private string $query;
-    private ?bool $exhaustiveFacetsCount;
-
-    /**
-     * @var array<string, mixed>
-     */
-    private array $facetsDistribution;
-
-    /**
-     * @var array<string, mixed>
-     */
-    private array $raw;
-
-    public function __construct(array $body)
-    {
-        $this->hits = $body['hits'] ?? [];
-        $this->offset = $body['offset'];
-        $this->limit = $body['limit'];
-        $this->nbHits = $body['nbHits'];
-        $this->hitsCount = \count($body['hits']);
-        $this->exhaustiveNbHits = $body['exhaustiveNbHits'] ?? false;
-        $this->processingTimeMs = $body['processingTimeMs'];
-        $this->query = $body['query'];
-        $this->exhaustiveFacetsCount = $body['exhaustiveFacetsCount'] ?? null;
-        $this->facetsDistribution = $body['facetsDistribution'] ?? [];
-        $this->raw = $body;
-    }
-
-    /**
-     * Return a new {@see SearchResult} instance.
-     *
-     * The $options parameter is an array, and the following keys are accepted:
-     * - transformFacetsDistribution (callable)
-     * - transformHits (callable)
-     *
-     * The method does NOT trigger a new search.
-     *
-     * @return SearchResult
-     */
-    public function applyOptions($options): self
-    {
-        if (\array_key_exists('transformHits', $options) && \is_callable($options['transformHits'])) {
-            $this->transformHits($options['transformHits']);
-        }
-        if (\array_key_exists('transformFacetsDistribution', $options) && \is_callable($options['transformFacetsDistribution'])) {
-            $this->transformFacetsDistribution($options['transformFacetsDistribution']);
-        }
-
-        return $this;
-    }
-
-    public function transformHits(callable $callback): self
-    {
-        $this->hits = $callback($this->hits);
-        $this->hitsCount = \count($this->hits);
-
-        return $this;
-    }
-
-    public function transformFacetsDistribution(callable $callback): self
-    {
-        $this->facetsDistribution = $callback($this->facetsDistribution);
-
-        return $this;
-    }
-
-    public function getHit(int $key, $default = null)
-    {
-        return $this->hits[$key] ?? $default;
-    }
-
-    /**
-     * @return array<int, array>
-     */
-    public function getHits(): array
-    {
-        return $this->hits;
-    }
-
-    public function getOffset(): int
-    {
-        return $this->offset;
-    }
-
-    public function getLimit(): int
-    {
-        return $this->limit;
-    }
-
-    public function getHitsCount(): int
-    {
-        return $this->hitsCount;
-    }
-
-    public function count(): int
-    {
-        return $this->hitsCount;
-    }
-
-    public function getNbHits(): int
-    {
-        return $this->nbHits;
-    }
-
-    public function getExhaustiveNbHits(): bool
-    {
-        return $this->exhaustiveNbHits;
-    }
-
-    public function getProcessingTimeMs(): int
-    {
-        return $this->processingTimeMs;
-    }
-
-    public function getQuery(): string
-    {
-        return $this->query;
-    }
-
-    public function getExhaustiveFacetsCount(): ?bool
-    {
-        return $this->exhaustiveFacetsCount;
-    }
-
-    /**
-     * @return array<string, mixed>
-     */
-    public function getFacetsDistribution(): array
-    {
-        return $this->facetsDistribution;
-    }
-
-    /**
-     * Return the original search result.
-     *
-     * @return array<string, mixed>
-     */
-    public function getRaw(): array
-    {
-        return $this->raw;
-    }
-
-    public function toArray(): array
-    {
-        return [
-            'hits' => $this->hits,
-            'offset' => $this->offset,
-            'limit' => $this->limit,
-            'nbHits' => $this->nbHits,
-            'hitsCount' => $this->hitsCount,
-            'exhaustiveNbHits' => $this->exhaustiveNbHits,
-            'processingTimeMs' => $this->processingTimeMs,
-            'query' => $this->query,
-            'exhaustiveFacetsCount' => $this->exhaustiveFacetsCount,
-            'facetsDistribution' => $this->facetsDistribution,
-        ];
-    }
-
-    public function toJSON(): string
-    {
-        return json_encode($this->toArray(), JSON_PRETTY_PRINT);
-    }
-
-    public function getIterator(): ArrayIterator
-    {
-        return new ArrayIterator($this->hits);
-    }
-}

+ 0 - 24
vendor/php-http/client-common/.php_cs.dist

@@ -1,24 +0,0 @@
-<?php
-
-/*
- * Configuration for fabpot/php-cs-fixer
- *
- * @link https://github.com/FriendsOfPHP/PHP-CS-Fixer
- */
-
-$finder = PhpCsFixer\Finder::create()
-    ->in('src')
-    ->in('spec')
-;
-return PhpCsFixer\Config::create()
-    ->setRules([
-        '@PSR2' => true,
-        '@Symfony' => true,
-        'array_syntax' => [
-            'syntax' => 'short',
-        ],
-        'no_empty_phpdoc' => true,
-        'phpdoc_to_comment' => false,
-        'single_line_throw' => false,
-    ])
-    ->setFinder($finder);

+ 0 - 276
vendor/php-http/client-common/CHANGELOG.md

@@ -1,276 +0,0 @@
-# Change Log
-
-## 2.5.0 - 2021-11-26
-
-### Added
-
-- Support for Symfony 6
-- Support for PHP 8.1
-
-### Changed
-
-- Dropped support for Symfony 2 and 3 - please keep using version 2.4.0 of this library if you can't update Symfony.
-
-## 2.4.0 - 2021-07-05
-
-### Added
-
-- `strict` option to `RedirectPlugin` to allow preserving the request method on redirections with status 300, 301 and 302.
-
-## 2.3.0 - 2020-07-21
-
-### Fixed
-
-- HttpMethodsClient with PSR RequestFactory
-- Bug in the cookie plugin with empty cookies
-- Bug when parsing null-valued date headers
-
-### Changed
-
-- Deprecation when constructing a HttpMethodsClient with PSR RequestFactory but without a StreamFactory
-
-## 2.2.1 - 2020-07-13
-
-### Fixed
-
-- Support for PHP 8
-- Plugin callable phpdoc
-
-## 2.2.0 - 2020-07-02
-
-### Added
-
-- Plugin client builder for making a `PluginClient`
-- Support for the PSR-17 request factory in `HttpMethodsClient`
-
-### Changed
-
-- Restored support for `symfony/options-resolver: ^2.6`
-- Consistent implementation of union type checking
-
-### Fixed
-
-- Memory leak when using the `PluginClient` with plugins
-
-## 2.1.0 - 2019-11-18
-
-### Added
-
-- Support Symfony 5
-
-## 2.0.0 - 2019-02-03
-
-### Changed
-
-- HttpClientRouter now throws a HttpClientNoMatchException instead of a RequestException if it can not find a client for the request.
-- RetryPlugin will only retry exceptions when there is no response, or a response in the 5xx HTTP code range.
-- RetryPlugin also retries when no exception is thrown if the responses has HTTP code in the 5xx range.
-  The callbacks for exception handling have been renamed and callbacks for response handling have been added.
-- Abstract method `HttpClientPool::chooseHttpClient()` has now an explicit return type (`Http\Client\Common\HttpClientPoolItem`)
-- Interface method `Plugin::handleRequest(...)` has now an explicit return type (`Http\Promise\Promise`)
-- Made  classes final that are not intended to be extended.
-- Added interfaces for BatchClient, HttpClientRouter and HttpMethodsClient.
-  (These interfaces use the `Interface` suffix to avoid name collisions.)
-- Added an interface for HttpClientPool and moved the abstract class to the HttpClientPool sub namespace.
-- AddPathPlugin: Do not add the prefix if the URL already has the same prefix.
-- All exceptions in `Http\Client\Common\Exception` are final.
-
-### Removed
-
-- Deprecated option `debug_plugins` has been removed from `PluginClient`
-- Deprecated options `decider` and `delay` have been removed from `RetryPlugin`, use `exception_decider` and `exception_delay` instead.
-
-## 1.11.0 - 2021-07-11
-
-### Changed
-
-- Backported from version 2: AddPathPlugin: Do not add the prefix if the URL already has the same prefix.
-
-## 1.10.0 - 2019-11-18
-
-### Added
-
-- Support for Symfony 5
-
-## 1.9.1 - 2019-02-02
-
-### Added
-
-- Updated type hints in doc blocks.
-
-## 1.9.0 - 2019-01-03
-
-### Added
-
-- Support for PSR-18 clients
-- Added traits `VersionBridgePlugin` and `VersionBridgeClient` to help plugins and clients to support both
-  1.x and 2.x version of `php-http/client-common` and `php-http/httplug`.
-
-### Changed
-
-- RetryPlugin: Renamed the configuration options for the exception retry callback from `decider` to `exception_decider`
-  and `delay` to `exception_delay`. The old names still work but are deprecated.
-
-## 1.8.2 - 2018-12-14
-
-### Changed
-
-- When multiple cookies exist, a single header with all cookies is sent as per RFC 6265 Section 5.4
-- AddPathPlugin will now trim of ending slashes in paths
-
-## 1.8.1 - 2018-10-09
-
-### Fixed
-
-- Reverted change to RetryPlugin so it again waits when retrying to avoid "can only throw objects" error.
-
-## 1.8.0 - 2018-09-21
-
-### Added
-
- - Add an option on ErrorPlugin to only throw exception on response with 5XX status code.
-
-### Changed
-
-- AddPathPlugin no longer add prefix multiple times if a request is restarted - it now only adds the prefix if that request chain has not yet passed through the AddPathPlugin
-- RetryPlugin no longer wait for retried requests and use a deferred promise instead
-
-### Fixed
-
-- Decoder plugin will now remove header when there is no more encoding, instead of setting to an empty array
-
-## 1.7.0 - 2017-11-30
-
-### Added
-
-- Symfony 4 support
-
-### Changed
-
-- Strict comparison in DecoderPlugin
-
-## 1.6.0 - 2017-10-16
-
-### Added
-
-- Add HttpClientPool client to leverage load balancing and fallback mechanism [see the documentation](http://docs.php-http.org/en/latest/components/client-common.html) for more details.
-- `PluginClientFactory` to create `PluginClient` instances.
-- Added new option 'delay' for `RetryPlugin`.
-- Added new option 'decider' for `RetryPlugin`.
-- Supports more cookie date formats in the Cookie Plugin
-
-### Changed
-
-- The `RetryPlugin` does now wait between retries. To disable/change this feature you must write something like:
-
-```php
-$plugin = new RetryPlugin(['delay' => function(RequestInterface $request, Exception $e, $retries) {
-  return 0;
-});
-```
-
-### Deprecated
-
-- The `debug_plugins` option for `PluginClient` is deprecated and will be removed in 2.0. Use the decorator design pattern instead like in [ProfilePlugin](https://github.com/php-http/HttplugBundle/blob/de33f9c14252f22093a5ec7d84f17535ab31a384/Collector/ProfilePlugin.php).
-
-## 1.5.0 - 2017-03-30
-
-### Added
-
-- `QueryDefaultsPlugin` to add default query parameters.
-
-## 1.4.2 - 2017-03-18
-
-### Deprecated
-
-- `DecoderPlugin` does not longer claim to support `compress` content encoding
-
-### Fixed
-
-- `CookiePlugin` allows main domain cookies to be sent/stored for subdomains
-- `DecoderPlugin` uses the right `FilteredStream` to handle `deflate` content encoding
-
-
-## 1.4.1 - 2017-02-20
-
-### Fixed
-
-- Cast return value of `StreamInterface::getSize` to string in `ContentLengthPlugin`
-
-
-## 1.4.0 - 2016-11-04
-
-### Added
-
-- Add Path plugin
-- Base URI plugin that combines Add Host and Add Path plugins
-
-
-## 1.3.0 - 2016-10-16
-
-### Changed
-
-- Fix Emulated Trait to use Http based promise which respect the HttpAsyncClient interface
-- Require Httplug 1.1 where we use HTTP specific promises.
-- RedirectPlugin: use the full URL instead of the URI to properly keep track of redirects
-- Add AddPathPlugin for API URLs with base path
-- Add BaseUriPlugin that combines AddHostPlugin and AddPathPlugin
-
-
-## 1.2.1 - 2016-07-26
-
-### Changed
-
-- AddHostPlugin also sets the port if specified
-
-
-## 1.2.0 - 2016-07-14
-
-### Added
-
-- Suggest separate plugins in composer.json
-- Introduced `debug_plugins` option for `PluginClient`
-
-
-## 1.1.0 - 2016-05-04
-
-### Added
-
-- Add a flexible http client providing both contract, and only emulating what's necessary
-- HTTP Client Router: route requests to underlying clients
-- Plugin client and core plugins moved here from `php-http/plugins`
-
-### Deprecated
-
-- Extending client classes, they will be made final in version 2.0
-
-
-## 1.0.0 - 2016-01-27
-
-### Changed
-
-- Remove useless interface in BatchException
-
-
-## 0.2.0 - 2016-01-12
-
-### Changed
-
-- Updated package files
-- Updated HTTPlug to RC1
-
-
-## 0.1.1 - 2015-12-26
-
-### Added
-
-- Emulated clients
-
-
-## 0.1.0 - 2015-12-25
-
-### Added
-
-- Batch client from utils
-- Methods client from utils
-- Emulators and decorators from client-tools

+ 0 - 19
vendor/php-http/client-common/LICENSE

@@ -1,19 +0,0 @@
-Copyright (c) 2015-2016 PHP HTTP Team <team@php-http.org>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.

+ 0 - 55
vendor/php-http/client-common/README.md

@@ -1,55 +0,0 @@
-# HTTP Client Common
-
-[![Latest Version](https://img.shields.io/github/release/php-http/client-common.svg?style=flat-square)](https://github.com/php-http/client-common/releases)
-[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
-[![Build Status](https://img.shields.io/travis/php-http/client-common/master.svg?style=flat-square)](https://travis-ci.org/php-http/client-common)
-[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/client-common.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/client-common)
-[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/client-common.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/client-common)
-[![Total Downloads](https://img.shields.io/packagist/dt/php-http/client-common.svg?style=flat-square)](https://packagist.org/packages/php-http/client-common)
-
-**Common HTTP Client implementations and tools for HTTPlug.**
-
-
-## Install
-
-Via Composer
-
-``` bash
-$ composer require php-http/client-common
-```
-
-
-## Usage
-
-This package provides common tools for HTTP Clients:
-
-- BatchClient to handle sending requests in parallel
-- A convenience client with HTTP method names as class methods
-- Emulator, decorator layers for sync/async clients
-
-
-## Documentation
-
-Please see the [official documentation](http://docs.php-http.org/en/latest/components/client-common.html).
-
-
-## Testing
-
-``` bash
-$ composer test
-```
-
-
-## Contributing
-
-Please see our [contributing guide](http://docs.php-http.org/en/latest/development/contributing.html).
-
-
-## Security
-
-If you discover any security related issues, please contact us at [security@php-http.org](mailto:security@php-http.org).
-
-
-## License
-
-The MIT License (MIT). Please see [License File](LICENSE) for more information.

+ 0 - 67
vendor/php-http/client-common/composer.json

@@ -1,67 +0,0 @@
-{
-    "name": "php-http/client-common",
-    "description": "Common HTTP Client implementations and tools for HTTPlug",
-    "license": "MIT",
-    "keywords": ["http", "client", "httplug", "common"],
-    "homepage": "http://httplug.io",
-    "authors": [
-        {
-            "name": "Márk Sági-Kazár",
-            "email": "mark.sagikazar@gmail.com"
-        }
-    ],
-    "require": {
-        "php": "^7.1 || ^8.0",
-        "php-http/httplug": "^2.0",
-        "php-http/message": "^1.6",
-        "php-http/message-factory": "^1.0",
-        "psr/http-client": "^1.0",
-        "psr/http-factory": "^1.0",
-        "psr/http-message": "^1.0",
-        "symfony/options-resolver": "~4.0.15 || ~4.1.9 || ^4.2.1 || ^5.0 || ^6.0",
-        "symfony/polyfill-php80": "^1.17"
-    },
-    "require-dev": {
-        "doctrine/instantiator": "^1.1",
-        "guzzlehttp/psr7": "^1.4",
-        "nyholm/psr7": "^1.2",
-        "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1",
-        "phpspec/prophecy": "^1.10.2",
-        "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3"
-    },
-    "suggest": {
-        "ext-json": "To detect JSON responses with the ContentTypePlugin",
-        "ext-libxml": "To detect XML responses with the ContentTypePlugin",
-        "php-http/logger-plugin": "PSR-3 Logger plugin",
-        "php-http/cache-plugin": "PSR-6 Cache plugin",
-        "php-http/stopwatch-plugin": "Symfony Stopwatch plugin"
-    },
-    "autoload": {
-        "psr-4": {
-            "Http\\Client\\Common\\": "src/"
-        }
-    },
-    "autoload-dev": {
-        "psr-4": {
-            "spec\\Http\\Client\\Common\\": "spec/"
-        }
-    },
-    "scripts": {
-        "test": [
-            "vendor/bin/phpspec run",
-            "vendor/bin/phpunit"
-        ],
-        "test-ci": [
-            "vendor/bin/phpspec run -c phpspec.ci.yml",
-            "vendor/bin/phpunit"
-        ]
-    },
-    "config": {
-        "sort-packages": true
-    },
-    "extra": {
-        "branch-alias": {
-            "dev-master": "2.3.x-dev"
-        }
-    }
-}

+ 0 - 42
vendor/php-http/client-common/src/BatchClient.php

@@ -1,42 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Client\Common\Exception\BatchException;
-use Psr\Http\Client\ClientExceptionInterface;
-use Psr\Http\Client\ClientInterface;
-
-final class BatchClient implements BatchClientInterface
-{
-    /**
-     * @var ClientInterface
-     */
-    private $client;
-
-    public function __construct(ClientInterface $client)
-    {
-        $this->client = $client;
-    }
-
-    public function sendRequests(array $requests): BatchResult
-    {
-        $batchResult = new BatchResult();
-
-        foreach ($requests as $request) {
-            try {
-                $response = $this->client->sendRequest($request);
-                $batchResult = $batchResult->addResponse($request, $response);
-            } catch (ClientExceptionInterface $e) {
-                $batchResult = $batchResult->addException($request, $e);
-            }
-        }
-
-        if ($batchResult->hasExceptions()) {
-            throw new BatchException($batchResult);
-        }
-
-        return $batchResult;
-    }
-}

+ 0 - 34
vendor/php-http/client-common/src/BatchClientInterface.php

@@ -1,34 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Client\Common\Exception\BatchException;
-use Psr\Http\Message\RequestInterface;
-
-/**
- * BatchClient allow to sends multiple request and retrieve a Batch Result.
- *
- * This implementation simply loops over the requests and uses sendRequest with each of them.
- *
- * @author Joel Wurtz <jwurtz@jolicode.com>
- */
-interface BatchClientInterface
-{
-    /**
-     * Send several requests.
-     *
-     * You may not assume that the requests are executed in a particular order. If the order matters
-     * for your application, use sendRequest sequentially.
-     *
-     * @param RequestInterface[] $requests The requests to send
-     *
-     * @return BatchResult Containing one result per request
-     *
-     * @throws BatchException If one or more requests fails. The exception gives access to the
-     *                        BatchResult with a map of request to result for success, request to
-     *                        exception for failures
-     */
-    public function sendRequests(array $requests): BatchResult;
-}

+ 0 - 157
vendor/php-http/client-common/src/BatchResult.php

@@ -1,157 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Psr\Http\Client\ClientExceptionInterface;
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\ResponseInterface;
-
-/**
- * Responses and exceptions returned from parallel request execution.
- *
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
- */
-final class BatchResult
-{
-    /**
-     * @var \SplObjectStorage<RequestInterface, ResponseInterface>
-     */
-    private $responses;
-
-    /**
-     * @var \SplObjectStorage<RequestInterface, ClientExceptionInterface>
-     */
-    private $exceptions;
-
-    public function __construct()
-    {
-        $this->responses = new \SplObjectStorage();
-        $this->exceptions = new \SplObjectStorage();
-    }
-
-    /**
-     * Checks if there are any successful responses at all.
-     */
-    public function hasResponses(): bool
-    {
-        return $this->responses->count() > 0;
-    }
-
-    /**
-     * Returns all successful responses.
-     *
-     * @return ResponseInterface[]
-     */
-    public function getResponses(): array
-    {
-        $responses = [];
-
-        foreach ($this->responses as $request) {
-            $responses[] = $this->responses[$request];
-        }
-
-        return $responses;
-    }
-
-    /**
-     * Checks if there is a successful response for a request.
-     */
-    public function isSuccessful(RequestInterface $request): bool
-    {
-        return $this->responses->contains($request);
-    }
-
-    /**
-     * Returns the response for a successful request.
-     *
-     * @throws \UnexpectedValueException If request was not part of the batch or failed
-     */
-    public function getResponseFor(RequestInterface $request): ResponseInterface
-    {
-        try {
-            return $this->responses[$request];
-        } catch (\UnexpectedValueException $e) {
-            throw new \UnexpectedValueException('Request not found', $e->getCode(), $e);
-        }
-    }
-
-    /**
-     * Adds a response in an immutable way.
-     *
-     * @return BatchResult the new BatchResult with this request-response pair added to it
-     */
-    public function addResponse(RequestInterface $request, ResponseInterface $response): self
-    {
-        $new = clone $this;
-        $new->responses->attach($request, $response);
-
-        return $new;
-    }
-
-    /**
-     * Checks if there are any unsuccessful requests at all.
-     */
-    public function hasExceptions(): bool
-    {
-        return $this->exceptions->count() > 0;
-    }
-
-    /**
-     * Returns all exceptions for the unsuccessful requests.
-     *
-     * @return ClientExceptionInterface[]
-     */
-    public function getExceptions(): array
-    {
-        $exceptions = [];
-
-        foreach ($this->exceptions as $request) {
-            $exceptions[] = $this->exceptions[$request];
-        }
-
-        return $exceptions;
-    }
-
-    /**
-     * Checks if there is an exception for a request, meaning the request failed.
-     */
-    public function isFailed(RequestInterface $request): bool
-    {
-        return $this->exceptions->contains($request);
-    }
-
-    /**
-     * Returns the exception for a failed request.
-     *
-     * @throws \UnexpectedValueException If request was not part of the batch or was successful
-     */
-    public function getExceptionFor(RequestInterface $request): ClientExceptionInterface
-    {
-        try {
-            return $this->exceptions[$request];
-        } catch (\UnexpectedValueException $e) {
-            throw new \UnexpectedValueException('Request not found', $e->getCode(), $e);
-        }
-    }
-
-    /**
-     * Adds an exception in an immutable way.
-     *
-     * @return BatchResult the new BatchResult with this request-exception pair added to it
-     */
-    public function addException(RequestInterface $request, ClientExceptionInterface $exception): self
-    {
-        $new = clone $this;
-        $new->exceptions->attach($request, $exception);
-
-        return $new;
-    }
-
-    public function __clone()
-    {
-        $this->responses = clone $this->responses;
-        $this->exceptions = clone $this->exceptions;
-    }
-}

+ 0 - 152
vendor/php-http/client-common/src/Deferred.php

@@ -1,152 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Promise\Promise;
-use Psr\Http\Client\ClientExceptionInterface;
-use Psr\Http\Message\ResponseInterface;
-
-/**
- * A deferred allow to return a promise which has not been resolved yet.
- */
-final class Deferred implements Promise
-{
-    /**
-     * @var ResponseInterface|null
-     */
-    private $value;
-
-    /**
-     * @var ClientExceptionInterface|null
-     */
-    private $failure;
-
-    /**
-     * @var string
-     */
-    private $state;
-
-    /**
-     * @var callable
-     */
-    private $waitCallback;
-
-    /**
-     * @var callable[]
-     */
-    private $onFulfilledCallbacks;
-
-    /**
-     * @var callable[]
-     */
-    private $onRejectedCallbacks;
-
-    public function __construct(callable $waitCallback)
-    {
-        $this->waitCallback = $waitCallback;
-        $this->state = Promise::PENDING;
-        $this->onFulfilledCallbacks = [];
-        $this->onRejectedCallbacks = [];
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function then(callable $onFulfilled = null, callable $onRejected = null): Promise
-    {
-        $deferred = new self($this->waitCallback);
-
-        $this->onFulfilledCallbacks[] = function (ResponseInterface $response) use ($onFulfilled, $deferred) {
-            try {
-                if (null !== $onFulfilled) {
-                    $response = $onFulfilled($response);
-                }
-                $deferred->resolve($response);
-            } catch (ClientExceptionInterface $exception) {
-                $deferred->reject($exception);
-            }
-        };
-
-        $this->onRejectedCallbacks[] = function (ClientExceptionInterface $exception) use ($onRejected, $deferred) {
-            try {
-                if (null !== $onRejected) {
-                    $response = $onRejected($exception);
-                    $deferred->resolve($response);
-
-                    return;
-                }
-                $deferred->reject($exception);
-            } catch (ClientExceptionInterface $newException) {
-                $deferred->reject($newException);
-            }
-        };
-
-        return $deferred;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function getState(): string
-    {
-        return $this->state;
-    }
-
-    /**
-     * Resolve this deferred with a Response.
-     */
-    public function resolve(ResponseInterface $response): void
-    {
-        if (Promise::PENDING !== $this->state) {
-            return;
-        }
-
-        $this->value = $response;
-        $this->state = Promise::FULFILLED;
-
-        foreach ($this->onFulfilledCallbacks as $onFulfilledCallback) {
-            $onFulfilledCallback($response);
-        }
-    }
-
-    /**
-     * Reject this deferred with an Exception.
-     */
-    public function reject(ClientExceptionInterface $exception): void
-    {
-        if (Promise::PENDING !== $this->state) {
-            return;
-        }
-
-        $this->failure = $exception;
-        $this->state = Promise::REJECTED;
-
-        foreach ($this->onRejectedCallbacks as $onRejectedCallback) {
-            $onRejectedCallback($exception);
-        }
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function wait($unwrap = true)
-    {
-        if (Promise::PENDING === $this->state) {
-            $callback = $this->waitCallback;
-            $callback();
-        }
-
-        if (!$unwrap) {
-            return null;
-        }
-
-        if (Promise::FULFILLED === $this->state) {
-            return $this->value;
-        }
-
-        /** @var ClientExceptionInterface */
-        throw $this->failure;
-    }
-}

+ 0 - 25
vendor/php-http/client-common/src/EmulatedHttpAsyncClient.php

@@ -1,25 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Client\HttpAsyncClient;
-use Http\Client\HttpClient;
-use Psr\Http\Client\ClientInterface;
-
-/**
- * Emulates an async HTTP client with the help of a synchronous client.
- *
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
- */
-final class EmulatedHttpAsyncClient implements HttpClient, HttpAsyncClient
-{
-    use HttpAsyncClientEmulator;
-    use HttpClientDecorator;
-
-    public function __construct(ClientInterface $httpClient)
-    {
-        $this->httpClient = $httpClient;
-    }
-}

+ 0 - 24
vendor/php-http/client-common/src/EmulatedHttpClient.php

@@ -1,24 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Client\HttpAsyncClient;
-use Http\Client\HttpClient;
-
-/**
- * Emulates a synchronous HTTP client with the help of an asynchronous client.
- *
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
- */
-final class EmulatedHttpClient implements HttpClient, HttpAsyncClient
-{
-    use HttpAsyncClientDecorator;
-    use HttpClientEmulator;
-
-    public function __construct(HttpAsyncClient $httpAsyncClient)
-    {
-        $this->httpAsyncClient = $httpAsyncClient;
-    }
-}

+ 0 - 37
vendor/php-http/client-common/src/Exception/BatchException.php

@@ -1,37 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Exception;
-
-use Http\Client\Common\BatchResult;
-use Http\Client\Exception\TransferException;
-
-/**
- * This exception is thrown when HttpClient::sendRequests led to at least one failure.
- *
- * It gives access to a BatchResult with the request-exception and request-response pairs.
- *
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
- */
-final class BatchException extends TransferException
-{
-    /**
-     * @var BatchResult
-     */
-    private $result;
-
-    public function __construct(BatchResult $result)
-    {
-        $this->result = $result;
-        parent::__construct();
-    }
-
-    /**
-     * Returns the BatchResult that contains all responses and exceptions.
-     */
-    public function getResult(): BatchResult
-    {
-        return $this->result;
-    }
-}

+ 0 - 16
vendor/php-http/client-common/src/Exception/CircularRedirectionException.php

@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Exception;
-
-use Http\Client\Exception\HttpException;
-
-/**
- * Thrown when circular redirection is detected.
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class CircularRedirectionException extends HttpException
-{
-}

+ 0 - 16
vendor/php-http/client-common/src/Exception/ClientErrorException.php

@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Exception;
-
-use Http\Client\Exception\HttpException;
-
-/**
- * Thrown when there is a client error (4xx).
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class ClientErrorException extends HttpException
-{
-}

+ 0 - 33
vendor/php-http/client-common/src/Exception/HttpClientNoMatchException.php

@@ -1,33 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Exception;
-
-use Http\Client\Exception\TransferException;
-use Psr\Http\Message\RequestInterface;
-
-/**
- * Thrown when a http client match in the HTTPClientRouter.
- *
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
- */
-final class HttpClientNoMatchException extends TransferException
-{
-    /**
-     * @var RequestInterface
-     */
-    private $request;
-
-    public function __construct(string $message, RequestInterface $request, \Exception $previous = null)
-    {
-        $this->request = $request;
-
-        parent::__construct($message, 0, $previous);
-    }
-
-    public function getRequest(): RequestInterface
-    {
-        return $this->request;
-    }
-}

+ 0 - 16
vendor/php-http/client-common/src/Exception/HttpClientNotFoundException.php

@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Exception;
-
-use Http\Client\Exception\TransferException;
-
-/**
- * Thrown when a http client cannot be chosen in a pool.
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class HttpClientNotFoundException extends TransferException
-{
-}

+ 0 - 16
vendor/php-http/client-common/src/Exception/LoopException.php

@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Exception;
-
-use Http\Client\Exception\RequestException;
-
-/**
- * Thrown when the Plugin Client detects an endless loop.
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class LoopException extends RequestException
-{
-}

+ 0 - 16
vendor/php-http/client-common/src/Exception/MultipleRedirectionException.php

@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Exception;
-
-use Http\Client\Exception\HttpException;
-
-/**
- * Redirect location cannot be chosen.
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class MultipleRedirectionException extends HttpException
-{
-}

+ 0 - 16
vendor/php-http/client-common/src/Exception/ServerErrorException.php

@@ -1,16 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Exception;
-
-use Http\Client\Exception\HttpException;
-
-/**
- * Thrown when there is a server error (5xx).
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class ServerErrorException extends HttpException
-{
-}

+ 0 - 36
vendor/php-http/client-common/src/FlexibleHttpClient.php

@@ -1,36 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Client\HttpAsyncClient;
-use Http\Client\HttpClient;
-use Psr\Http\Client\ClientInterface;
-
-/**
- * A flexible http client, which implements both interface and will emulate
- * one contract, the other, or none at all depending on the injected client contract.
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class FlexibleHttpClient implements HttpClient, HttpAsyncClient
-{
-    use HttpClientDecorator;
-    use HttpAsyncClientDecorator;
-
-    /**
-     * @param ClientInterface|HttpAsyncClient $client
-     */
-    public function __construct($client)
-    {
-        if (!$client instanceof ClientInterface && !$client instanceof HttpAsyncClient) {
-            throw new \TypeError(
-                sprintf('%s::__construct(): Argument #1 ($client) must be of type %s|%s, %s given', self::class, ClientInterface::class, HttpAsyncClient::class, get_debug_type($client))
-            );
-        }
-
-        $this->httpClient = $client instanceof ClientInterface ? $client : new EmulatedHttpClient($client);
-        $this->httpAsyncClient = $client instanceof HttpAsyncClient ? $client : new EmulatedHttpAsyncClient($client);
-    }
-}

+ 0 - 31
vendor/php-http/client-common/src/HttpAsyncClientDecorator.php

@@ -1,31 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Client\HttpAsyncClient;
-use Psr\Http\Message\RequestInterface;
-
-/**
- * Decorates an HTTP Async Client.
- *
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
- */
-trait HttpAsyncClientDecorator
-{
-    /**
-     * @var HttpAsyncClient
-     */
-    protected $httpAsyncClient;
-
-    /**
-     * {@inheritdoc}
-     *
-     * @see HttpAsyncClient::sendAsyncRequest
-     */
-    public function sendAsyncRequest(RequestInterface $request)
-    {
-        return $this->httpAsyncClient->sendAsyncRequest($request);
-    }
-}

+ 0 - 39
vendor/php-http/client-common/src/HttpAsyncClientEmulator.php

@@ -1,39 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Client\Exception;
-use Http\Client\Promise;
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\ResponseInterface;
-
-/**
- * Emulates an HTTP Async Client in an HTTP Client.
- *
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
- */
-trait HttpAsyncClientEmulator
-{
-    /**
-     * {@inheritdoc}
-     *
-     * @see HttpClient::sendRequest
-     */
-    abstract public function sendRequest(RequestInterface $request): ResponseInterface;
-
-    /**
-     * {@inheritdoc}
-     *
-     * @see HttpAsyncClient::sendAsyncRequest
-     */
-    public function sendAsyncRequest(RequestInterface $request)
-    {
-        try {
-            return new Promise\HttpFulfilledPromise($this->sendRequest($request));
-        } catch (Exception $e) {
-            return new Promise\HttpRejectedPromise($e);
-        }
-    }
-}

+ 0 - 32
vendor/php-http/client-common/src/HttpClientDecorator.php

@@ -1,32 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Psr\Http\Client\ClientInterface;
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\ResponseInterface;
-
-/**
- * Decorates an HTTP Client.
- *
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
- */
-trait HttpClientDecorator
-{
-    /**
-     * @var ClientInterface
-     */
-    protected $httpClient;
-
-    /**
-     * {@inheritdoc}
-     *
-     * @see ClientInterface::sendRequest
-     */
-    public function sendRequest(RequestInterface $request): ResponseInterface
-    {
-        return $this->httpClient->sendRequest($request);
-    }
-}

+ 0 - 35
vendor/php-http/client-common/src/HttpClientEmulator.php

@@ -1,35 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\ResponseInterface;
-
-/**
- * Emulates an HTTP Client in an HTTP Async Client.
- *
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
- */
-trait HttpClientEmulator
-{
-    /**
-     * {@inheritdoc}
-     *
-     * @see HttpClient::sendRequest
-     */
-    public function sendRequest(RequestInterface $request): ResponseInterface
-    {
-        $promise = $this->sendAsyncRequest($request);
-
-        return $promise->wait();
-    }
-
-    /**
-     * {@inheritdoc}
-     *
-     * @see HttpAsyncClient::sendAsyncRequest
-     */
-    abstract public function sendAsyncRequest(RequestInterface $request);
-}

+ 0 - 24
vendor/php-http/client-common/src/HttpClientPool.php

@@ -1,24 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Client\Common\HttpClientPool\HttpClientPoolItem;
-use Http\Client\HttpAsyncClient;
-use Http\Client\HttpClient;
-use Psr\Http\Client\ClientInterface;
-
-/**
- * A http client pool allows to send requests on a pool of different http client using a specific strategy (least used,
- * round robin, ...).
- */
-interface HttpClientPool extends HttpAsyncClient, HttpClient
-{
-    /**
-     * Add a client to the pool.
-     *
-     * @param ClientInterface|HttpAsyncClient|HttpClientPoolItem $client
-     */
-    public function addHttpClient($client): void;
-}

+ 0 - 70
vendor/php-http/client-common/src/HttpClientPool/HttpClientPool.php

@@ -1,70 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\HttpClientPool;
-
-use Http\Client\Common\Exception\HttpClientNotFoundException;
-use Http\Client\Common\HttpClientPool as HttpClientPoolInterface;
-use Http\Client\HttpAsyncClient;
-use Psr\Http\Client\ClientInterface;
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\ResponseInterface;
-
-/**
- * A http client pool allows to send requests on a pool of different http client using a specific strategy (least used,
- * round robin, ...).
- */
-abstract class HttpClientPool implements HttpClientPoolInterface
-{
-    /**
-     * @var HttpClientPoolItem[]
-     */
-    protected $clientPool = [];
-
-    /**
-     * Add a client to the pool.
-     *
-     * @param ClientInterface|HttpAsyncClient $client
-     */
-    public function addHttpClient($client): void
-    {
-        // no need to check for HttpClientPoolItem here, since it extends the other interfaces
-        if (!$client instanceof ClientInterface && !$client instanceof HttpAsyncClient) {
-            throw new \TypeError(
-                sprintf('%s::addHttpClient(): Argument #1 ($client) must be of type %s|%s, %s given', self::class, ClientInterface::class, HttpAsyncClient::class, get_debug_type($client))
-            );
-        }
-
-        if (!$client instanceof HttpClientPoolItem) {
-            $client = new HttpClientPoolItem($client);
-        }
-
-        $this->clientPool[] = $client;
-    }
-
-    /**
-     * Return an http client given a specific strategy.
-     *
-     * @throws HttpClientNotFoundException When no http client has been found into the pool
-     *
-     * @return HttpClientPoolItem Return a http client that can do both sync or async
-     */
-    abstract protected function chooseHttpClient(): HttpClientPoolItem;
-
-    /**
-     * {@inheritdoc}
-     */
-    public function sendAsyncRequest(RequestInterface $request)
-    {
-        return $this->chooseHttpClient()->sendAsyncRequest($request);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function sendRequest(RequestInterface $request): ResponseInterface
-    {
-        return $this->chooseHttpClient()->sendRequest($request);
-    }
-}

+ 0 - 181
vendor/php-http/client-common/src/HttpClientPool/HttpClientPoolItem.php

@@ -1,181 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\HttpClientPool;
-
-use Http\Client\Common\FlexibleHttpClient;
-use Http\Client\Exception;
-use Http\Client\HttpAsyncClient;
-use Http\Client\HttpClient;
-use Psr\Http\Client\ClientInterface;
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\ResponseInterface;
-
-/**
- * A HttpClientPoolItem represent a HttpClient inside a Pool.
- *
- * It is disabled when a request failed and can be reenabled after a certain number of seconds.
- * It also keep tracks of the current number of open requests the client is currently being sending
- * (only usable for async method).
- *
- * This class is used internally in the client pools and is not supposed to be used anywhere else.
- *
- * @final
- *
- * @internal
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-class HttpClientPoolItem implements HttpClient, HttpAsyncClient
-{
-    /**
-     * @var int Number of request this client is currently sending
-     */
-    private $sendingRequestCount = 0;
-
-    /**
-     * @var \DateTime|null Time when this client has been disabled or null if enable
-     */
-    private $disabledAt;
-
-    /**
-     * Number of seconds until this client is enabled again after an error.
-     *
-     * null: never reenable this client.
-     *
-     * @var int|null
-     */
-    private $reenableAfter;
-
-    /**
-     * @var FlexibleHttpClient A http client responding to async and sync request
-     */
-    private $client;
-
-    /**
-     * @param ClientInterface|HttpAsyncClient $client
-     * @param int|null                        $reenableAfter Number of seconds until this client is enabled again after an error
-     */
-    public function __construct($client, int $reenableAfter = null)
-    {
-        if (!$client instanceof ClientInterface && !$client instanceof HttpAsyncClient) {
-            throw new \TypeError(
-                sprintf('%s::__construct(): Argument #1 ($client) must be of type %s|%s, %s given', self::class, ClientInterface::class, HttpAsyncClient::class, get_debug_type($client))
-            );
-        }
-
-        $this->client = new FlexibleHttpClient($client);
-        $this->reenableAfter = $reenableAfter;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function sendRequest(RequestInterface $request): ResponseInterface
-    {
-        if ($this->isDisabled()) {
-            throw new Exception\RequestException('Cannot send the request as this client has been disabled', $request);
-        }
-
-        try {
-            $this->incrementRequestCount();
-            $response = $this->client->sendRequest($request);
-            $this->decrementRequestCount();
-        } catch (Exception $e) {
-            $this->disable();
-            $this->decrementRequestCount();
-
-            throw $e;
-        }
-
-        return $response;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function sendAsyncRequest(RequestInterface $request)
-    {
-        if ($this->isDisabled()) {
-            throw new Exception\RequestException('Cannot send the request as this client has been disabled', $request);
-        }
-
-        $this->incrementRequestCount();
-
-        return $this->client->sendAsyncRequest($request)->then(function ($response) {
-            $this->decrementRequestCount();
-
-            return $response;
-        }, function ($exception) {
-            $this->disable();
-            $this->decrementRequestCount();
-
-            throw $exception;
-        });
-    }
-
-    /**
-     * Whether this client is disabled or not.
-     *
-     * If the client was disabled, calling this method checks if the client can
-     * be reenabled and if so enables it.
-     */
-    public function isDisabled(): bool
-    {
-        if (null !== $this->reenableAfter && null !== $this->disabledAt) {
-            // Reenable after a certain time
-            $now = new \DateTime();
-
-            if (($now->getTimestamp() - $this->disabledAt->getTimestamp()) >= $this->reenableAfter) {
-                $this->enable();
-
-                return false;
-            }
-
-            return true;
-        }
-
-        return null !== $this->disabledAt;
-    }
-
-    /**
-     * Get current number of request that are currently being sent by the underlying HTTP client.
-     */
-    public function getSendingRequestCount(): int
-    {
-        return $this->sendingRequestCount;
-    }
-
-    /**
-     * Increment the request count.
-     */
-    private function incrementRequestCount(): void
-    {
-        ++$this->sendingRequestCount;
-    }
-
-    /**
-     * Decrement the request count.
-     */
-    private function decrementRequestCount(): void
-    {
-        --$this->sendingRequestCount;
-    }
-
-    /**
-     * Enable the current client.
-     */
-    private function enable(): void
-    {
-        $this->disabledAt = null;
-    }
-
-    /**
-     * Disable the current client.
-     */
-    private function disable(): void
-    {
-        $this->disabledAt = new \DateTime('now');
-    }
-}

+ 0 - 45
vendor/php-http/client-common/src/HttpClientPool/LeastUsedClientPool.php

@@ -1,45 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\HttpClientPool;
-
-use Http\Client\Common\Exception\HttpClientNotFoundException;
-
-/**
- * LeastUsedClientPool will choose the client with the less current request in the pool.
- *
- * This strategy is only useful when doing async request
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class LeastUsedClientPool extends HttpClientPool
-{
-    /**
-     * {@inheritdoc}
-     */
-    protected function chooseHttpClient(): HttpClientPoolItem
-    {
-        $clientPool = array_filter($this->clientPool, function (HttpClientPoolItem $clientPoolItem) {
-            return !$clientPoolItem->isDisabled();
-        });
-
-        if (0 === count($clientPool)) {
-            throw new HttpClientNotFoundException('Cannot choose a http client as there is no one present in the pool');
-        }
-
-        usort($clientPool, function (HttpClientPoolItem $clientA, HttpClientPoolItem $clientB) {
-            if ($clientA->getSendingRequestCount() === $clientB->getSendingRequestCount()) {
-                return 0;
-            }
-
-            if ($clientA->getSendingRequestCount() < $clientB->getSendingRequestCount()) {
-                return -1;
-            }
-
-            return 1;
-        });
-
-        return reset($clientPool);
-    }
-}

+ 0 - 31
vendor/php-http/client-common/src/HttpClientPool/RandomClientPool.php

@@ -1,31 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\HttpClientPool;
-
-use Http\Client\Common\Exception\HttpClientNotFoundException;
-
-/**
- * RoundRobinClientPool will choose the next client in the pool.
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class RandomClientPool extends HttpClientPool
-{
-    /**
-     * {@inheritdoc}
-     */
-    protected function chooseHttpClient(): HttpClientPoolItem
-    {
-        $clientPool = array_filter($this->clientPool, function (HttpClientPoolItem $clientPoolItem) {
-            return !$clientPoolItem->isDisabled();
-        });
-
-        if (0 === count($clientPool)) {
-            throw new HttpClientNotFoundException('Cannot choose a http client as there is no one present in the pool');
-        }
-
-        return $clientPool[array_rand($clientPool)];
-    }
-}

+ 0 - 42
vendor/php-http/client-common/src/HttpClientPool/RoundRobinClientPool.php

@@ -1,42 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\HttpClientPool;
-
-use Http\Client\Common\Exception\HttpClientNotFoundException;
-
-/**
- * RoundRobinClientPool will choose the next client in the pool.
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class RoundRobinClientPool extends HttpClientPool
-{
-    /**
-     * {@inheritdoc}
-     */
-    protected function chooseHttpClient(): HttpClientPoolItem
-    {
-        $last = current($this->clientPool);
-
-        do {
-            $client = next($this->clientPool);
-
-            if (false === $client) {
-                $client = reset($this->clientPool);
-
-                if (false === $client) {
-                    throw new HttpClientNotFoundException('Cannot choose a http client as there is no one present in the pool');
-                }
-            }
-
-            // Case when there is only one and the last one has been disabled
-            if ($last === $client && $client->isDisabled()) {
-                throw new HttpClientNotFoundException('Cannot choose a http client as there is no one enabled in the pool');
-            }
-        } while ($client->isDisabled());
-
-        return $client;
-    }
-}

+ 0 - 74
vendor/php-http/client-common/src/HttpClientRouter.php

@@ -1,74 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Client\Common\Exception\HttpClientNoMatchException;
-use Http\Client\HttpAsyncClient;
-use Http\Message\RequestMatcher;
-use Psr\Http\Client\ClientInterface;
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\ResponseInterface;
-
-/**
- * {@inheritdoc}
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class HttpClientRouter implements HttpClientRouterInterface
-{
-    /**
-     * @var (array{matcher: RequestMatcher, client: FlexibleHttpClient})[]
-     */
-    private $clients = [];
-
-    /**
-     * {@inheritdoc}
-     */
-    public function sendRequest(RequestInterface $request): ResponseInterface
-    {
-        return $this->chooseHttpClient($request)->sendRequest($request);
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function sendAsyncRequest(RequestInterface $request)
-    {
-        return $this->chooseHttpClient($request)->sendAsyncRequest($request);
-    }
-
-    /**
-     * Add a client to the router.
-     *
-     * @param ClientInterface|HttpAsyncClient $client
-     */
-    public function addClient($client, RequestMatcher $requestMatcher): void
-    {
-        if (!$client instanceof ClientInterface && !$client instanceof HttpAsyncClient) {
-            throw new \TypeError(
-                sprintf('%s::addClient(): Argument #1 ($client) must be of type %s|%s, %s given', self::class, ClientInterface::class, HttpAsyncClient::class, get_debug_type($client))
-            );
-        }
-
-        $this->clients[] = [
-            'matcher' => $requestMatcher,
-            'client' => new FlexibleHttpClient($client),
-        ];
-    }
-
-    /**
-     * Choose an HTTP client given a specific request.
-     */
-    private function chooseHttpClient(RequestInterface $request): FlexibleHttpClient
-    {
-        foreach ($this->clients as $client) {
-            if ($client['matcher']->matches($request)) {
-                return $client['client'];
-            }
-        }
-
-        throw new HttpClientNoMatchException('No client found for the specified request', $request);
-    }
-}

+ 0 - 27
vendor/php-http/client-common/src/HttpClientRouterInterface.php

@@ -1,27 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Client\HttpAsyncClient;
-use Http\Client\HttpClient;
-use Http\Message\RequestMatcher;
-use Psr\Http\Client\ClientInterface;
-
-/**
- * Route a request to a specific client in the stack based using a RequestMatcher.
- *
- * This is not a HttpClientPool client because it uses a matcher to select the client.
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-interface HttpClientRouterInterface extends HttpClient, HttpAsyncClient
-{
-    /**
-     * Add a client to the router.
-     *
-     * @param ClientInterface|HttpAsyncClient $client
-     */
-    public function addClient($client, RequestMatcher $requestMatcher): void;
-}

+ 0 - 150
vendor/php-http/client-common/src/HttpMethodsClient.php

@@ -1,150 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Message\RequestFactory;
-use Psr\Http\Client\ClientInterface;
-use Psr\Http\Message\RequestFactoryInterface;
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\ResponseInterface;
-use Psr\Http\Message\StreamFactoryInterface;
-use Psr\Http\Message\StreamInterface;
-use Psr\Http\Message\UriInterface;
-
-final class HttpMethodsClient implements HttpMethodsClientInterface
-{
-    /**
-     * @var ClientInterface
-     */
-    private $httpClient;
-
-    /**
-     * @var RequestFactory|RequestFactoryInterface
-     */
-    private $requestFactory;
-
-    /**
-     * @var StreamFactoryInterface|null
-     */
-    private $streamFactory;
-
-    /**
-     * @param RequestFactory|RequestFactoryInterface $requestFactory
-     */
-    public function __construct(ClientInterface $httpClient, $requestFactory, StreamFactoryInterface $streamFactory = null)
-    {
-        if (!$requestFactory instanceof RequestFactory && !$requestFactory instanceof RequestFactoryInterface) {
-            throw new \TypeError(
-                sprintf('%s::__construct(): Argument #2 ($requestFactory) must be of type %s|%s, %s given', self::class, RequestFactory::class, RequestFactoryInterface::class, get_debug_type($requestFactory))
-            );
-        }
-
-        if (!$requestFactory instanceof RequestFactory && null === $streamFactory) {
-            @trigger_error(sprintf('Passing a %s without a %s to %s::__construct() is deprecated as of version 2.3 and will be disallowed in version 3.0. A stream factory is required to create a request with a non-empty string body.', RequestFactoryInterface::class, StreamFactoryInterface::class, self::class));
-        }
-
-        $this->httpClient = $httpClient;
-        $this->requestFactory = $requestFactory;
-        $this->streamFactory = $streamFactory;
-    }
-
-    public function get($uri, array $headers = []): ResponseInterface
-    {
-        return $this->send('GET', $uri, $headers, null);
-    }
-
-    public function head($uri, array $headers = []): ResponseInterface
-    {
-        return $this->send('HEAD', $uri, $headers, null);
-    }
-
-    public function trace($uri, array $headers = []): ResponseInterface
-    {
-        return $this->send('TRACE', $uri, $headers, null);
-    }
-
-    public function post($uri, array $headers = [], $body = null): ResponseInterface
-    {
-        return $this->send('POST', $uri, $headers, $body);
-    }
-
-    public function put($uri, array $headers = [], $body = null): ResponseInterface
-    {
-        return $this->send('PUT', $uri, $headers, $body);
-    }
-
-    public function patch($uri, array $headers = [], $body = null): ResponseInterface
-    {
-        return $this->send('PATCH', $uri, $headers, $body);
-    }
-
-    public function delete($uri, array $headers = [], $body = null): ResponseInterface
-    {
-        return $this->send('DELETE', $uri, $headers, $body);
-    }
-
-    public function options($uri, array $headers = [], $body = null): ResponseInterface
-    {
-        return $this->send('OPTIONS', $uri, $headers, $body);
-    }
-
-    public function send(string $method, $uri, array $headers = [], $body = null): ResponseInterface
-    {
-        if (!is_string($uri) && !$uri instanceof UriInterface) {
-            throw new \TypeError(
-                sprintf('%s::send(): Argument #2 ($uri) must be of type string|%s, %s given', self::class, UriInterface::class, get_debug_type($uri))
-            );
-        }
-
-        if (!is_string($body) && !$body instanceof StreamInterface && null !== $body) {
-            throw new \TypeError(
-                sprintf('%s::send(): Argument #4 ($body) must be of type string|%s|null, %s given', self::class, StreamInterface::class, get_debug_type($body))
-            );
-        }
-
-        return $this->sendRequest(
-            self::createRequest($method, $uri, $headers, $body)
-        );
-    }
-
-    /**
-     * @param string|UriInterface         $uri
-     * @param string|StreamInterface|null $body
-     */
-    private function createRequest(string $method, $uri, array $headers = [], $body = null): RequestInterface
-    {
-        if ($this->requestFactory instanceof RequestFactory) {
-            return $this->requestFactory->createRequest(
-                $method,
-                $uri,
-                $headers,
-                $body
-            );
-        }
-
-        $request = $this->requestFactory->createRequest($method, $uri);
-
-        foreach ($headers as $key => $value) {
-            $request = $request->withHeader($key, $value);
-        }
-
-        if (null !== $body && '' !== $body) {
-            if (null === $this->streamFactory) {
-                throw new \RuntimeException('Cannot create request: A stream factory is required to create a request with a non-empty string body.');
-            }
-
-            $request = $request->withBody(
-                is_string($body) ? $this->streamFactory->createStream($body) : $body
-            );
-        }
-
-        return $request;
-    }
-
-    public function sendRequest(RequestInterface $request): ResponseInterface
-    {
-        return $this->httpClient->sendRequest($request);
-    }
-}

+ 0 - 116
vendor/php-http/client-common/src/HttpMethodsClientInterface.php

@@ -1,116 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Client\Exception;
-use Http\Client\HttpClient;
-use Psr\Http\Message\ResponseInterface;
-use Psr\Http\Message\StreamInterface;
-use Psr\Http\Message\UriInterface;
-
-/**
- * Convenience HTTP client that integrates the MessageFactory in order to send
- * requests in the following form:.
- *
- * $client
- *     ->get('/foo')
- *     ->post('/bar')
- * ;
- *
- * The client also exposes the sendRequest methods of the wrapped HttpClient.
- *
- * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
- * @author David Buchmann <mail@davidbu.ch>
- */
-interface HttpMethodsClientInterface extends HttpClient
-{
-    /**
-     * Sends a GET request.
-     *
-     * @param string|UriInterface $uri
-     *
-     * @throws Exception
-     */
-    public function get($uri, array $headers = []): ResponseInterface;
-
-    /**
-     * Sends an HEAD request.
-     *
-     * @param string|UriInterface $uri
-     *
-     * @throws Exception
-     */
-    public function head($uri, array $headers = []): ResponseInterface;
-
-    /**
-     * Sends a TRACE request.
-     *
-     * @param string|UriInterface $uri
-     *
-     * @throws Exception
-     */
-    public function trace($uri, array $headers = []): ResponseInterface;
-
-    /**
-     * Sends a POST request.
-     *
-     * @param string|UriInterface         $uri
-     * @param string|StreamInterface|null $body
-     *
-     * @throws Exception
-     */
-    public function post($uri, array $headers = [], $body = null): ResponseInterface;
-
-    /**
-     * Sends a PUT request.
-     *
-     * @param string|UriInterface         $uri
-     * @param string|StreamInterface|null $body
-     *
-     * @throws Exception
-     */
-    public function put($uri, array $headers = [], $body = null): ResponseInterface;
-
-    /**
-     * Sends a PATCH request.
-     *
-     * @param string|UriInterface         $uri
-     * @param string|StreamInterface|null $body
-     *
-     * @throws Exception
-     */
-    public function patch($uri, array $headers = [], $body = null): ResponseInterface;
-
-    /**
-     * Sends a DELETE request.
-     *
-     * @param string|UriInterface         $uri
-     * @param string|StreamInterface|null $body
-     *
-     * @throws Exception
-     */
-    public function delete($uri, array $headers = [], $body = null): ResponseInterface;
-
-    /**
-     * Sends an OPTIONS request.
-     *
-     * @param string|UriInterface         $uri
-     * @param string|StreamInterface|null $body
-     *
-     * @throws Exception
-     */
-    public function options($uri, array $headers = [], $body = null): ResponseInterface;
-
-    /**
-     * Sends a request with any HTTP method.
-     *
-     * @param string                      $method HTTP method to use
-     * @param string|UriInterface         $uri
-     * @param string|StreamInterface|null $body
-     *
-     * @throws Exception
-     */
-    public function send(string $method, $uri, array $headers = [], $body = null): ResponseInterface;
-}

+ 0 - 33
vendor/php-http/client-common/src/Plugin.php

@@ -1,33 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common;
-
-use Http\Promise\Promise;
-use Psr\Http\Message\RequestInterface;
-
-/**
- * A plugin is a middleware to transform the request and/or the response.
- *
- * The plugin can:
- *  - break the chain and return a response
- *  - dispatch the request to the next middleware
- *  - restart the request
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-interface Plugin
-{
-    /**
-     * Handle the request and return the response coming from the next callable.
-     *
-     * @see http://docs.php-http.org/en/latest/plugins/build-your-own.html
-     *
-     * @param callable(RequestInterface): Promise $next  Next middleware in the chain, the request is passed as the first argument
-     * @param callable(RequestInterface): Promise $first First middleware in the chain, used to to restart a request
-     *
-     * @return Promise Resolves a PSR-7 Response or fails with an Http\Client\Exception (The same as HttpAsyncClient)
-     */
-    public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise;
-}

+ 0 - 76
vendor/php-http/client-common/src/Plugin/AddHostPlugin.php

@@ -1,76 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Plugin;
-
-use Http\Client\Common\Plugin;
-use Http\Promise\Promise;
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\UriInterface;
-use Symfony\Component\OptionsResolver\OptionsResolver;
-
-/**
- * Add schema, host and port to a request. Can be set to overwrite the schema and host if desired.
- *
- * @author Tobias Nyholm <tobias.nyholm@gmail.com>
- */
-final class AddHostPlugin implements Plugin
-{
-    /**
-     * @var UriInterface
-     */
-    private $host;
-
-    /**
-     * @var bool
-     */
-    private $replace;
-
-    /**
-     * @param array{'replace'?: bool} $config
-     *
-     * Configuration options:
-     *   - replace: True will replace all hosts, false will only add host when none is specified.
-     */
-    public function __construct(UriInterface $host, array $config = [])
-    {
-        if ('' === $host->getHost()) {
-            throw new \LogicException('Host can not be empty');
-        }
-
-        $this->host = $host;
-
-        $resolver = new OptionsResolver();
-        $this->configureOptions($resolver);
-        $options = $resolver->resolve($config);
-
-        $this->replace = $options['replace'];
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
-    {
-        if ($this->replace || '' === $request->getUri()->getHost()) {
-            $uri = $request->getUri()
-                ->withHost($this->host->getHost())
-                ->withScheme($this->host->getScheme())
-                ->withPort($this->host->getPort())
-            ;
-
-            $request = $request->withUri($uri);
-        }
-
-        return $next($request);
-    }
-
-    private function configureOptions(OptionsResolver $resolver): void
-    {
-        $resolver->setDefaults([
-            'replace' => false,
-        ]);
-        $resolver->setAllowedTypes('replace', 'bool');
-    }
-}

+ 0 - 78
vendor/php-http/client-common/src/Plugin/AddPathPlugin.php

@@ -1,78 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Plugin;
-
-use Http\Client\Common\Plugin;
-use Http\Promise\Promise;
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\UriInterface;
-
-/**
- * Prepend a base path to the request URI. Useful for base API URLs like http://domain.com/api.
- *
- * @author Sullivan Senechal <soullivaneuh@gmail.com>
- */
-final class AddPathPlugin implements Plugin
-{
-    /**
-     * @var UriInterface
-     */
-    private $uri;
-
-    public function __construct(UriInterface $uri)
-    {
-        if ('' === $uri->getPath()) {
-            throw new \LogicException('URI path cannot be empty');
-        }
-
-        if ('/' === substr($uri->getPath(), -1)) {
-            $uri = $uri->withPath(rtrim($uri->getPath(), '/'));
-        }
-
-        $this->uri = $uri;
-    }
-
-    /**
-     * Adds a prefix in the beginning of the URL's path.
-     *
-     * The prefix is not added if that prefix is already on the URL's path. This will fail on the edge
-     * case of the prefix being repeated, for example if `https://example.com/api/api/foo` is a valid
-     * URL on the server and the configured prefix is `/api`.
-     *
-     * We looked at other solutions, but they are all much more complicated, while still having edge
-     * cases:
-     * - Doing an spl_object_hash on `$first` will lead to collisions over time because over time the
-     *   hash can collide.
-     * - Have the PluginClient provide a magic header to identify the request chain and only apply
-     *   this plugin once.
-     *
-     * There are 2 reasons for the AddPathPlugin to be executed twice on the same request:
-     * - A plugin can restart the chain by calling `$first`, e.g. redirect
-     * - A plugin can call `$next` more than once, e.g. retry
-     *
-     * Depending on the scenario, the path should or should not be added. E.g. `$first` could
-     * be called after a redirect response from the server. The server likely already has the
-     * correct path.
-     *
-     * No solution fits all use cases. This implementation will work fine for the common use cases.
-     * If you have a specific situation where this is not the right thing, you can build a custom plugin
-     * that does exactly what you need.
-     *
-     * {@inheritdoc}
-     */
-    public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
-    {
-        $prepend = $this->uri->getPath();
-        $path = $request->getUri()->getPath();
-
-        if (substr($path, 0, strlen($prepend)) !== $prepend) {
-            $request = $request->withUri($request->getUri()
-                 ->withPath($prepend.$path)
-             );
-        }
-
-        return $next($request);
-    }
-}

+ 0 - 38
vendor/php-http/client-common/src/Plugin/AuthenticationPlugin.php

@@ -1,38 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Plugin;
-
-use Http\Client\Common\Plugin;
-use Http\Message\Authentication;
-use Http\Promise\Promise;
-use Psr\Http\Message\RequestInterface;
-
-/**
- * Send an authenticated request.
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class AuthenticationPlugin implements Plugin
-{
-    /**
-     * @var Authentication An authentication system
-     */
-    private $authentication;
-
-    public function __construct(Authentication $authentication)
-    {
-        $this->authentication = $authentication;
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
-    {
-        $request = $this->authentication->authenticate($request);
-
-        return $next($request);
-    }
-}

+ 0 - 57
vendor/php-http/client-common/src/Plugin/BaseUriPlugin.php

@@ -1,57 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Plugin;
-
-use Http\Client\Common\Plugin;
-use Http\Promise\Promise;
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\UriInterface;
-
-/**
- * Combines the AddHostPlugin and AddPathPlugin.
- *
- * @author Sullivan Senechal <soullivaneuh@gmail.com>
- */
-final class BaseUriPlugin implements Plugin
-{
-    /**
-     * @var AddHostPlugin
-     */
-    private $addHostPlugin;
-
-    /**
-     * @var AddPathPlugin|null
-     */
-    private $addPathPlugin = null;
-
-    /**
-     * @param UriInterface $uri        Has to contain a host name and can have a path
-     * @param array        $hostConfig Config for AddHostPlugin. @see AddHostPlugin::configureOptions
-     */
-    public function __construct(UriInterface $uri, array $hostConfig = [])
-    {
-        $this->addHostPlugin = new AddHostPlugin($uri, $hostConfig);
-
-        if (rtrim($uri->getPath(), '/')) {
-            $this->addPathPlugin = new AddPathPlugin($uri);
-        }
-    }
-
-    /**
-     * {@inheritdoc}
-     */
-    public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
-    {
-        $addHostNext = function (RequestInterface $request) use ($next, $first) {
-            return $this->addHostPlugin->handleRequest($request, $next, $first);
-        };
-
-        if ($this->addPathPlugin) {
-            return $this->addPathPlugin->handleRequest($request, $addHostNext, $first);
-        }
-
-        return $addHostNext($request);
-    }
-}

+ 0 - 39
vendor/php-http/client-common/src/Plugin/ContentLengthPlugin.php

@@ -1,39 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace Http\Client\Common\Plugin;
-
-use Http\Client\Common\Plugin;
-use Http\Message\Encoding\ChunkStream;
-use Http\Promise\Promise;
-use Psr\Http\Message\RequestInterface;
-
-/**
- * Allow to set the correct content length header on the request or to transfer it as a chunk if not possible.
- *
- * @author Joel Wurtz <joel.wurtz@gmail.com>
- */
-final class ContentLengthPlugin implements Plugin
-{
-    /**
-     * {@inheritdoc}
-     */
-    public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
-    {
-        if (!$request->hasHeader('Content-Length')) {
-            $stream = $request->getBody();
-
-            // Cannot determine the size so we use a chunk stream
-            if (null === $stream->getSize()) {
-                $stream = new ChunkStream($stream);
-                $request = $request->withBody($stream);
-                $request = $request->withAddedHeader('Transfer-Encoding', 'chunked');
-            } else {
-                $request = $request->withHeader('Content-Length', (string) $stream->getSize());
-            }
-        }
-
-        return $next($request);
-    }
-}

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini