diff --git a/README.md b/README.md index 556197d..2d06d0f 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ # Pinecone PHP A beautiful, extendable PHP Package to communicate with your [pinecone.io](https://pinecone.io) indices, collections and -vectors, powered by [Saloon](https://github.com/sammyjo20/saloon). +vectors, powered by [Saloon](https://github.com/saloonphp/saloon). > **Info** -> This package is still in active development, but is already used in some production scenarios. -> Check Todo list below for more information what's missing. +> This package is not yet usable. Working on Upgrading to the latest Pinecone API. [![probots.io](art/probots-banner-1000x400.png)](https://probots.io) diff --git a/art/pinecone-php-img-1200x600.png b/art/pinecone-php-img-1200x600.png new file mode 100644 index 0000000..32a4cf5 Binary files /dev/null and b/art/pinecone-php-img-1200x600.png differ diff --git a/art/probots-banner-1000x400.png b/art/probots-banner-1000x400.png new file mode 100644 index 0000000..cd71cdf Binary files /dev/null and b/art/probots-banner-1000x400.png differ diff --git a/composer.json b/composer.json index 31355d2..df47832 100644 --- a/composer.json +++ b/composer.json @@ -18,8 +18,8 @@ } ], "require": { - "php": "^8.1", - "saloonphp/saloon": "^2.7" + "php": "^8.2", + "saloonphp/saloon": "^3.6" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index e85d5db..52ab634 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dadbe5fe8c95a8c88fa9a70a52531817", + "content-hash": "d3e4c848f51a21a184093fb36caabfa3", "packages": [ { "name": "guzzlehttp/guzzle", - "version": "7.8.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9" + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9", - "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", "shasum": "" }, "require": { @@ -32,11 +32,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -114,7 +114,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.0" + "source": "https://github.com/guzzle/guzzle/tree/7.8.1" }, "funding": [ { @@ -130,28 +130,28 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:20:53+00:00" + "time": "2023-12-03T20:35:24+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "type": "library", "extra": { @@ -197,7 +197,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.1" + "source": "https://github.com/guzzle/promises/tree/2.0.2" }, "funding": [ { @@ -213,20 +213,20 @@ "type": "tidelift" } ], - "time": "2023-08-03T15:11:55+00:00" + "time": "2023-12-03T20:19:20+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.1", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", - "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "shasum": "" }, "require": { @@ -240,9 +240,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -313,7 +313,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.1" + "source": "https://github.com/guzzle/psr7/tree/2.6.2" }, "funding": [ { @@ -329,20 +329,20 @@ "type": "tidelift" } ], - "time": "2023-08-27T10:13:57+00:00" + "time": "2023-12-03T20:05:35+00:00" }, { "name": "psr/http-client", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { @@ -379,9 +379,9 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/1.0.2" + "source": "https://github.com/php-fig/http-client" }, - "time": "2023-04-10T20:12:12+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", @@ -537,36 +537,43 @@ }, { "name": "saloonphp/saloon", - "version": "v2.10.0", + "version": "v3.6.3", "source": { "type": "git", "url": "https://github.com/saloonphp/saloon.git", - "reference": "10801114dde877e3cd4cce7d92254ce768e983c9" + "reference": "e25139705fc93e89b72d24a516b63d6af1f47eab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/saloonphp/saloon/zipball/10801114dde877e3cd4cce7d92254ce768e983c9", - "reference": "10801114dde877e3cd4cce7d92254ce768e983c9", + "url": "https://api.github.com/repos/saloonphp/saloon/zipball/e25139705fc93e89b72d24a516b63d6af1f47eab", + "reference": "e25139705fc93e89b72d24a516b63d6af1f47eab", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "^7.5", + "guzzlehttp/guzzle": "^7.6", "guzzlehttp/promises": "^1.5 || ^2.0", + "guzzlehttp/psr7": "^2.0", "php": "^8.1", + "psr/http-factory": "^1.0", "psr/http-message": "^1.1 || ^2.0" }, + "conflict": { + "sammyjo20/saloon": "*" + }, "require-dev": { "ext-simplexml": "*", "friendsofphp/php-cs-fixer": "^3.5", "illuminate/collections": "^9.39 || ^10.0", "league/flysystem": "^3.0", - "pestphp/pest": "^2.2.3", + "pestphp/pest": "^2.6", "phpstan/phpstan": "^1.9", + "saloonphp/xml-wrangler": "^1.1", "spatie/ray": "^1.33", "symfony/dom-crawler": "^6.0" }, "suggest": { "illuminate/collections": "Required for the response collect() method.", + "saloonphp/xml-wrangler": "Required for the response xmlReader() method.", "symfony/dom-crawler": "Required for the response dom() method." }, "type": "library", @@ -597,23 +604,19 @@ ], "support": { "issues": "https://github.com/saloonphp/saloon/issues", - "source": "https://github.com/saloonphp/saloon/tree/v2.10.0" + "source": "https://github.com/saloonphp/saloon/tree/v3.6.3" }, "funding": [ { "url": "https://github.com/sammyjo20", "type": "github" - }, - { - "url": "https://ko-fi.com/sammyjo20", - "type": "ko_fi" } ], - "time": "2023-09-03T21:48:46+00:00" + "time": "2024-02-14T13:28:05+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -660,7 +663,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -682,16 +685,16 @@ "packages-dev": [ { "name": "brianium/paratest", - "version": "v7.2.6", + "version": "v7.4.3", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "7f372b5bb59b4271adedc67d3129df29b84c4173" + "reference": "64fcfd0e28a6b8078a19dbf9127be2ee645b92ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/7f372b5bb59b4271adedc67d3129df29b84c4173", - "reference": "7f372b5bb59b4271adedc67d3129df29b84c4173", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/64fcfd0e28a6b8078a19dbf9127be2ee645b92ec", + "reference": "64fcfd0e28a6b8078a19dbf9127be2ee645b92ec", "shasum": "" }, "require": { @@ -699,28 +702,27 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-simplexml": "*", - "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", + "fidry/cpu-core-counter": "^1.1.0", "jean85/pretty-package-versions": "^2.0.5", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", - "phpunit/php-code-coverage": "^10.1.3", - "phpunit/php-file-iterator": "^4.0.2", - "phpunit/php-timer": "^6.0", - "phpunit/phpunit": "^10.3.2", - "sebastian/environment": "^6.0.1", - "symfony/console": "^6.3.4", - "symfony/process": "^6.3.4" + "php": "~8.2.0 || ~8.3.0", + "phpunit/php-code-coverage": "^10.1.11 || ^11.0.0", + "phpunit/php-file-iterator": "^4.1.0 || ^5.0.0", + "phpunit/php-timer": "^6.0.0 || ^7.0.0", + "phpunit/phpunit": "^10.5.9 || ^11.0.3", + "sebastian/environment": "^6.0.1 || ^7.0.0", + "symfony/console": "^6.4.3 || ^7.0.3", + "symfony/process": "^6.4.3 || ^7.0.3" }, "require-dev": { "doctrine/coding-standard": "^12.0.0", "ext-pcov": "*", "ext-posix": "*", - "infection/infection": "^0.27.0", - "phpstan/phpstan": "^1.10.32", + "phpstan/phpstan": "^1.10.58", "phpstan/phpstan-deprecation-rules": "^1.1.4", - "phpstan/phpstan-phpunit": "^1.3.14", - "phpstan/phpstan-strict-rules": "^1.5.1", - "squizlabs/php_codesniffer": "^3.7.2", - "symfony/filesystem": "^6.3.1" + "phpstan/phpstan-phpunit": "^1.3.15", + "phpstan/phpstan-strict-rules": "^1.5.2", + "squizlabs/php_codesniffer": "^3.9.0", + "symfony/filesystem": "^6.4.3 || ^7.0.3" }, "bin": [ "bin/paratest", @@ -761,7 +763,7 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/v7.2.6" + "source": "https://github.com/paratestphp/paratest/tree/v7.4.3" }, "funding": [ { @@ -773,20 +775,20 @@ "type": "paypal" } ], - "time": "2023-08-29T07:47:39+00:00" + "time": "2024-02-20T07:24:02+00:00" }, { "name": "doctrine/deprecations", - "version": "v1.1.1", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", - "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", "shasum": "" }, "require": { @@ -818,9 +820,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" }, - "time": "2023-06-03T09:27:29+00:00" + "time": "2024-01-30T19:34:25+00:00" }, { "name": "evenement/evenement", @@ -871,16 +873,16 @@ }, { "name": "fakerphp/faker", - "version": "v1.23.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01" + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", - "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/bfb4fe148adbf78eff521199619b93a52ae3554b", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b", "shasum": "" }, "require": { @@ -906,11 +908,6 @@ "ext-mbstring": "Required for multibyte Unicode string functionality." }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.21-dev" - } - }, "autoload": { "psr-4": { "Faker\\": "src/Faker/" @@ -933,22 +930,22 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.23.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" }, - "time": "2023-06-12T08:44:38+00:00" + "time": "2024-01-02T13:46:09+00:00" }, { "name": "fidry/cpu-core-counter", - "version": "0.5.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", "shasum": "" }, "require": { @@ -956,13 +953,13 @@ }, "require-dev": { "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", "phpstan/extension-installer": "^1.2.0", "phpstan/phpstan": "^1.9.2", "phpstan/phpstan-deprecation-rules": "^1.0.0", "phpstan/phpstan-phpunit": "^1.2.2", "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.26 || ^8.5.31", - "theofidry/php-cs-fixer-config": "^1.0", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", "webmozarts/strict-phpunit": "^7.5" }, "type": "library", @@ -988,7 +985,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" }, "funding": [ { @@ -996,20 +993,20 @@ "type": "github" } ], - "time": "2022-12-24T12:35:10+00:00" + "time": "2024-02-07T09:43:46+00:00" }, { "name": "filp/whoops", - "version": "2.15.3", + "version": "2.15.4", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "c83e88a30524f9360b11f585f71e6b17313b7187" + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/c83e88a30524f9360b11f585f71e6b17313b7187", - "reference": "c83e88a30524f9360b11f585f71e6b17313b7187", + "url": "https://api.github.com/repos/filp/whoops/zipball/a139776fa3f5985a50b509f2a02ff0f709d2a546", + "reference": "a139776fa3f5985a50b509f2a02ff0f709d2a546", "shasum": "" }, "require": { @@ -1059,7 +1056,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.3" + "source": "https://github.com/filp/whoops/tree/2.15.4" }, "funding": [ { @@ -1067,28 +1064,28 @@ "type": "github" } ], - "time": "2023-07-13T12:00:00+00:00" + "time": "2023-11-03T12:00:00+00:00" }, { "name": "graham-campbell/result-type", - "version": "v1.1.1", + "version": "v1.1.2", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831" + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", - "reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", + "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.1" + "phpoption/phpoption": "^1.9.2" }, "require-dev": { - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "autoload": { @@ -1117,7 +1114,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" }, "funding": [ { @@ -1129,7 +1126,7 @@ "type": "tidelift" } ], - "time": "2023-02-25T20:23:15+00:00" + "time": "2023-11-12T22:16:48+00:00" }, { "name": "jean85/pretty-package-versions", @@ -1251,25 +1248,27 @@ }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -1277,7 +1276,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1301,43 +1300,44 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2024-01-07T17:17:35+00:00" }, { "name": "nunomaduro/collision", - "version": "v7.8.1", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "61553ad3260845d7e3e49121b7074619233d361b" + "reference": "0d655ffbf3edf9b366e0eea5ab9c7871e0ab3357" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/61553ad3260845d7e3e49121b7074619233d361b", - "reference": "61553ad3260845d7e3e49121b7074619233d361b", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/0d655ffbf3edf9b366e0eea5ab9c7871e0ab3357", + "reference": "0d655ffbf3edf9b366e0eea5ab9c7871e0ab3357", "shasum": "" }, "require": { - "filp/whoops": "^2.15.3", - "nunomaduro/termwind": "^1.15.1", - "php": "^8.1.0", - "symfony/console": "^6.3.2" + "filp/whoops": "^2.15.4", + "nunomaduro/termwind": "^2.0.0", + "php": "^8.2.0", + "symfony/console": "^7.0.2" + }, + "conflict": { + "laravel/framework": "<11.0.0 || >=12.0.0", + "phpunit/phpunit": "<10.5.1 || >=12.0.0" }, "require-dev": { - "brianium/paratest": "^7.2.4", - "laravel/framework": "^10.17.1", - "laravel/pint": "^1.10.5", - "laravel/sail": "^1.23.1", - "laravel/sanctum": "^3.2.5", - "laravel/tinker": "^2.8.1", - "nunomaduro/larastan": "^2.6.4", - "orchestra/testbench-core": "^8.5.9", - "pestphp/pest": "^2.12.1", - "phpunit/phpunit": "^10.3.1", - "sebastian/environment": "^6.0.1", - "spatie/laravel-ignition": "^2.2.0" + "larastan/larastan": "^2.8.1", + "laravel/framework": "^11.0.0", + "laravel/pint": "^1.13.8", + "laravel/sail": "^1.27.0", + "laravel/sanctum": "^4.0.0", + "laravel/tinker": "^2.9.0", + "orchestra/testbench-core": "^9.0.0", + "pestphp/pest": "^2.31.0 || ^3.0.0", + "sebastian/environment": "^6.0.1 || ^7.0.0" }, "type": "library", "extra": { @@ -1345,6 +1345,9 @@ "providers": [ "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" ] + }, + "branch-alias": { + "dev-8.x": "8.x-dev" } }, "autoload": { @@ -1396,37 +1399,36 @@ "type": "patreon" } ], - "time": "2023-08-07T08:03:21+00:00" + "time": "2024-01-12T13:38:24+00:00" }, { "name": "nunomaduro/termwind", - "version": "v1.15.1", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/termwind.git", - "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc" + "reference": "e534f661e09b712e51971e2cf0f662f83116d5ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/8ab0b32c8caa4a2e09700ea32925441385e4a5dc", - "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/e534f661e09b712e51971e2cf0f662f83116d5ad", + "reference": "e534f661e09b712e51971e2cf0f662f83116d5ad", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^8.0", - "symfony/console": "^5.3.0|^6.0.0" + "php": "^8.2", + "symfony/console": "^7.0.1" }, "require-dev": { - "ergebnis/phpstan-rules": "^1.0.", - "illuminate/console": "^8.0|^9.0", - "illuminate/support": "^8.0|^9.0", - "laravel/pint": "^1.0.0", - "pestphp/pest": "^1.21.0", - "pestphp/pest-plugin-mock": "^1.0", - "phpstan/phpstan": "^1.4.6", - "phpstan/phpstan-strict-rules": "^1.1.0", - "symfony/var-dumper": "^5.2.7|^6.0.0", + "ergebnis/phpstan-rules": "^2.1.0", + "illuminate/console": "^11.0.0", + "laravel/pint": "^1.13.7", + "mockery/mockery": "^1.6.6", + "pestphp/pest": "^2.28.0", + "phpstan/phpstan": "^1.10.48", + "phpstan/phpstan-strict-rules": "^1.5.2", + "symfony/var-dumper": "^7.0.0", "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", @@ -1435,6 +1437,9 @@ "providers": [ "Termwind\\Laravel\\TermwindServiceProvider" ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -1466,7 +1471,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v1.15.1" + "source": "https://github.com/nunomaduro/termwind/tree/v2.0.0" }, "funding": [ { @@ -1482,39 +1487,40 @@ "type": "github" } ], - "time": "2023-02-08T01:06:31+00:00" + "time": "2023-12-08T16:23:40+00:00" }, { "name": "pestphp/pest", - "version": "v2.18.0", + "version": "v2.34.0", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "2b0aa4b9c93138c033a6da27cbbd3bd9bbd2d218" + "reference": "602b696348efdf4da83c9719de3062462cc1d146" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/2b0aa4b9c93138c033a6da27cbbd3bd9bbd2d218", - "reference": "2b0aa4b9c93138c033a6da27cbbd3bd9bbd2d218", + "url": "https://api.github.com/repos/pestphp/pest/zipball/602b696348efdf4da83c9719de3062462cc1d146", + "reference": "602b696348efdf4da83c9719de3062462cc1d146", "shasum": "" }, "require": { - "brianium/paratest": "^7.2.6", - "nunomaduro/collision": "^7.8.1", - "nunomaduro/termwind": "^1.15.1", + "brianium/paratest": "^7.3.1", + "nunomaduro/collision": "^7.10.0|^8.1.0", + "nunomaduro/termwind": "^1.15.1|^2.0.0", "pestphp/pest-plugin": "^2.1.1", - "pestphp/pest-plugin-arch": "^2.3.3", + "pestphp/pest-plugin-arch": "^2.7.0", "php": "^8.1.0", - "phpunit/phpunit": "^10.3.3" + "phpunit/phpunit": "^10.5.10" }, "conflict": { - "phpunit/phpunit": ">10.3.3", + "phpunit/phpunit": ">10.5.10", + "sebastian/exporter": "<5.1.0", "webmozart/assert": "<1.11.0" }, "require-dev": { "pestphp/pest-dev-tools": "^2.16.0", - "pestphp/pest-plugin-type-coverage": "^2.2.0", - "symfony/process": "^6.3.4" + "pestphp/pest-plugin-type-coverage": "^2.8.0", + "symfony/process": "^6.4.0|^7.0.3" }, "bin": [ "bin/pest" @@ -1540,6 +1546,11 @@ "Pest\\Plugins\\Version", "Pest\\Plugins\\Parallel" ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] } }, "autoload": { @@ -1572,7 +1583,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v2.18.0" + "source": "https://github.com/pestphp/pest/tree/v2.34.0" }, "funding": [ { @@ -1584,7 +1595,7 @@ "type": "github" } ], - "time": "2023-09-07T18:00:46+00:00" + "time": "2024-02-17T10:06:53+00:00" }, { "name": "pestphp/pest-plugin", @@ -1658,29 +1669,36 @@ }, { "name": "pestphp/pest-plugin-arch", - "version": "v2.3.3", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin-arch.git", - "reference": "b758990e83f89daba3c45672398579cf8692213f" + "reference": "d23b2d7498475354522c3818c42ef355dca3fcda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin-arch/zipball/b758990e83f89daba3c45672398579cf8692213f", - "reference": "b758990e83f89daba3c45672398579cf8692213f", + "url": "https://api.github.com/repos/pestphp/pest-plugin-arch/zipball/d23b2d7498475354522c3818c42ef355dca3fcda", + "reference": "d23b2d7498475354522c3818c42ef355dca3fcda", "shasum": "" }, "require": { - "nunomaduro/collision": "^7.8.1", - "pestphp/pest-plugin": "^2.0.1", + "nunomaduro/collision": "^7.10.0|^8.1.0", + "pestphp/pest-plugin": "^2.1.1", "php": "^8.1", - "ta-tikoma/phpunit-architecture-test": "^0.7.4" + "ta-tikoma/phpunit-architecture-test": "^0.8.4" }, "require-dev": { - "pestphp/pest": "^2.16.0", + "pestphp/pest": "^2.33.0", "pestphp/pest-dev-tools": "^2.16.0" }, "type": "library", + "extra": { + "pest": { + "plugins": [ + "Pest\\Arch\\Plugin" + ] + } + }, "autoload": { "files": [ "src/Autoload.php" @@ -1706,7 +1724,7 @@ "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin-arch/tree/v2.3.3" + "source": "https://github.com/pestphp/pest-plugin-arch/tree/v2.7.0" }, "funding": [ { @@ -1718,7 +1736,7 @@ "type": "github" } ], - "time": "2023-08-21T16:06:30+00:00" + "time": "2024-01-26T09:46:42+00:00" }, { "name": "pestphp/pest-plugin-faker", @@ -1787,31 +1805,31 @@ }, { "name": "pestphp/pest-plugin-watch", - "version": "v2.0.1", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin-watch.git", - "reference": "6386f683ea95d7e0abce2004cf52ea1cf97546a9" + "reference": "fd1866fac88215b9dbf0242a857864c95c26042e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin-watch/zipball/6386f683ea95d7e0abce2004cf52ea1cf97546a9", - "reference": "6386f683ea95d7e0abce2004cf52ea1cf97546a9", + "url": "https://api.github.com/repos/pestphp/pest-plugin-watch/zipball/fd1866fac88215b9dbf0242a857864c95c26042e", + "reference": "fd1866fac88215b9dbf0242a857864c95c26042e", "shasum": "" }, "require": { - "pestphp/pest-plugin": "^2.0.1", + "pestphp/pest-plugin": "^2.1.1", "php": "^8.1.0", "react/child-process": "^0.6.5", - "react/event-loop": "^1.4.0" + "react/event-loop": "^1.5.0" }, "conflict": { "evenement/evenement": "^1.0", - "pestphp/pest": "<1.0" + "pestphp/pest": "<2.33.0" }, "require-dev": { - "pestphp/pest": "^2.12.1", - "pestphp/pest-dev-tools": "^2.14.0" + "pestphp/pest": "^2.33.0", + "pestphp/pest-dev-tools": "^2.16.0" }, "type": "library", "extra": { @@ -1852,7 +1870,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest-plugin-watch/issues", - "source": "https://github.com/pestphp/pest-plugin-watch/tree/v2.0.1" + "source": "https://github.com/pestphp/pest-plugin-watch/tree/v2.1.0" }, "funding": [ { @@ -1864,7 +1882,7 @@ "type": "github" } ], - "time": "2023-08-04T10:52:49+00:00" + "time": "2024-01-26T09:18:46+00:00" }, { "name": "phar-io/manifest", @@ -2089,16 +2107,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.3", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" + "reference": "bc3dc91a5e9b14aa06d1d9e90647c5c5a2cc5353" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", - "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/bc3dc91a5e9b14aa06d1d9e90647c5c5a2cc5353", + "reference": "bc3dc91a5e9b14aa06d1d9e90647c5c5a2cc5353", "shasum": "" }, "require": { @@ -2141,22 +2159,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.1" }, - "time": "2023-08-12T11:01:26+00:00" + "time": "2024-01-18T19:15:27+00:00" }, { "name": "phpoption/phpoption", - "version": "1.9.1", + "version": "1.9.2", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e" + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e", - "reference": "dd3a383e599f49777d8b628dadbb90cae435b87e", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", + "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", "shasum": "" }, "require": { @@ -2164,7 +2182,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "type": "library", "extra": { @@ -2206,7 +2224,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.1" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" }, "funding": [ { @@ -2218,20 +2236,20 @@ "type": "tidelift" } ], - "time": "2023-02-25T19:38:58+00:00" + "time": "2023-11-12T21:59:55+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.0", + "version": "1.25.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6" + "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/3510b0a6274cc42f7219367cb3abfc123ffa09d6", - "reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bd84b629c8de41aa2ae82c067c955e06f1b00240", + "reference": "bd84b629c8de41aa2ae82c067c955e06f1b00240", "shasum": "" }, "require": { @@ -2263,22 +2281,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.25.0" }, - "time": "2023-09-07T20:46:32+00:00" + "time": "2024-01-04T17:06:16+00:00" }, { "name": "phpstan/phpstan", - "version": "1.10.33", + "version": "1.10.59", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "03b1cf9f814ba0863c4e9affea49a4d1ed9a2ed1" + "reference": "e607609388d3a6d418a50a49f7940e8086798281" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/03b1cf9f814ba0863c4e9affea49a4d1ed9a2ed1", - "reference": "03b1cf9f814ba0863c4e9affea49a4d1ed9a2ed1", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e607609388d3a6d418a50a49f7940e8086798281", + "reference": "e607609388d3a6d418a50a49f7940e8086798281", "shasum": "" }, "require": { @@ -2327,27 +2345,27 @@ "type": "tidelift" } ], - "time": "2023-09-04T12:20:53+00:00" + "time": "2024-02-20T13:59:13+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "10.1.4", + "version": "10.1.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "cd59bb34756a16ca8253ce9b2909039c227fff71" + "reference": "78c3b7625965c2513ee96569a4dbb62601784145" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cd59bb34756a16ca8253ce9b2909039c227fff71", - "reference": "cd59bb34756a16ca8253ce9b2909039c227fff71", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/78c3b7625965c2513ee96569a4dbb62601784145", + "reference": "78c3b7625965c2513ee96569a4dbb62601784145", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1", "phpunit/php-file-iterator": "^4.0", "phpunit/php-text-template": "^3.0", @@ -2397,7 +2415,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.4" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.11" }, "funding": [ { @@ -2405,7 +2423,7 @@ "type": "github" } ], - "time": "2023-08-31T14:04:38+00:00" + "time": "2023-12-21T15:38:30+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2652,16 +2670,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.3.3", + "version": "10.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "241ed4dd0db1c096984e62d414c4e1ac8d5dbff4" + "reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/241ed4dd0db1c096984e62d414c4e1ac8d5dbff4", - "reference": "241ed4dd0db1c096984e62d414c4e1ac8d5dbff4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/50b8e314b6d0dd06521dc31d1abffa73f25f850c", + "reference": "50b8e314b6d0dd06521dc31d1abffa73f25f850c", "shasum": "" }, "require": { @@ -2675,7 +2693,7 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.1", + "phpunit/php-code-coverage": "^10.1.5", "phpunit/php-file-iterator": "^4.0", "phpunit/php-invoker": "^4.0", "phpunit/php-text-template": "^3.0", @@ -2685,7 +2703,7 @@ "sebastian/comparator": "^5.0", "sebastian/diff": "^5.0", "sebastian/environment": "^6.0", - "sebastian/exporter": "^5.0", + "sebastian/exporter": "^5.1", "sebastian/global-state": "^6.0.1", "sebastian/object-enumerator": "^5.0", "sebastian/recursion-context": "^5.0", @@ -2701,7 +2719,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.3-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -2733,7 +2751,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.3.3" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.10" }, "funding": [ { @@ -2749,7 +2767,7 @@ "type": "tidelift" } ], - "time": "2023-09-05T04:34:51+00:00" + "time": "2024-02-04T09:07:51+00:00" }, { "name": "psr/container", @@ -2935,16 +2953,16 @@ }, { "name": "react/event-loop", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/reactphp/event-loop.git", - "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05" + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/event-loop/zipball/6e7e587714fff7a83dcc7025aee42ab3b265ae05", - "reference": "6e7e587714fff7a83dcc7025aee42ab3b265ae05", + "url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", + "reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354", "shasum": "" }, "require": { @@ -2995,7 +3013,7 @@ ], "support": { "issues": "https://github.com/reactphp/event-loop/issues", - "source": "https://github.com/reactphp/event-loop/tree/v1.4.0" + "source": "https://github.com/reactphp/event-loop/tree/v1.5.0" }, "funding": [ { @@ -3003,7 +3021,7 @@ "type": "open_collective" } ], - "time": "2023-05-05T10:11:24+00:00" + "time": "2023-11-13T13:48:05+00:00" }, { "name": "react/stream", @@ -3329,20 +3347,20 @@ }, { "name": "sebastian/complexity", - "version": "3.0.1", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "c70b73893e10757af9c6a48929fa6a333b56a97a" + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/c70b73893e10757af9c6a48929fa6a333b56a97a", - "reference": "c70b73893e10757af9c6a48929fa6a333b56a97a", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { @@ -3351,7 +3369,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.2-dev" } }, "autoload": { @@ -3375,7 +3393,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" }, "funding": [ { @@ -3383,20 +3401,20 @@ "type": "github" } ], - "time": "2023-08-31T09:55:53+00:00" + "time": "2023-12-21T08:37:17+00:00" }, { "name": "sebastian/diff", - "version": "5.0.3", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" + "reference": "fbf413a49e54f6b9b17e12d900ac7f6101591b7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", - "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/fbf413a49e54f6b9b17e12d900ac7f6101591b7f", + "reference": "fbf413a49e54f6b9b17e12d900ac7f6101591b7f", "shasum": "" }, "require": { @@ -3409,7 +3427,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -3442,7 +3460,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.0" }, "funding": [ { @@ -3450,7 +3468,7 @@ "type": "github" } ], - "time": "2023-05-01T07:48:21+00:00" + "time": "2023-12-22T10:55:06+00:00" }, { "name": "sebastian/environment", @@ -3518,16 +3536,16 @@ }, { "name": "sebastian/exporter", - "version": "5.0.1", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "32ff03d078fed1279c4ec9a407d08c5e9febb480" + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/32ff03d078fed1279c4ec9a407d08c5e9febb480", - "reference": "32ff03d078fed1279c4ec9a407d08c5e9febb480", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/64f51654862e0f5e318db7e9dcc2292c63cdbddc", + "reference": "64f51654862e0f5e318db7e9dcc2292c63cdbddc", "shasum": "" }, "require": { @@ -3541,7 +3559,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -3584,7 +3602,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.1" + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.1" }, "funding": [ { @@ -3592,7 +3610,7 @@ "type": "github" } ], - "time": "2023-09-08T04:46:58+00:00" + "time": "2023-09-24T13:22:09+00:00" }, { "name": "sebastian/global-state", @@ -3658,20 +3676,20 @@ }, { "name": "sebastian/lines-of-code", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d" + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/649e40d279e243d985aa8fb6e74dd5bb28dc185d", - "reference": "649e40d279e243d985aa8fb6e74dd5bb28dc185d", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", + "nikic/php-parser": "^4.18 || ^5.0", "php": ">=8.1" }, "require-dev": { @@ -3704,7 +3722,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.1" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" }, "funding": [ { @@ -3712,7 +3730,7 @@ "type": "github" } ], - "time": "2023-08-31T09:25:50+00:00" + "time": "2023-12-21T08:38:20+00:00" }, { "name": "sebastian/object-enumerator", @@ -4000,43 +4018,46 @@ }, { "name": "symfony/console", - "version": "v6.3.4", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6" + "reference": "c5010d50f1ee4b25cfa0201d9915cf1b14071456" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6", - "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6", + "url": "https://api.github.com/repos/symfony/console/zipball/c5010d50f1ee4b25cfa0201d9915cf1b14071456", + "reference": "c5010d50f1ee4b25cfa0201d9915cf1b14071456", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0" + "symfony/string": "^6.4|^7.0" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/lock": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/var-dumper": "^5.4|^6.0" + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -4070,7 +4091,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.3.4" + "source": "https://github.com/symfony/console/tree/v7.0.3" }, "funding": [ { @@ -4086,27 +4107,27 @@ "type": "tidelift" } ], - "time": "2023-08-16T10:10:12+00:00" + "time": "2024-01-23T15:02:46+00:00" }, { "name": "symfony/finder", - "version": "v6.3.3", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e" + "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9915db259f67d21eefee768c1abcf1cc61b1fc9e", - "reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e", + "url": "https://api.github.com/repos/symfony/finder/zipball/6e5688d69f7cfc4ed4a511e96007e06c2d34ce56", + "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.0" + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -4134,7 +4155,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.3.3" + "source": "https://github.com/symfony/finder/tree/v7.0.0" }, "funding": [ { @@ -4150,20 +4171,20 @@ "type": "tidelift" } ], - "time": "2023-07-31T08:31:44+00:00" + "time": "2023-10-31T17:59:56+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", - "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -4177,9 +4198,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4216,7 +4234,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -4232,20 +4250,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "875e90aeea2777b6f135677f618529449334a612" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", - "reference": "875e90aeea2777b6f135677f618529449334a612", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -4256,9 +4274,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4297,7 +4312,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" }, "funding": [ { @@ -4313,20 +4328,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", - "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -4337,9 +4352,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4381,7 +4393,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -4397,20 +4409,20 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "42292d99c55abe617799667f454222c54c60e229" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", - "reference": "42292d99c55abe617799667f454222c54c60e229", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -4424,9 +4436,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4464,7 +4473,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -4480,20 +4489,20 @@ "type": "tidelift" } ], - "time": "2023-07-28T09:04:16+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -4501,9 +4510,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -4547,7 +4553,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -4563,24 +4569,24 @@ "type": "tidelift" } ], - "time": "2023-01-26T09:26:14+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/process", - "version": "v6.3.4", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" + "reference": "937a195147e0c27b2759ade834169ed006d0bc74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54", - "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54", + "url": "https://api.github.com/repos/symfony/process/zipball/937a195147e0c27b2759ade834169ed006d0bc74", + "reference": "937a195147e0c27b2759ade834169ed006d0bc74", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -4608,7 +4614,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.3.4" + "source": "https://github.com/symfony/process/tree/v7.0.3" }, "funding": [ { @@ -4624,25 +4630,25 @@ "type": "tidelift" } ], - "time": "2023-08-07T10:39:22+00:00" + "time": "2024-01-23T15:02:46+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.3.0", + "version": "v3.4.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", - "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0", + "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^2.0" + "psr/container": "^1.1|^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -4690,7 +4696,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.4.1" }, "funding": [ { @@ -4706,24 +4712,24 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2023-12-26T14:02:43+00:00" }, { "name": "symfony/string", - "version": "v6.3.2", + "version": "v7.0.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "53d1a83225002635bca3482fcbf963001313fb68" + "reference": "524aac4a280b90a4420d8d6a040718d0586505ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68", - "reference": "53d1a83225002635bca3482fcbf963001313fb68", + "url": "https://api.github.com/repos/symfony/string/zipball/524aac4a280b90a4420d8d6a040718d0586505ac", + "reference": "524aac4a280b90a4420d8d6a040718d0586505ac", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -4733,11 +4739,11 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0", - "symfony/http-client": "^5.4|^6.0", - "symfony/intl": "^6.2", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0" + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -4776,7 +4782,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.3.2" + "source": "https://github.com/symfony/string/tree/v7.0.3" }, "funding": [ { @@ -4792,20 +4798,20 @@ "type": "tidelift" } ], - "time": "2023-07-05T08:41:27+00:00" + "time": "2024-01-29T15:41:16+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.3.4", + "version": "v6.4.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "2027be14f8ae8eae999ceadebcda5b4909b81d45" + "reference": "0435a08f69125535336177c29d56af3abc1f69da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2027be14f8ae8eae999ceadebcda5b4909b81d45", - "reference": "2027be14f8ae8eae999ceadebcda5b4909b81d45", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0435a08f69125535336177c29d56af3abc1f69da", + "reference": "0435a08f69125535336177c29d56af3abc1f69da", "shasum": "" }, "require": { @@ -4818,10 +4824,11 @@ }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/uid": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/error-handler": "^6.3|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/uid": "^5.4|^6.0|^7.0", "twig/twig": "^2.13|^3.0.4" }, "bin": [ @@ -4860,7 +4867,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.3.4" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.3" }, "funding": [ { @@ -4876,32 +4883,32 @@ "type": "tidelift" } ], - "time": "2023-08-24T14:51:05+00:00" + "time": "2024-01-23T14:53:30+00:00" }, { "name": "ta-tikoma/phpunit-architecture-test", - "version": "0.7.4", + "version": "0.8.4", "source": { "type": "git", "url": "https://github.com/ta-tikoma/phpunit-architecture-test.git", - "reference": "abe1f8a5f4635e7cbe0a8a37d6b8d20c687af0f2" + "reference": "89f0dea1cb0f0d5744d3ec1764a286af5e006636" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ta-tikoma/phpunit-architecture-test/zipball/abe1f8a5f4635e7cbe0a8a37d6b8d20c687af0f2", - "reference": "abe1f8a5f4635e7cbe0a8a37d6b8d20c687af0f2", + "url": "https://api.github.com/repos/ta-tikoma/phpunit-architecture-test/zipball/89f0dea1cb0f0d5744d3ec1764a286af5e006636", + "reference": "89f0dea1cb0f0d5744d3ec1764a286af5e006636", "shasum": "" }, "require": { - "nikic/php-parser": "^4.15.4", + "nikic/php-parser": "^4.18.0 || ^5.0.0", "php": "^8.1.0", "phpdocumentor/reflection-docblock": "^5.3.0", - "phpunit/phpunit": "^10.1.1", - "symfony/finder": "^6.2.7" + "phpunit/phpunit": "^10.5.5 || ^11.0.0", + "symfony/finder": "^6.4.0 || ^7.0.0" }, "require-dev": { - "laravel/pint": "^1.9.0", - "phpstan/phpstan": "^1.10.13" + "laravel/pint": "^1.13.7", + "phpstan/phpstan": "^1.10.52" }, "type": "library", "autoload": { @@ -4933,22 +4940,22 @@ ], "support": { "issues": "https://github.com/ta-tikoma/phpunit-architecture-test/issues", - "source": "https://github.com/ta-tikoma/phpunit-architecture-test/tree/0.7.4" + "source": "https://github.com/ta-tikoma/phpunit-architecture-test/tree/0.8.4" }, - "time": "2023-08-03T06:50:14+00:00" + "time": "2024-01-05T14:10:56+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -4977,7 +4984,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -4985,35 +4992,35 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v5.5.0", + "version": "v5.6.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", - "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.2", - "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.8", - "symfony/polyfill-ctype": "^1.23", - "symfony/polyfill-mbstring": "^1.23.1", - "symfony/polyfill-php80": "^1.23.1" + "graham-campbell/result-type": "^1.1.2", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.2", + "symfony/polyfill-ctype": "^1.24", + "symfony/polyfill-mbstring": "^1.24", + "symfony/polyfill-php80": "^1.24" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" }, "suggest": { "ext-filter": "Required to use the boolean validator." @@ -5025,7 +5032,7 @@ "forward-command": true }, "branch-alias": { - "dev-master": "5.5-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -5057,7 +5064,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" }, "funding": [ { @@ -5069,7 +5076,7 @@ "type": "tidelift" } ], - "time": "2022-10-16T01:01:54+00:00" + "time": "2023-11-12T22:43:29+00:00" }, { "name": "webmozart/assert", diff --git a/src/Client.php b/src/Client.php index 1d7962b..1407075 100644 --- a/src/Client.php +++ b/src/Client.php @@ -3,11 +3,13 @@ namespace Probots\Pinecone; use Probots\Pinecone\Contracts\ClientContract; -use Probots\Pinecone\Requests\Index\Vectors\Fetch; -use Probots\Pinecone\Resources\CollectionResource; -use Probots\Pinecone\Resources\IndexResource; +use Probots\Pinecone\Requests\Data\FetchVectors; +use Probots\Pinecone\Requests\Exceptions\MissingHostException; +use Probots\Pinecone\Resources\ControlResource; +use Probots\Pinecone\Resources\DataResource; use Psr\Http\Message\RequestInterface; use Saloon\Http\Connector; +use Saloon\Http\PendingRequest; use Saloon\Traits\Plugins\AcceptsJson; use Saloon\Traits\Plugins\AlwaysThrowOnErrors; @@ -17,52 +19,51 @@ class Client extends Connector implements ClientContract protected ?string $response = Response::class; - /** - * @param string $apiKey - * @param string $environment - */ + protected string $baseUrl = 'https://api.pinecone.io'; + public function __construct( - public string $apiKey, - public string $environment, - ) + public string $apiKey, + public ?string $indexHost = null, + ) {} + + // (Temporary) Workaround for https://github.com/probots-io/pinecone-php/issues/3 + public function handlePsrRequest(RequestInterface $request, PendingRequest $pendingRequest): RequestInterface { - // (Temporary) Workaround for https://github.com/probots-io/pinecone-php/issues/3 - $this->sender()->addMiddleware(function (callable $handler) { - return function (RequestInterface $request, array $options) use ($handler) { - return $handler(Fetch::queryIdsWorkaround($request), $options); - }; - }); + return FetchVectors::queryIdsWorkaround($request); } - /** - * @return string - */ public function resolveBaseUrl(): string { - return 'https://controller.' . $this->environment . '.pinecone.io'; + return $this->baseUrl; } - /** - * @param string|null $name - * @return IndexResource - */ - public function index(?string $name = null): IndexResource + public function control(): ControlResource { - return new IndexResource($this, $name); + return new ControlResource($this); } /** - * @param string|null $name - * @return CollectionResource + * @throws MissingHostException */ - public function collections(?string $name = null): CollectionResource + public function data(): DataResource { - return new CollectionResource($this, $name); + $this->baseUrl = $this->indexHost; + + if (!$this->indexHost) { + throw new MissingHostException('Index host is missing'); + } + + return new DataResource($this); } - /** - * @return array - */ + public function setIndexHost(string $indexHost): self + { + $this->indexHost = $indexHost; + + return $this; + } + + protected function defaultHeaders(): array { return [ diff --git a/src/Factory.php b/src/Factory.php index 220f11d..971fa3d 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -10,9 +10,9 @@ final class Factory private ?string $apiKey = null; /** - * The environment for the requests. + * The host for the Data requests. */ - private ?string $environment = null; + private ?string $host = null; /** @@ -26,11 +26,11 @@ public function withApiKey(string $apiKey): self } /** - * Sets environment for the requests. + * Sets the index host for Data Operations */ - public function withEnvironment(?string $environment): self + public function withHost(?string $host): self { - $this->environment = $environment; + $this->host = $host; return $this; } @@ -41,7 +41,7 @@ public function withEnvironment(?string $environment): self */ public function make(): Client { - return new Client($this->apiKey, $this->environment); + return new Client($this->apiKey, $this->host); } } \ No newline at end of file diff --git a/src/Pinecone.php b/src/Pinecone.php index b5d5a3f..1169cae 100644 --- a/src/Pinecone.php +++ b/src/Pinecone.php @@ -8,11 +8,11 @@ final class Pinecone /** * Creates a new Open AI Client with the given API token. */ - public static function client(string $apiKey, string $environment = null): Client + public static function client(string $apiKey, string $indexHost = null): Client { return self::factory() ->withApiKey($apiKey) - ->withEnvironment($environment) + ->withHost($indexHost) ->make(); } diff --git a/src/Requests/Collections/Create.php b/src/Requests/Collections/Create.php deleted file mode 100644 index 3547344..0000000 --- a/src/Requests/Collections/Create.php +++ /dev/null @@ -1,73 +0,0 @@ - $this->name, - 'source' => $this->source, - ]; - } - - /** - * @param Response $response - * @return bool|null - */ - public function hasRequestFailed(Response $response): ?bool - { - return $response->status() !== 201; - } -} - diff --git a/src/Requests/Collections/Delete.php b/src/Requests/Collections/Delete.php deleted file mode 100644 index 0e8783b..0000000 --- a/src/Requests/Collections/Delete.php +++ /dev/null @@ -1,53 +0,0 @@ -name; - } - - /** - * @param Response $response - * @return bool|null - */ - public function hasRequestFailed(Response $response): ?bool - { - return $response->status() !== 202; - } -} diff --git a/src/Requests/Collections/Describe.php b/src/Requests/Collections/Describe.php deleted file mode 100644 index c2d0fee..0000000 --- a/src/Requests/Collections/Describe.php +++ /dev/null @@ -1,56 +0,0 @@ -name; - } - - /** - * @param Response $response - * @return bool|null - */ - public function hasRequestFailed(Response $response): ?bool - { - return $response->status() !== 200; - } -} diff --git a/src/Requests/Control/ConfigureIndex.php b/src/Requests/Control/ConfigureIndex.php new file mode 100644 index 0000000..2ab6087 --- /dev/null +++ b/src/Requests/Control/ConfigureIndex.php @@ -0,0 +1,49 @@ +name; + } + + protected function defaultBody(): array + { + return [ + 'spec' => [ + 'pod' => [ + 'replicas' => $this->replicas, + 'pod_type' => $this->pod_type, + ], + ] + ]; + } + + public function hasRequestFailed(Response $response): ?bool + { + return $response->status() >= 202; + } +} \ No newline at end of file diff --git a/src/Requests/Control/CreateCollection.php b/src/Requests/Control/CreateCollection.php new file mode 100644 index 0000000..51cde52 --- /dev/null +++ b/src/Requests/Control/CreateCollection.php @@ -0,0 +1,44 @@ + $this->name, + 'source' => $this->source, + ]; + } + + public function hasRequestFailed(Response $response): ?bool + { + return $response->status() !== 201; + } +} + diff --git a/src/Requests/Control/CreateIndex.php b/src/Requests/Control/CreateIndex.php new file mode 100644 index 0000000..0cb194f --- /dev/null +++ b/src/Requests/Control/CreateIndex.php @@ -0,0 +1,132 @@ +mode = 'serverless'; + + $this->cloud = $cloud; + $this->region = $region; + + return $this; + } + + public function pod( + ?string $environment, + ?int $replicas, + ?string $pod_type, + ?int $pods, + ?int $shards, + ?array $metadataConfig, + ?string $sourceCollection, + ): self + { + $this->mode = 'pod'; + + $this->environment = $environment; + $this->replicas = $replicas; + $this->pod_type = $pod_type; + $this->pods = $pods; + $this->shards = $shards; + $this->metadataConfig = $metadataConfig; + $this->sourceCollection = $sourceCollection; + + return $this; + + } + + + public function resolveEndpoint(): string + { + return '/indexes'; + } + + protected function defaultBody(): array + { + $payload = [ + 'name' => $this->name, + 'dimension' => $this->dimension, + 'metric' => $this->metric ?? 'cosine', + ]; + + $spec = []; + + if ($this->mode === 'serverless') { + $spec = [ + 'serverless' => [ + 'cloud' => $this->cloud ?? 'aws', + 'region' => $this->region ?? 'us-west-2', + ] + ]; + } + + if ($this->mode === 'pod') { + $spec = [ + 'pod' => [ + 'environment' => $this->environment ?? 'us-east1-gcp', + 'replicas' => $this->replicas ?? 1, + 'pod_type' => $this->pod_type ?? 'p1.x1', + 'pods' => $this->pods ?? 1, + 'shards' => $this->shards ?? 1, + ] + ]; + + if ($this->metadataConfig !== null) { + $spec['pod']['metadata_config'] = $this->metadataConfig; + } + + if ($this->sourceCollection !== null) { + $spec['pod']['source_collection'] = $this->sourceCollection; + } + } + + $payload['spec'] = $spec; + + return $payload; + } + + public function hasRequestFailed(Response $response): ?bool + { + return $response->status() !== 201; + } +} + diff --git a/src/Requests/Control/DeleteCollection.php b/src/Requests/Control/DeleteCollection.php new file mode 100644 index 0000000..27ca717 --- /dev/null +++ b/src/Requests/Control/DeleteCollection.php @@ -0,0 +1,30 @@ +name; + } + + public function hasRequestFailed(Response $response): ?bool + { + return $response->status() !== 202; + } +} diff --git a/src/Requests/Control/DeleteIndex.php b/src/Requests/Control/DeleteIndex.php new file mode 100644 index 0000000..25952dd --- /dev/null +++ b/src/Requests/Control/DeleteIndex.php @@ -0,0 +1,31 @@ +name; + } + + public function hasRequestFailed(Response $response): ?bool + { + return $response->status() !== 202; + } + + +} diff --git a/src/Requests/Control/DescribeCollection.php b/src/Requests/Control/DescribeCollection.php new file mode 100644 index 0000000..f5438b2 --- /dev/null +++ b/src/Requests/Control/DescribeCollection.php @@ -0,0 +1,32 @@ +name; + } + + public function hasRequestFailed(Response $response): ?bool + { + return $response->status() !== 200; + } +} diff --git a/src/Requests/Control/DescribeIndex.php b/src/Requests/Control/DescribeIndex.php new file mode 100644 index 0000000..f81a5ba --- /dev/null +++ b/src/Requests/Control/DescribeIndex.php @@ -0,0 +1,30 @@ +name; + } + + public function hasRequestFailed(Response $response): ?bool + { + return $response->status() !== 200; + } +} diff --git a/src/Requests/Collections/All.php b/src/Requests/Control/ListCollections.php similarity index 55% rename from src/Requests/Collections/All.php rename to src/Requests/Control/ListCollections.php index b7f52ad..44d5eb1 100644 --- a/src/Requests/Collections/All.php +++ b/src/Requests/Control/ListCollections.php @@ -1,36 +1,23 @@ status() !== 200; diff --git a/src/Requests/Index/All.php b/src/Requests/Control/ListIndexes.php similarity index 51% rename from src/Requests/Index/All.php rename to src/Requests/Control/ListIndexes.php index 86f95e1..c8d2ec0 100644 --- a/src/Requests/Index/All.php +++ b/src/Requests/Control/ListIndexes.php @@ -1,36 +1,24 @@ status() !== 200; diff --git a/src/Requests/Index/Vectors/Delete.php b/src/Requests/Data/DeleteVectors.php similarity index 54% rename from src/Requests/Index/Vectors/Delete.php rename to src/Requests/Data/DeleteVectors.php index 0aa5c61..d8819ad 100644 --- a/src/Requests/Index/Vectors/Delete.php +++ b/src/Requests/Data/DeleteVectors.php @@ -1,70 +1,34 @@ index['status']['host'] . '/vectors/delete'; + return '/vectors/delete'; } - /** - * @return bool[] - */ protected function defaultBody(): array { $payload = [ @@ -86,10 +50,6 @@ protected function defaultBody(): array return $payload; } - /** - * @param Response $response - * @return bool|null - */ public function hasRequestFailed(Response $response): ?bool { return $response->status() !== 200; diff --git a/src/Requests/Index/Vectors/Fetch.php b/src/Requests/Data/FetchVectors.php similarity index 58% rename from src/Requests/Index/Vectors/Fetch.php rename to src/Requests/Data/FetchVectors.php index 58706c5..87077cb 100644 --- a/src/Requests/Index/Vectors/Fetch.php +++ b/src/Requests/Data/FetchVectors.php @@ -1,57 +1,28 @@ getPath() === '/vectors/fetch') { $queryString = $requestUri->getQuery(); parse_str(urldecode($queryString), $data); + return $request->withUri($requestUri->withQuery(Query::build($data))); } return $request; } - /** - * @return array|mixed[] - */ protected function defaultQuery(): array { // $payload = [ @@ -85,23 +54,14 @@ protected function defaultQuery(): array $payload['namespace'] = $this->namespace; } -// dd(\GuzzleHttp\Psr7\Query::build(["ids" => $this->ids])); - return $payload; } - /** - * @return string - */ public function resolveEndpoint(): string { - return 'https://' . $this->index['status']['host'] . '/vectors/fetch'; + return '/vectors/fetch'; } - /** - * @param Response $response - * @return bool|null - */ public function hasRequestFailed(Response $response): ?bool { return $response->status() !== 200; diff --git a/src/Requests/Data/GetIndexStats.php b/src/Requests/Data/GetIndexStats.php new file mode 100644 index 0000000..8b77e9a --- /dev/null +++ b/src/Requests/Data/GetIndexStats.php @@ -0,0 +1,40 @@ +filter) > 0) { + $payload['filter'] = $this->filter; + } + return $payload; + } + + + public function hasRequestFailed(Response $response): ?bool + { + return $response->status() !== 200; + } +} diff --git a/src/Requests/Data/QueryVectors.php b/src/Requests/Data/QueryVectors.php new file mode 100644 index 0000000..09d099a --- /dev/null +++ b/src/Requests/Data/QueryVectors.php @@ -0,0 +1,67 @@ + $this->topK, + 'includeMetadata' => $this->includeMetadata, + 'includeValues' => $this->includeValues, + ]; + + if (count($this->vector) > 0) { + $payload['vector'] = $this->vector; + } + + if ($this->namespace) { + $payload['namespace'] = $this->namespace; + } + + if (count($this->filter) > 0) { + $payload['filter'] = $this->filter; + } + + if ($this->id) { + $payload['id'] = $this->id; + unset($payload['vector']); + } + + return $payload; + } + + public function hasRequestFailed(Response $response): ?bool + { + return $response->status() !== 200; + } +} diff --git a/src/Requests/Index/Vectors/Update.php b/src/Requests/Data/UpdateVector.php similarity index 60% rename from src/Requests/Index/Vectors/Update.php rename to src/Requests/Data/UpdateVector.php index 25407b5..45b1678 100644 --- a/src/Requests/Index/Vectors/Update.php +++ b/src/Requests/Data/UpdateVector.php @@ -1,58 +1,30 @@ index['status']['host'] . '/vectors/update'; + return '/vectors/update'; } - /** - * @param Response $response - * @return bool|null - */ public function hasRequestFailed(Response $response): ?bool { return $response->status() !== 200; diff --git a/src/Requests/Index/Vectors/Upsert.php b/src/Requests/Data/UpsertVectors.php similarity index 52% rename from src/Requests/Index/Vectors/Upsert.php rename to src/Requests/Data/UpsertVectors.php index 01e9b84..580d823 100644 --- a/src/Requests/Index/Vectors/Upsert.php +++ b/src/Requests/Data/UpsertVectors.php @@ -1,60 +1,32 @@ index['status']['host'] . '/vectors/upsert'; + return '/vectors/upsert'; } - /** - * @return array[] - */ protected function defaultBody(): array { @@ -68,10 +40,6 @@ protected function defaultBody(): array return $payload; } - /** - * @param Response $response - * @return bool|null - */ public function hasRequestFailed(Response $response): ?bool { return $response->status() !== 200; diff --git a/src/Requests/Exceptions/MissingHostException.php b/src/Requests/Exceptions/MissingHostException.php new file mode 100644 index 0000000..248b6eb --- /dev/null +++ b/src/Requests/Exceptions/MissingHostException.php @@ -0,0 +1,9 @@ +name; - } - - /** - * @return array - */ - protected function defaultBody(): array - { - return [ - 'replicas' => $this->replicas, - 'pod_type' => $this->pod_type, - ]; - } - - /** - * @param Response $response - * @return bool|null - */ - public function hasRequestFailed(Response $response): ?bool - { - return $response->status() !== 202; - } -} \ No newline at end of file diff --git a/src/Requests/Index/Create.php b/src/Requests/Index/Create.php deleted file mode 100644 index f9ecf08..0000000 --- a/src/Requests/Index/Create.php +++ /dev/null @@ -1,105 +0,0 @@ - $this->name, - 'dimension' => $this->dimension, - 'metric' => $this->metric, - 'pods' => $this->pods, - 'replicas' => $this->replicas, - 'pod_type' => $this->pod_type, - ]; - - if ($this->metadataConfig !== null) { - $payload['metadata_config'] = $this->metadataConfig; - } - - if ($this->sourceCollection !== null) { - $payload['source_collection'] = $this->sourceCollection; - } - return $payload; - } - - /** - * @param Response $response - * @return bool|null - */ - public function hasRequestFailed(Response $response): ?bool - { - return $response->status() !== 201; - } -} - diff --git a/src/Requests/Index/Delete.php b/src/Requests/Index/Delete.php deleted file mode 100644 index f8a76e3..0000000 --- a/src/Requests/Index/Delete.php +++ /dev/null @@ -1,55 +0,0 @@ -name; - } - - /** - * @param Response $response - * @return bool|null - */ - public function hasRequestFailed(Response $response): ?bool - { - return $response->status() !== 202; - } - - -} diff --git a/src/Requests/Index/Describe.php b/src/Requests/Index/Describe.php deleted file mode 100644 index a1a94e5..0000000 --- a/src/Requests/Index/Describe.php +++ /dev/null @@ -1,68 +0,0 @@ -name; - } - - /** - * @param Response $response - * @return bool|null - */ - public function hasRequestFailed(Response $response): ?bool - { - return $response->status() !== 200; - } -} diff --git a/src/Requests/Index/Vectors/DescribeStats.php b/src/Requests/Index/Vectors/DescribeStats.php deleted file mode 100644 index 5d16681..0000000 --- a/src/Requests/Index/Vectors/DescribeStats.php +++ /dev/null @@ -1,79 +0,0 @@ -index['status']['host'] . '/describe_index_stats'; - } - - /** - * @return array - */ - protected function defaultBody(): array - { - $payload = []; - - if (count($this->filter) > 0) { - $payload['filter'] = $this->filter; - } - return $payload; - } - - /** - * @param Response $response - * @return bool|null - */ - public function hasRequestFailed(Response $response): ?bool - { - return $response->status() !== 200; - } -} diff --git a/src/Requests/Index/Vectors/Query.php b/src/Requests/Index/Vectors/Query.php deleted file mode 100644 index bcccabd..0000000 --- a/src/Requests/Index/Vectors/Query.php +++ /dev/null @@ -1,123 +0,0 @@ -index['status']['host'] . '/query'; - } - - /** - * @return array - */ - protected function defaultBody(): array - { - $payload = [ - 'topK' => $this->topK, - 'includeMetadata' => $this->includeMetadata, - 'includeVector' => $this->includeVector, - ]; - - if (count($this->vector) > 0) { - $payload['vector'] = $this->vector; - } - - if ($this->namespace) { - $payload['namespace'] = $this->namespace; - } - - if (count($this->filter) > 0) { - $payload['filter'] = $this->filter; - } - - if ($this->id) { - $payload['id'] = $this->id; - unset($payload['vector']); - } - - return $payload; - } - - /** - * @param Response $response - * @return bool|null - */ - public function hasRequestFailed(Response $response): ?bool - { - return $response->status() !== 200; - } -} diff --git a/src/Resources/CollectionResource.php b/src/Resources/CollectionResource.php deleted file mode 100644 index dd44279..0000000 --- a/src/Resources/CollectionResource.php +++ /dev/null @@ -1,72 +0,0 @@ -name === null) { - throw new MissingNameException('Collection name is required'); - } - } - - /** - * @param string $name - * @param string $source - * @return Response - */ - public function create(string $name, string $source): Response - { - return $this->connector->send(new Collections\Create($name, $source)); - } - - - /** - * @return Response - * @throws MissingNameException - */ - public function describe(): Response - { - $this->validateName(); - - return $this->connector->send(new Collections\Describe($this->name)); - } - - /** - * @return Response - */ - public function list(): Response - { - return $this->connector->send(new Collections\All()); - } - - /** - * @return Response - * @throws MissingNameException - */ - public function delete(): Response - { - $this->validateName(); - - return $this->connector->send(new Collections\Delete($this->name)); - } -} diff --git a/src/Resources/Control/CollectionResource.php b/src/Resources/Control/CollectionResource.php new file mode 100644 index 0000000..c8c7af0 --- /dev/null +++ b/src/Resources/Control/CollectionResource.php @@ -0,0 +1,43 @@ +connector->send(new Control\CreateCollection( + name: $this->name, + source: $source + )); + } + + public function describe(): Response + { + return $this->connector->send(new Control\DescribeCollection( + name: $this->name + )); + } + + public function list(): Response + { + return $this->connector->send(new Control\ListCollections()); + } + + public function delete(): Response + { + return $this->connector->send(new Control\DeleteCollection( + name: $this->name + )); + } +} diff --git a/src/Resources/Control/IndexResource.php b/src/Resources/Control/IndexResource.php new file mode 100644 index 0000000..f06a004 --- /dev/null +++ b/src/Resources/Control/IndexResource.php @@ -0,0 +1,95 @@ +connector->send(new Control\ListIndexes()); + } + + public function createPod( + int $dimension, + null|string $metric = null, + null|string $environment = null, + null|int $replicas = null, + null|string $pod_type = null, + null|int $pods = null, + null|int $shards = null, + null|array $metadataConfig = null, + null|string $sourceCollection = null + ): Response + { + $request = new Control\CreateIndex( + name: $this->name, + dimension: $dimension, + metric: $metric, + ); + + return $this->connector->send($request->pod( + environment: $environment, + replicas: $replicas, + pod_type: $pod_type, + pods: $pods, + shards: $shards, + metadataConfig: $metadataConfig, + sourceCollection: $sourceCollection + + )); + } + + public function createServerless( + int $dimension, + null|string $metric = null, + null|string $cloud = null, + null|string $region = null + ): Response + { + + $request = new Control\CreateIndex( + name: $this->name, + dimension: $dimension, + metric: $metric, + ); + + return $this->connector->send($request->serverless( + cloud: $cloud, + region: $region + )); + } + + public function describe(): Response + { + return $this->connector->send(new Control\DescribeIndex( + name: $this->name + )); + } + + public function configure(string $pod_type, int $replicas): Response + { + return $this->connector->send(new Control\ConfigureIndex( + name: $this->name, + replicas: $replicas, + pod_type: $pod_type)); + } + + public function delete(): Response + { + return $this->connector->send(new Control\DeleteIndex( + name: $this->name + )); + } +} \ No newline at end of file diff --git a/src/Resources/ControlResource.php b/src/Resources/ControlResource.php new file mode 100644 index 0000000..0316515 --- /dev/null +++ b/src/Resources/ControlResource.php @@ -0,0 +1,25 @@ +connector, $name); + } + + public function collection(?string $name = null): Control\CollectionResource + { + return new Control\CollectionResource($this->connector, $name); + } + + +} diff --git a/src/Resources/Data/VectorResource.php b/src/Resources/Data/VectorResource.php new file mode 100644 index 0000000..9fc63fb --- /dev/null +++ b/src/Resources/Data/VectorResource.php @@ -0,0 +1,86 @@ +connector->send(new Data\GetIndexStats()); + } + + public function update(string $id, + array $values = [], + array $sparseValues = [], + array $setMetadata = [], + ?string $namespace = null): Response + { + return $this->connector->send(new Data\UpdateVector( + id: $id, + values: $values, + sparseValues: $sparseValues, + setMetadata: $setMetadata, + namespace: $namespace + )); + } + + + public function upsert(array $vectors, ?string $namespace = null): Response + { + return $this->connector->send(new Data\UpsertVectors($vectors, $namespace)); + } + + public function query( + array $vector = [], + ?string $namespace = null, + array $filter = [], + int $topK = 3, + bool $includeMetadata = true, + bool $includeValues = false, + ?string $id = null + ): Response + { + return $this->connector->send(new Data\QueryVectors( + vector: $vector, + namespace: $namespace, + filter: $filter, + topK: $topK, + includeMetadata: $includeMetadata, + includeValues: $includeValues, + id: $id + )); + } + + public function delete( + array $ids = [], + ?string $namespace = null, + bool $deleteAll = false, + array $filter = [] + ): Response + { + return $this->connector->send(new Data\DeleteVectors( + ids: $ids, + namespace: $namespace, + deleteAll: $deleteAll, + filter: $filter + )); + } + + public function fetch(array $ids, ?string $namespace = null): Response + { + return $this->connector->send(new Data\FetchVectors( + ids: $ids, + namespace: $namespace + )); + } +} \ No newline at end of file diff --git a/src/Resources/DataResource.php b/src/Resources/DataResource.php new file mode 100644 index 0000000..f2c91c4 --- /dev/null +++ b/src/Resources/DataResource.php @@ -0,0 +1,20 @@ +connector); + } + +} diff --git a/src/Resources/IndexResource.php b/src/Resources/IndexResource.php deleted file mode 100644 index e9a95f6..0000000 --- a/src/Resources/IndexResource.php +++ /dev/null @@ -1,136 +0,0 @@ -validateName(); - $this->maybeDescribeIndex(); - - return new VectorResource($this->connector, $this->index); - } - - /** - * @throws MissingNameException - */ - private function validateName() - { - if ($this->name === null) { - throw new MissingNameException('Index name is required'); - } - } - - /** - * @return void - * @throws MissingNameException - */ - private function maybeDescribeIndex(): void - { - if ($this->index === null) { - $this->index = $this->describe()->json(); - } - } - - /** - * @throws MissingNameException - */ - public function describe(): Response - { - $this->validateName(); - - return $this->connector->send(new Index\Describe($this->name)); - } - - /** - * @param string $name - * @param int $dimension - * @param string|null $metric - * @param int|null $pods - * @param int|null $replicas - * @param string|null $pod_type - * @param array|null $metadataConfig - * @param string|null $sourceCollection - * @return Response - */ - public function create( - string $name, - int $dimension, - null|string $metric = null, - null|int $pods = null, - null|int $replicas = null, - null|string $pod_type = null, - null|array $metadataConfig = null, - null|string $sourceCollection = null - ): Response - { - return $this->connector->send(new Index\Create( - name: $name, - dimension: $dimension, - metric: $metric, - pods: $pods, - replicas: $replicas, - pod_type: $pod_type, - metadataConfig: $metadataConfig, - sourceCollection: $sourceCollection - )); - } - - /** - * @return Response - */ - public function list(): Response - { - return $this->connector->send(new Index\All()); - } - - /** - * @param string $pod_type - * @param int $replicas - * @return Response - * - * @throws MissingNameException - */ - public function configure(string $pod_type, int $replicas): Response - { - $this->validateName(); - - return $this->connector->send(new Index\Configure($this->name, $replicas, $pod_type)); - } - - /** - * @return Response - * @throws MissingNameException - */ - public function delete(): Response - { - $this->validateName(); - - return $this->connector->send(new Index\Delete($this->name)); - } -} \ No newline at end of file diff --git a/src/Resources/Resource.php b/src/Resources/Resource.php index 08b4a29..e4ae9f2 100644 --- a/src/Resources/Resource.php +++ b/src/Resources/Resource.php @@ -2,14 +2,11 @@ namespace Probots\Pinecone\Resources; -use Saloon\Contracts\Connector; +use Probots\Pinecone\Client; class Resource { - /** - * @param Connector $connector - */ - public function __construct(protected Connector $connector) + public function __construct(protected Client $connector) { // } diff --git a/src/Resources/VectorResource.php b/src/Resources/VectorResource.php deleted file mode 100644 index bbd7f4e..0000000 --- a/src/Resources/VectorResource.php +++ /dev/null @@ -1,109 +0,0 @@ -connector->send(new Vectors\DescribeStats($this->index)); - } - - /** - * @param string $id - * @param array $values - * @param array $sparseValues - * @param array $setMetadata - * @param string|null $namespace - * @return Response - */ - public function update(string $id, - array $values = [], - array $sparseValues = [], - array $setMetadata = [], - ?string $namespace = null): Response - { - - - return $this->connector->send(new Vectors\Update($this->index, id: $id, values: $values, sparseValues: $sparseValues, setMetadata: $setMetadata, namespace: $namespace)); - } - - /** - * @param array $vectors - * @param string|null $namespace - * @return Response - */ - public function upsert(array $vectors, ?string $namespace = null): Response - { - return $this->connector->send(new Vectors\Upsert($this->index, $vectors, $namespace)); - } - - /** - * @param array $vector - * @param string|null $namespace - * @param array $filter - * @param int $topK - * @param bool $includeMetadata - * @param bool $includeVector - * @param string|null $id - * @return Response - */ - public function query( - array $vector = [], - ?string $namespace = null, - array $filter = [], - int $topK = 3, - bool $includeMetadata = true, - bool $includeVector = false, - ?string $id = null - ): Response - { - return $this->connector->send(new Vectors\Query($this->index, vector: $vector, namespace: $namespace, filter: $filter, topK: $topK, includeMetadata: $includeMetadata, includeVector: $includeVector, id: $id)); - } - - /** - * @param array $ids - * @param string|null $namespace - * @param bool $deleteAll - * @param array $filter - * @return Response - */ - public function delete( - array $ids = [], - ?string $namespace = null, - bool $deleteAll = false, - array $filter = [] - ): Response - { - return $this->connector->send(new Vectors\Delete($this->index, ids: $ids, namespace: $namespace, deleteAll: $deleteAll, filter: $filter)); - } - - /** - * @param array $ids - * @param string|null $namespace - * @return Response - */ - public function fetch(array $ids, ?string $namespace = null): Response - { - return $this->connector->send(new Vectors\Fetch($this->index, ids: $ids, namespace: $namespace)); - } -} \ No newline at end of file diff --git a/tests/Feature/Collections/CreateTest.php b/tests/Feature/Collections/CreateTest.php deleted file mode 100644 index 9ed78d0..0000000 --- a/tests/Feature/Collections/CreateTest.php +++ /dev/null @@ -1,13 +0,0 @@ -collections()->create( - name: getCollectionName(), - source: getIndexName() - ); - - expect($response->status())->toBe(201); -}); \ No newline at end of file diff --git a/tests/Feature/Collections/DeleteTest.php b/tests/Feature/Collections/DeleteTest.php deleted file mode 100644 index 31397a2..0000000 --- a/tests/Feature/Collections/DeleteTest.php +++ /dev/null @@ -1,20 +0,0 @@ -collections(getCollectionName())->delete(); - - expect($response->status())->toBe(202); - -}); - -it('throws missing name exception', function () { - - $client = getClient(true); - $client->collections()->delete(); - -})->throws(MissingNameException::class); diff --git a/tests/Feature/Collections/DescribeTest.php b/tests/Feature/Collections/DescribeTest.php deleted file mode 100644 index a53dedf..0000000 --- a/tests/Feature/Collections/DescribeTest.php +++ /dev/null @@ -1,21 +0,0 @@ -collections(getCollectionName())->describe(); - - expect($response->status())->toBe(200) - ->and($response->json('name'))->toBe(getCollectionName()); - -}); - -it('throws missing name exception', function () { - - $client = getClient(true); - $client->collections()->describe(); - -})->throws(MissingNameException::class); diff --git a/tests/Feature/Collections/ListTest.php b/tests/Feature/Collections/ListTest.php deleted file mode 100644 index 68b1729..0000000 --- a/tests/Feature/Collections/ListTest.php +++ /dev/null @@ -1,12 +0,0 @@ -collections()->list(); - - expect($response->status())->toBe(200) - ->and($response->json('0'))->toBe(getCollectionName()); - -}); \ No newline at end of file diff --git a/tests/Feature/Control/ConfigureIndexTest.php b/tests/Feature/Control/ConfigureIndexTest.php new file mode 100644 index 0000000..0259c47 --- /dev/null +++ b/tests/Feature/Control/ConfigureIndexTest.php @@ -0,0 +1,15 @@ +control()->index($index)->configure( + pod_type: 'p1.x1', + replicas: 1 + ); + + expect($response->status())->toBe(200); + +}); \ No newline at end of file diff --git a/tests/Feature/Control/CreateCollectionTest.php b/tests/Feature/Control/CreateCollectionTest.php new file mode 100644 index 0000000..3046a3b --- /dev/null +++ b/tests/Feature/Control/CreateCollectionTest.php @@ -0,0 +1,14 @@ +control()->collection($collection)->create( + source: $index + ); + + expect($response->status())->toBe(201); +}); \ No newline at end of file diff --git a/tests/Feature/Control/CreateIndexTest.php b/tests/Feature/Control/CreateIndexTest.php new file mode 100644 index 0000000..c71c936 --- /dev/null +++ b/tests/Feature/Control/CreateIndexTest.php @@ -0,0 +1,27 @@ +control()->index($index)->createPod( + dimension: 128 + ); + + expect($response->status())->toBe(201); + +}); + +it('can create an index (serverless)', function () { + + $client = getClient(true, '.serverless'); + $index = getIndexName('-serverless'); + + $response = $client->control()->index($index)->createServerless( + dimension: 128 + ); + + expect($response->status())->toBe(201); + +}); \ No newline at end of file diff --git a/tests/Feature/Control/DeleteCollectionTest.php b/tests/Feature/Control/DeleteCollectionTest.php new file mode 100644 index 0000000..dcbb97c --- /dev/null +++ b/tests/Feature/Control/DeleteCollectionTest.php @@ -0,0 +1,12 @@ +control()->collection($collection)->delete(); + + expect($response->status())->toBe(202); + +}); \ No newline at end of file diff --git a/tests/Feature/Control/DeleteIndexTest.php b/tests/Feature/Control/DeleteIndexTest.php new file mode 100644 index 0000000..aa989ea --- /dev/null +++ b/tests/Feature/Control/DeleteIndexTest.php @@ -0,0 +1,23 @@ +control()->index($index)->delete(); + + expect($response->status())->toBe(202); + +}); + +it('can delete an index (serverless)', function () { + + $client = getClient(true, '.serverless'); + $index = getIndexName('-serverless'); + + $response = $client->control()->index($index)->delete(); + + expect($response->status())->toBe(202); + +}); \ No newline at end of file diff --git a/tests/Feature/Control/DescribeCollectionTest.php b/tests/Feature/Control/DescribeCollectionTest.php new file mode 100644 index 0000000..ac13f77 --- /dev/null +++ b/tests/Feature/Control/DescribeCollectionTest.php @@ -0,0 +1,12 @@ +control()->collection($collection)->describe(); + + expect($response->status())->toBe(200) + ->and($response->json('name'))->toBe($collection); + +}); diff --git a/tests/Feature/Control/DescribeIndexTest.php b/tests/Feature/Control/DescribeIndexTest.php new file mode 100644 index 0000000..de2e05f --- /dev/null +++ b/tests/Feature/Control/DescribeIndexTest.php @@ -0,0 +1,13 @@ +control()->index($index)->describe(); + + expect($response->status())->toBe(200) + ->and($response->json('name'))->toBe($index); + +}); \ No newline at end of file diff --git a/tests/Feature/Control/ListCollectionsTest.php b/tests/Feature/Control/ListCollectionsTest.php new file mode 100644 index 0000000..87c1714 --- /dev/null +++ b/tests/Feature/Control/ListCollectionsTest.php @@ -0,0 +1,13 @@ +control()->collection()->list(); + + expect($response->status())->toBe(200) + ->and($response->json('collections.0.name'))->toBe($collection); + +}); \ No newline at end of file diff --git a/tests/Feature/Control/ListIndexesTest.php b/tests/Feature/Control/ListIndexesTest.php new file mode 100644 index 0000000..188b014 --- /dev/null +++ b/tests/Feature/Control/ListIndexesTest.php @@ -0,0 +1,11 @@ +control()->index()->list(); + + expect($response->status())->toBe(200) + ->and($response->json('indexes.0.name'))->toBe($index); +}); \ No newline at end of file diff --git a/tests/Feature/Data/DeleteVectorsTest.php b/tests/Feature/Data/DeleteVectorsTest.php new file mode 100644 index 0000000..baffca1 --- /dev/null +++ b/tests/Feature/Data/DeleteVectorsTest.php @@ -0,0 +1,17 @@ +data()->vectors()->delete( + deleteAll: true, + ); + + expect($response->status())->toBe(200); + +}); \ No newline at end of file diff --git a/tests/Feature/Data/FetchVectorsTest.php b/tests/Feature/Data/FetchVectorsTest.php new file mode 100644 index 0000000..6af8db0 --- /dev/null +++ b/tests/Feature/Data/FetchVectorsTest.php @@ -0,0 +1,38 @@ +data()->vectors()->fetch([ + 'vector_1' + ]); + + expect($response->status())->toBe(200) + ->and($response->json('vectors.vector_1.id'))->toBe('vector_1'); + + +}); + +it('can fetch multiple vectors', function () { + + $client = getClient(true, '-multiple-vectors'); + $index = getIndexName('-pod'); + + // This is not good. Since the test relies on Pinecone having the needed index. + setIndexHost($client, $index); + + $response = $client->data()->vectors()->fetch([ + 'vector_1', 'vector_2' + ]); + + expect($response->status())->toBe(200) + ->and($response->json('vectors.vector_1.id'))->toBe('vector_1') + ->and($response->json('vectors.vector_2.id'))->toBe('vector_2'); + + +}); \ No newline at end of file diff --git a/tests/Feature/Data/GetIndexStatsTest.php b/tests/Feature/Data/GetIndexStatsTest.php new file mode 100644 index 0000000..4f10e2a --- /dev/null +++ b/tests/Feature/Data/GetIndexStatsTest.php @@ -0,0 +1,16 @@ +data()->vectors()->stats(); + + expect($response->status())->toBe(200) + ->and($response->json('dimension'))->toBe(128); + +}); \ No newline at end of file diff --git a/tests/Feature/Index/Vectors/QueryTest.php b/tests/Feature/Data/QueryVectorsTest.php similarity index 61% rename from tests/Feature/Index/Vectors/QueryTest.php rename to tests/Feature/Data/QueryVectorsTest.php index e624133..51d19e9 100644 --- a/tests/Feature/Index/Vectors/QueryTest.php +++ b/tests/Feature/Data/QueryVectorsTest.php @@ -3,9 +3,12 @@ it('can query vectors', function () { $client = getClient(true); - $index = $client->index(getIndexName()); + $index = getIndexName('-pod'); - $response = $index->vectors()->query( + // This is not good. Since the test relies on Pinecone having the needed index. + setIndexHost($client, $index); + + $response = $client->data()->vectors()->query( vector: array_fill(0, 128, 0.12), topK: 1, ); diff --git a/tests/Feature/Index/Vectors/UpdateTest.php b/tests/Feature/Data/UpdateVectorsTest.php similarity index 56% rename from tests/Feature/Index/Vectors/UpdateTest.php rename to tests/Feature/Data/UpdateVectorsTest.php index 31aaee9..7453757 100644 --- a/tests/Feature/Index/Vectors/UpdateTest.php +++ b/tests/Feature/Data/UpdateVectorsTest.php @@ -3,9 +3,12 @@ it('can update vectors', function () { $client = getClient(true); - $index = $client->index(getIndexName()); + $index = getIndexName('-pod'); - $response = $index->vectors()->update( + // This is not good. Since the test relies on Pinecone having the needed index. + setIndexHost($client, $index); + + $response = $client->data()->vectors()->update( id: 'vector_1', values: array_fill(0, 128, 0.14), setMetadata: [ diff --git a/tests/Feature/Data/UpsertVectorsTest.php b/tests/Feature/Data/UpsertVectorsTest.php new file mode 100644 index 0000000..fde1e14 --- /dev/null +++ b/tests/Feature/Data/UpsertVectorsTest.php @@ -0,0 +1,33 @@ +data()->vectors()->upsert( + vectors: [ + [ + 'id' => 'vector_1', + 'values' => array_fill(0, 128, 0.12), + 'metadata' => [ + 'meta1' => 'value1', + ] + ], + [ + 'id' => 'vector_2', + 'values' => array_fill(0, 128, 0.12), + 'metadata' => [ + 'meta1' => 'value2', + ] + ] + ] + ); + + expect($response->status())->toBe(200) + ->and($response->json('upsertedCount'))->toBe(2); + +}); \ No newline at end of file diff --git a/tests/Feature/Index/ConfigureTest.php b/tests/Feature/Index/ConfigureTest.php deleted file mode 100644 index 9fd971e..0000000 --- a/tests/Feature/Index/ConfigureTest.php +++ /dev/null @@ -1,26 +0,0 @@ -index(getIndexName())->configure( - pod_type: 'p1.x1', - replicas: 1 - ); - - expect($response->status())->toBe(202); - -}); - -it('throws missing name exception', function () { - - $client = getClient(true); - $client->index()->configure( - pod_type: 'p1.x1', - replicas: 1 - ); - -})->throws(MissingNameException::class); diff --git a/tests/Feature/Index/CreateTest.php b/tests/Feature/Index/CreateTest.php deleted file mode 100644 index b23e328..0000000 --- a/tests/Feature/Index/CreateTest.php +++ /dev/null @@ -1,14 +0,0 @@ -index()->create( - name: getIndexName(), - dimension: 128 - ); - - expect($response->status())->toBe(201); - -}); \ No newline at end of file diff --git a/tests/Feature/Index/DeleteTest.php b/tests/Feature/Index/DeleteTest.php deleted file mode 100644 index ec3e1c7..0000000 --- a/tests/Feature/Index/DeleteTest.php +++ /dev/null @@ -1,20 +0,0 @@ -index(getIndexName())->delete(); - - expect($response->status())->toBe(202); - -}); - -it('throws missing name exception', function () { - - $client = getClient(true); - $client->index()->delete(); - -})->throws(MissingNameException::class); diff --git a/tests/Feature/Index/DescribeTest.php b/tests/Feature/Index/DescribeTest.php deleted file mode 100644 index b3758e9..0000000 --- a/tests/Feature/Index/DescribeTest.php +++ /dev/null @@ -1,21 +0,0 @@ -index(getIndexName())->describe(); - - expect($response->status())->toBe(200) - ->and($response->json('database.name'))->toBe(getIndexName()); - -}); - -it('throws missing name exception', function () { - - $client = getClient(true); - $client->index()->describe(); - -})->throws(MissingNameException::class); diff --git a/tests/Feature/Index/ListTest.php b/tests/Feature/Index/ListTest.php deleted file mode 100644 index 0ab2a91..0000000 --- a/tests/Feature/Index/ListTest.php +++ /dev/null @@ -1,11 +0,0 @@ -index()->list(); - - expect($response->status())->toBe(200) - ->and($response->json('0'))->toBe(getIndexName()); -}); \ No newline at end of file diff --git a/tests/Feature/Index/Vectors/DeleteTest.php b/tests/Feature/Index/Vectors/DeleteTest.php deleted file mode 100644 index b845309..0000000 --- a/tests/Feature/Index/Vectors/DeleteTest.php +++ /dev/null @@ -1,14 +0,0 @@ -index(getIndexName()); - - $response = $index->vectors()->delete( - deleteAll: true, - ); - - expect($response->status())->toBe(200); - -}); \ No newline at end of file diff --git a/tests/Feature/Index/Vectors/DescribeStatsTest.php b/tests/Feature/Index/Vectors/DescribeStatsTest.php deleted file mode 100644 index a294adb..0000000 --- a/tests/Feature/Index/Vectors/DescribeStatsTest.php +++ /dev/null @@ -1,13 +0,0 @@ -index(getIndexName()); - - $response = $index->vectors()->stats(); - - expect($response->status())->toBe(200) - ->and($response->json('dimension'))->toBe(128); - -}); \ No newline at end of file diff --git a/tests/Feature/Index/Vectors/FetchTest.php b/tests/Feature/Index/Vectors/FetchTest.php deleted file mode 100644 index 6ce7e32..0000000 --- a/tests/Feature/Index/Vectors/FetchTest.php +++ /dev/null @@ -1,32 +0,0 @@ -index(getIndexName()); - - $response = $index->vectors()->fetch([ - 'vector_1' - ]); - - expect($response->status())->toBe(200) - ->and($response->json('vectors.vector_1.id'))->toBe('vector_1'); - - -}); - -it('can fetch multiple vectors', function () { - - $client = getClient(true, 'multiple-vectors'); - $index = $client->index(getIndexName()); - - $response = $index->vectors()->fetch([ - 'vector_1', 'vector_2' - ]); - - expect($response->status())->toBe(200) - ->and($response->json('vectors.vector_1.id'))->toBe('vector_1') - ->and($response->json('vectors.vector_2.id'))->toBe('vector_2'); - - -}); \ No newline at end of file diff --git a/tests/Feature/Index/Vectors/UpsertTest.php b/tests/Feature/Index/Vectors/UpsertTest.php deleted file mode 100644 index bd681cc..0000000 --- a/tests/Feature/Index/Vectors/UpsertTest.php +++ /dev/null @@ -1,19 +0,0 @@ -index(getIndexName()); - - $response = $index->vectors()->upsert(vectors: [ - 'id' => 'vector_1', - 'values' => array_fill(0, 128, 0.12), - 'metadata' => [ - 'meta1' => 'value1', - ] - ]); - - expect($response->status())->toBe(200) - ->and($response->json('upsertedCount'))->toBe(1); - -}); \ No newline at end of file diff --git a/tests/Fixtures/Saloon/collections.all.json b/tests/Fixtures/Saloon/collections.all.json deleted file mode 100644 index f7c15d8..0000000 --- a/tests/Fixtures/Saloon/collections.all.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json; charset=UTF-8","date":"Fri, 14 Apr 2023 19:43:19 GMT","x-envoy-upstream-service-time":"19","content-length":"25","server":"envoy"},"data":"[\"pinecone-collect-php\"]\n"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/collections.create.json b/tests/Fixtures/Saloon/collections.create.json deleted file mode 100644 index 8eaeebc..0000000 --- a/tests/Fixtures/Saloon/collections.create.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":201,"headers":{"date":"Fri, 14 Apr 2023 19:37:08 GMT","x-envoy-upstream-service-time":"69","content-length":"0","server":"envoy"},"data":""} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/collections.delete.json b/tests/Fixtures/Saloon/collections.delete.json deleted file mode 100644 index 45b413c..0000000 --- a/tests/Fixtures/Saloon/collections.delete.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":202,"headers":{"date":"Fri, 14 Apr 2023 19:44:42 GMT","x-envoy-upstream-service-time":"42","content-length":"0","server":"envoy"},"data":""} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/collections.describe.json b/tests/Fixtures/Saloon/collections.describe.json deleted file mode 100644 index b60fdd6..0000000 --- a/tests/Fixtures/Saloon/collections.describe.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json; charset=UTF-8","date":"Fri, 14 Apr 2023 19:42:12 GMT","x-envoy-upstream-service-time":"17","content-length":"79","server":"envoy"},"data":"{\"name\":\"pinecone-collect-php\",\"status\":\"Ready\",\"size\":3152292,\"dimension\":10}\n"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.configureindex.json b/tests/Fixtures/Saloon/control.configureindex.json new file mode 100644 index 0000000..aceb941 --- /dev/null +++ b/tests/Fixtures/Saloon/control.configureindex.json @@ -0,0 +1,16 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "33e8e6bfbed5c8d1fd933402d1451ed0", + "Date": "Wed, 21 Feb 2024 12:42:10 GMT", + "Server": "Google Frontend", + "Content-Length": "272", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "{\"name\":\"pinecone-test-php-pod\",\"metric\":\"cosine\",\"dimension\":128,\"status\":{\"ready\":true,\"state\":\"Ready\"},\"host\":\"pinecone-test-php-pod-1eyib7n.svc.us-east1-gcp.pinecone.io\",\"spec\":{\"pod\":{\"replicas\":1,\"shards\":1,\"pods\":1,\"pod_type\":\"p1.x1\",\"environment\":\"us-east1-gcp\"}}}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.createcollection.json b/tests/Fixtures/Saloon/control.createcollection.json new file mode 100644 index 0000000..f1c707f --- /dev/null +++ b/tests/Fixtures/Saloon/control.createcollection.json @@ -0,0 +1,16 @@ +{ + "statusCode": 201, + "headers": { + "content-type": "application\/json", + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "7f4e4520a2ae4769ab1fbfe6eabf146c", + "Date": "Wed, 21 Feb 2024 12:58:14 GMT", + "Server": "Google Frontend", + "Content-Length": "100", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "{\"name\":\"pinecone-collect-php\",\"status\":\"Initializing\",\"dimension\":128,\"environment\":\"us-east1-gcp\"}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.createindex.pod.json b/tests/Fixtures/Saloon/control.createindex.pod.json new file mode 100644 index 0000000..1244013 --- /dev/null +++ b/tests/Fixtures/Saloon/control.createindex.pod.json @@ -0,0 +1,16 @@ +{ + "statusCode": 201, + "headers": { + "content-type": "application\/json", + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "768db942908eaade97b7eb711db2f47e", + "Date": "Wed, 21 Feb 2024 12:41:09 GMT", + "Server": "Google Frontend", + "Content-Length": "280", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "{\"name\":\"pinecone-test-php-pod\",\"metric\":\"cosine\",\"dimension\":128,\"status\":{\"ready\":false,\"state\":\"Initializing\"},\"host\":\"pinecone-test-php-pod-1eyib7n.svc.us-east1-gcp.pinecone.io\",\"spec\":{\"pod\":{\"replicas\":1,\"shards\":1,\"pods\":1,\"pod_type\":\"p1.x1\",\"environment\":\"us-east1-gcp\"}}}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.createindex.serverless.json b/tests/Fixtures/Saloon/control.createindex.serverless.json new file mode 100644 index 0000000..fbeea08 --- /dev/null +++ b/tests/Fixtures/Saloon/control.createindex.serverless.json @@ -0,0 +1,16 @@ +{ + "statusCode": 201, + "headers": { + "content-type": "application\/json", + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "3a12fd99438e751d384b3ba3ece5e8d7", + "Date": "Wed, 21 Feb 2024 12:36:34 GMT", + "Server": "Google Frontend", + "Content-Length": "257", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "{\"name\":\"pinecone-test-php-serverless\",\"metric\":\"cosine\",\"dimension\":128,\"status\":{\"ready\":false,\"state\":\"Initializing\"},\"host\":\"pinecone-test-php-serverless-1eyib7n.svc.apw5-4e34-81fa.pinecone.io\",\"spec\":{\"serverless\":{\"region\":\"us-west-2\",\"cloud\":\"aws\"}}}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.deletecollection.json b/tests/Fixtures/Saloon/control.deletecollection.json new file mode 100644 index 0000000..9c1dddd --- /dev/null +++ b/tests/Fixtures/Saloon/control.deletecollection.json @@ -0,0 +1,16 @@ +{ + "statusCode": 202, + "headers": { + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "afd45735b8a9b7770a481ae9fc0b359b", + "Date": "Wed, 21 Feb 2024 13:01:07 GMT", + "Content-Type": "text\/html", + "Server": "Google Frontend", + "Content-Length": "0", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.deleteindex.pod.json b/tests/Fixtures/Saloon/control.deleteindex.pod.json new file mode 100644 index 0000000..cedb1ca --- /dev/null +++ b/tests/Fixtures/Saloon/control.deleteindex.pod.json @@ -0,0 +1,16 @@ +{ + "statusCode": 202, + "headers": { + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "3bc4c27ae4963a5f23c5707e59780037", + "Date": "Wed, 21 Feb 2024 12:38:13 GMT", + "Content-Type": "text\/html", + "Server": "Google Frontend", + "Content-Length": "0", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.deleteindex.serverless.json b/tests/Fixtures/Saloon/control.deleteindex.serverless.json new file mode 100644 index 0000000..2926d5a --- /dev/null +++ b/tests/Fixtures/Saloon/control.deleteindex.serverless.json @@ -0,0 +1,16 @@ +{ + "statusCode": 202, + "headers": { + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "ec9168a56b44d9697d318974f1c9cd55", + "Date": "Wed, 21 Feb 2024 12:36:36 GMT", + "Content-Type": "text\/html", + "Server": "Google Frontend", + "Content-Length": "0", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.describecollection.json b/tests/Fixtures/Saloon/control.describecollection.json new file mode 100644 index 0000000..a97d165 --- /dev/null +++ b/tests/Fixtures/Saloon/control.describecollection.json @@ -0,0 +1,16 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "a0b654de73c70263a886e66862c3753e", + "Date": "Wed, 21 Feb 2024 12:59:08 GMT", + "Server": "Google Frontend", + "Content-Length": "84", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "{\"name\":\"pinecone-collect-php\",\"status\":\"Initializing\",\"environment\":\"us-east1-gcp\"}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.describeindex-multiple-vectors.json b/tests/Fixtures/Saloon/control.describeindex-multiple-vectors.json new file mode 100644 index 0000000..380fe6a --- /dev/null +++ b/tests/Fixtures/Saloon/control.describeindex-multiple-vectors.json @@ -0,0 +1,16 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "af370d1c13d48aafab7ce610fc9a708c", + "Date": "Wed, 21 Feb 2024 14:06:37 GMT", + "Server": "Google Frontend", + "Content-Length": "272", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "{\"name\":\"pinecone-test-php-pod\",\"metric\":\"cosine\",\"dimension\":128,\"status\":{\"ready\":true,\"state\":\"Ready\"},\"host\":\"pinecone-test-php-pod-1eyib7n.svc.us-east1-gcp.pinecone.io\",\"spec\":{\"pod\":{\"replicas\":1,\"shards\":1,\"pods\":1,\"pod_type\":\"p1.x1\",\"environment\":\"us-east1-gcp\"}}}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.describeindex-one-vector.json b/tests/Fixtures/Saloon/control.describeindex-one-vector.json new file mode 100644 index 0000000..91979ae --- /dev/null +++ b/tests/Fixtures/Saloon/control.describeindex-one-vector.json @@ -0,0 +1,16 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "b8dad3bb6f9cf147ed4d19f1ff063959", + "Date": "Wed, 21 Feb 2024 13:31:02 GMT", + "Server": "Google Frontend", + "Content-Length": "272", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "{\"name\":\"pinecone-test-php-pod\",\"metric\":\"cosine\",\"dimension\":128,\"status\":{\"ready\":true,\"state\":\"Ready\"},\"host\":\"pinecone-test-php-pod-1eyib7n.svc.us-east1-gcp.pinecone.io\",\"spec\":{\"pod\":{\"replicas\":1,\"shards\":1,\"pods\":1,\"pod_type\":\"p1.x1\",\"environment\":\"us-east1-gcp\"}}}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.describeindex.json b/tests/Fixtures/Saloon/control.describeindex.json new file mode 100644 index 0000000..624bc95 --- /dev/null +++ b/tests/Fixtures/Saloon/control.describeindex.json @@ -0,0 +1,16 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "f7101fcdfd4c206ed51c280d80738ad5", + "Date": "Wed, 21 Feb 2024 12:48:44 GMT", + "Server": "Google Frontend", + "Content-Length": "272", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "{\"name\":\"pinecone-test-php-pod\",\"metric\":\"cosine\",\"dimension\":128,\"status\":{\"ready\":true,\"state\":\"Ready\"},\"host\":\"pinecone-test-php-pod-1eyib7n.svc.us-east1-gcp.pinecone.io\",\"spec\":{\"pod\":{\"replicas\":1,\"shards\":1,\"pods\":1,\"pod_type\":\"p1.x1\",\"environment\":\"us-east1-gcp\"}}}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.listcollections.json b/tests/Fixtures/Saloon/control.listcollections.json new file mode 100644 index 0000000..d2a9228 --- /dev/null +++ b/tests/Fixtures/Saloon/control.listcollections.json @@ -0,0 +1,16 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "a7ab6825d3b7fc59e64ce530a21a9099", + "Date": "Wed, 21 Feb 2024 12:59:47 GMT", + "Server": "Google Frontend", + "Content-Length": "126", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "{\"collections\":[{\"name\":\"pinecone-collect-php\",\"size\":3100581,\"status\":\"Ready\",\"dimension\":128,\"environment\":\"us-east1-gcp\"}]}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/control.listindexes.json b/tests/Fixtures/Saloon/control.listindexes.json new file mode 100644 index 0000000..66062d2 --- /dev/null +++ b/tests/Fixtures/Saloon/control.listindexes.json @@ -0,0 +1,16 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "access-control-allow-origin": "*", + "vary": "origin,access-control-request-method,access-control-request-headers", + "access-control-expose-headers": "*", + "X-Cloud-Trace-Context": "6dfd73a9df04763ec8559902b552283e", + "Date": "Wed, 21 Feb 2024 12:46:37 GMT", + "Server": "Google Frontend", + "Content-Length": "286", + "Via": "1.1 google", + "Alt-Svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + }, + "data": "{\"indexes\":[{\"name\":\"pinecone-test-php-pod\",\"metric\":\"cosine\",\"dimension\":128,\"status\":{\"ready\":true,\"state\":\"Ready\"},\"host\":\"pinecone-test-php-pod-1eyib7n.svc.us-east1-gcp.pinecone.io\",\"spec\":{\"pod\":{\"replicas\":1,\"shards\":1,\"pods\":1,\"pod_type\":\"p1.x1\",\"environment\":\"us-east1-gcp\"}}}]}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/data.deletevectors.json b/tests/Fixtures/Saloon/data.deletevectors.json new file mode 100644 index 0000000..24f3123 --- /dev/null +++ b/tests/Fixtures/Saloon/data.deletevectors.json @@ -0,0 +1,12 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "date": "Wed, 21 Feb 2024 14:08:21 GMT", + "x-envoy-upstream-service-time": "9", + "grpc-status": "0", + "content-length": "2", + "server": "envoy" + }, + "data": "{}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/data.fetchvectors-multiple-vectors.json b/tests/Fixtures/Saloon/data.fetchvectors-multiple-vectors.json new file mode 100644 index 0000000..1dfb018 --- /dev/null +++ b/tests/Fixtures/Saloon/data.fetchvectors-multiple-vectors.json @@ -0,0 +1,12 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "date": "Wed, 21 Feb 2024 14:06:38 GMT", + "x-envoy-upstream-service-time": "1", + "grpc-status": "0", + "content-length": "1448", + "server": "envoy" + }, + "data": "{\"vectors\":{\"vector_1\":{\"id\":\"vector_1\",\"values\":[0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12],\"metadata\":{\"meta1\":\"value1\"}},\"vector_2\":{\"id\":\"vector_2\",\"values\":[0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12,0.12],\"metadata\":{\"meta1\":\"value2\"}}},\"namespace\":\"\"}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/data.fetchvectors-one-vector.json b/tests/Fixtures/Saloon/data.fetchvectors-one-vector.json new file mode 100644 index 0000000..69e8d4e --- /dev/null +++ b/tests/Fixtures/Saloon/data.fetchvectors-one-vector.json @@ -0,0 +1,12 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "date": "Wed, 21 Feb 2024 14:01:44 GMT", + "x-envoy-upstream-service-time": "2", + "grpc-status": "0", + "content-length": "738", + "server": "envoy" + }, + "data": "{\"vectors\":{\"vector_1\":{\"id\":\"vector_1\",\"values\":[0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14,0.14],\"metadata\":{\"meta1\":\"value1\"}}},\"namespace\":\"\"}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/data.getindexstats.json b/tests/Fixtures/Saloon/data.getindexstats.json new file mode 100644 index 0000000..47cbea9 --- /dev/null +++ b/tests/Fixtures/Saloon/data.getindexstats.json @@ -0,0 +1,12 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "date": "Wed, 21 Feb 2024 13:12:09 GMT", + "x-envoy-upstream-service-time": "1", + "grpc-status": "0", + "content-length": "72", + "server": "envoy" + }, + "data": "{\"namespaces\":{},\"dimension\":128,\"indexFullness\":0,\"totalVectorCount\":0}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/data.queryvectors.json b/tests/Fixtures/Saloon/data.queryvectors.json new file mode 100644 index 0000000..74a53e8 --- /dev/null +++ b/tests/Fixtures/Saloon/data.queryvectors.json @@ -0,0 +1,12 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "date": "Wed, 21 Feb 2024 13:30:03 GMT", + "x-envoy-upstream-service-time": "1", + "grpc-status": "0", + "content-length": "111", + "server": "envoy" + }, + "data": "{\"results\":[],\"matches\":[{\"id\":\"vector_1\",\"score\":1,\"values\":[],\"metadata\":{\"meta1\":\"value1\"}}],\"namespace\":\"\"}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/data.updatevector.json b/tests/Fixtures/Saloon/data.updatevector.json new file mode 100644 index 0000000..4c3bbd3 --- /dev/null +++ b/tests/Fixtures/Saloon/data.updatevector.json @@ -0,0 +1,12 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "date": "Wed, 21 Feb 2024 13:29:29 GMT", + "x-envoy-upstream-service-time": "49", + "grpc-status": "0", + "content-length": "2", + "server": "envoy" + }, + "data": "{}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/data.upsertvectors.json b/tests/Fixtures/Saloon/data.upsertvectors.json new file mode 100644 index 0000000..ead150a --- /dev/null +++ b/tests/Fixtures/Saloon/data.upsertvectors.json @@ -0,0 +1,12 @@ +{ + "statusCode": 200, + "headers": { + "content-type": "application\/json", + "date": "Wed, 21 Feb 2024 14:05:06 GMT", + "x-envoy-upstream-service-time": "51", + "grpc-status": "0", + "content-length": "19", + "server": "envoy" + }, + "data": "{\"upsertedCount\":2}" +} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.all.json b/tests/Fixtures/Saloon/index.all.json deleted file mode 100644 index 8464d97..0000000 --- a/tests/Fixtures/Saloon/index.all.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json; charset=UTF-8","date":"Fri, 14 Apr 2023 10:21:15 GMT","x-envoy-upstream-service-time":"1069","content-length":"17","server":"envoy"},"data":"[\"pinecone-php\"]\n"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.configure.json b/tests/Fixtures/Saloon/index.configure.json deleted file mode 100644 index 62bc0fb..0000000 --- a/tests/Fixtures/Saloon/index.configure.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":202,"headers":{"date":"Fri, 14 Apr 2023 19:24:18 GMT","x-envoy-upstream-service-time":"1464","content-length":"0","server":"envoy"},"data":""} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.create.json b/tests/Fixtures/Saloon/index.create.json deleted file mode 100644 index d35f39a..0000000 --- a/tests/Fixtures/Saloon/index.create.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":201,"headers":{"date":"Fri, 14 Apr 2023 10:20:46 GMT","x-envoy-upstream-service-time":"1210","content-length":"0","server":"envoy"},"data":""} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.delete.json b/tests/Fixtures/Saloon/index.delete.json deleted file mode 100644 index e577f33..0000000 --- a/tests/Fixtures/Saloon/index.delete.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":202,"headers":{"date":"Fri, 14 Apr 2023 19:25:14 GMT","x-envoy-upstream-service-time":"15","content-length":"0","server":"envoy"},"data":""} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.describe.json b/tests/Fixtures/Saloon/index.describe.json deleted file mode 100644 index b841d13..0000000 --- a/tests/Fixtures/Saloon/index.describe.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json; charset=UTF-8","date":"Fri, 14 Apr 2023 10:21:51 GMT","x-envoy-upstream-service-time":"5","content-length":"277","server":"envoy"},"data":"{\"database\":{\"name\":\"pinecone-php\",\"metric\":\"cosine\",\"dimension\":128,\"replicas\":1,\"shards\":1,\"pods\":1,\"pod_type\":\"p1.x1\"},\"status\":{\"waiting\":[\"database\"],\"crashed\":[],\"host\":\"pinecone-php-4e07f0d.svc.us-east1-gcp.pinecone.io\",\"port\":433,\"state\":\"Initializing\",\"ready\":false}}\n"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.describemultiple-vectors.json b/tests/Fixtures/Saloon/index.describemultiple-vectors.json deleted file mode 100644 index 6c1617d..0000000 --- a/tests/Fixtures/Saloon/index.describemultiple-vectors.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json; charset=UTF-8","date":"Thu, 22 Jun 2023 15:58:22 GMT","x-envoy-upstream-service-time":"5","content-length":"259","server":"envoy"},"data":"{\"database\":{\"name\":\"pinecone-php\",\"metric\":\"cosine\",\"dimension\":512,\"replicas\":1,\"shards\":1,\"pods\":1,\"pod_type\":\"s1.x1\"},\"status\":{\"waiting\":[],\"crashed\":[],\"host\":\"pinecone-php-f19d399.svc.us-west4-gcp.pinecone.io\",\"port\":433,\"state\":\"Ready\",\"ready\":true}}\n"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.describeone-vector.json b/tests/Fixtures/Saloon/index.describeone-vector.json deleted file mode 100644 index 6dd3e6b..0000000 --- a/tests/Fixtures/Saloon/index.describeone-vector.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json; charset=UTF-8","date":"Thu, 22 Jun 2023 15:58:19 GMT","x-envoy-upstream-service-time":"5","content-length":"259","server":"envoy"},"data":"{\"database\":{\"name\":\"pinecone-php\",\"metric\":\"cosine\",\"dimension\":512,\"replicas\":1,\"shards\":1,\"pods\":1,\"pod_type\":\"s1.x1\"},\"status\":{\"waiting\":[],\"crashed\":[],\"host\":\"pinecone-php-f19d399.svc.us-west4-gcp.pinecone.io\",\"port\":433,\"state\":\"Ready\",\"ready\":true}}\n"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.vectors.delete.json b/tests/Fixtures/Saloon/index.vectors.delete.json deleted file mode 100644 index 85fab47..0000000 --- a/tests/Fixtures/Saloon/index.vectors.delete.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json","date":"Fri, 14 Apr 2023 20:46:32 GMT","x-envoy-upstream-service-time":"10","grpc-status":"0","content-length":"2","server":"envoy"},"data":"{}"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.vectors.describestats.json b/tests/Fixtures/Saloon/index.vectors.describestats.json deleted file mode 100644 index f5e9df2..0000000 --- a/tests/Fixtures/Saloon/index.vectors.describestats.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json","date":"Fri, 14 Apr 2023 20:32:46 GMT","x-envoy-upstream-service-time":"0","grpc-status":"0","content-length":"92","server":"envoy"},"data":"{\"namespaces\":{\"\":{\"vectorCount\":3}},\"dimension\":128,\"indexFullness\":0,\"totalVectorCount\":3}"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.vectors.fetch.json b/tests/Fixtures/Saloon/index.vectors.fetch.json deleted file mode 100644 index 955e2b9..0000000 --- a/tests/Fixtures/Saloon/index.vectors.fetch.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json","date":"Mon, 17 Apr 2023 21:28:24 GMT","x-envoy-upstream-service-time":"2","grpc-status":"0","content-length":"324","server":"envoy"},"data":"{\"vectors\":{\"vector_1\":{\"id\":\"vector_1\",\"values\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},\"namespace\":\"\"}"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.vectors.fetchmultiple-vectors.json b/tests/Fixtures/Saloon/index.vectors.fetchmultiple-vectors.json deleted file mode 100644 index 9f7136f..0000000 --- a/tests/Fixtures/Saloon/index.vectors.fetchmultiple-vectors.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json","date":"Thu, 22 Jun 2023 15:58:23 GMT","x-envoy-upstream-service-time":"3","grpc-status":"0","content-length":"2156","server":"envoy"},"data":"{\"vectors\":{\"vector_1\":{\"id\":\"vector_1\",\"values\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},\"vector_2\":{\"id\":\"vector_2\",\"values\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},\"namespace\":\"\"}"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.vectors.fetchone-vector.json b/tests/Fixtures/Saloon/index.vectors.fetchone-vector.json deleted file mode 100644 index 1109e4a..0000000 --- a/tests/Fixtures/Saloon/index.vectors.fetchone-vector.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json","date":"Thu, 22 Jun 2023 15:58:20 GMT","x-envoy-upstream-service-time":"1","grpc-status":"0","content-length":"1092","server":"envoy"},"data":"{\"vectors\":{\"vector_1\":{\"id\":\"vector_1\",\"values\":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},\"namespace\":\"\"}"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.vectors.query.json b/tests/Fixtures/Saloon/index.vectors.query.json deleted file mode 100644 index 503b8a4..0000000 --- a/tests/Fixtures/Saloon/index.vectors.query.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json","date":"Fri, 14 Apr 2023 20:41:33 GMT","x-envoy-upstream-service-time":"2","grpc-status":"0","content-length":"148","server":"envoy"},"data":"{\"results\":[],\"matches\":[{\"id\":\"8805a452-cbf1-30f1-94f6-9aac028cb131\",\"score\":1.00000012,\"values\":[],\"metadata\":{\"meta1\":\"value1\"}}],\"namespace\":\"\"}"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.vectors.update.json b/tests/Fixtures/Saloon/index.vectors.update.json deleted file mode 100644 index e46cc8a..0000000 --- a/tests/Fixtures/Saloon/index.vectors.update.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json","date":"Fri, 14 Apr 2023 20:31:28 GMT","x-envoy-upstream-service-time":"49","grpc-status":"0","content-length":"2","server":"envoy"},"data":"{}"} \ No newline at end of file diff --git a/tests/Fixtures/Saloon/index.vectors.upsert.json b/tests/Fixtures/Saloon/index.vectors.upsert.json deleted file mode 100644 index 2e335bd..0000000 --- a/tests/Fixtures/Saloon/index.vectors.upsert.json +++ /dev/null @@ -1 +0,0 @@ -{"statusCode":200,"headers":{"content-type":"application\/json","date":"Fri, 14 Apr 2023 20:00:47 GMT","x-envoy-upstream-service-time":"50","grpc-status":"0","content-length":"19","server":"envoy"},"data":"{\"upsertedCount\":1}"} \ No newline at end of file diff --git a/tests/Pest.php b/tests/Pest.php index 3fee050..3a2e59e 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -16,6 +16,7 @@ use Saloon\Http\Faking\MockClient; use Saloon\Http\Faking\MockResponse; use Saloon\Http\PendingRequest; +use Saloon\Http\Response; uses(Tests\TestCase::class)->in('Feature'); @@ -28,9 +29,9 @@ function dd() } } -function getIndexName(): string +function getIndexName(string $suffix = ''): string { - return $_ENV['PINECONE_INDEX_NAME']; + return $_ENV['PINECONE_INDEX_NAME'] . $suffix; } function getCollectionName(): string @@ -38,6 +39,20 @@ function getCollectionName(): string return $_ENV['PINECONE_COLLECTION_NAME']; } +function describeIndex($client, $indexName): Response +{ + return $client->control()->index($indexName)->describe(); +} + + +function setIndexHost($client, $indexName): void +{ + $indexData = describeIndex($client, $indexName); + $host = $indexData->json('host'); + + $client->setIndexHost('https://' . $host); +} + function getClient(bool $mocked = false, string $fixtureSuffix = ''): Client { $dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../'); @@ -53,7 +68,7 @@ function getClient(bool $mocked = false, string $fixtureSuffix = ''): Client }, ]); - $client = new Probots\Pinecone\Client($_ENV['PINECONE_API_KEY'], $_ENV['PINECONE_ENVIRONMENT']); + $client = new Probots\Pinecone\Client($_ENV['PINECONE_API_KEY'], $_ENV['PINECONE_INDEX_HOST']); if ($mocked) { $client->withMockClient($mock);