Skip to content

Commit 429ae22

Browse files
refactor: use PSR-18 discovery and replace auth token with headers
- Replaces hard Guzzle dependency with PSR-18 Client and PSR-17 Factory discovery. - Refactors `Factory`and `Api` to use `ClientInterface` and `RequestFactoryInterface`. - Replaces specific `authToken` handling with generic `headers` support in `Factory` and `Api`. - Deprecates `Factory::withAuthToken()` in favor of `withHeader()`. - Updates all embedding functions to use the discovered PSR-18 client. BREAKING CHANGE: `Factory::withHttpClient` has been removed.
1 parent 4de5c8f commit 429ae22

9 files changed

Lines changed: 335 additions & 410 deletions

chroma/chroma.sqlite3

0 Bytes
Binary file not shown.

composer.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@
1616
"license": "MIT",
1717
"require": {
1818
"php": "^8.1",
19-
"guzzlehttp/guzzle": "^7.0"
19+
"psr/http-client": "^1.0",
20+
"psr/http-factory": "^1.1",
21+
"php-http/discovery": "^1.20"
2022
},
2123
"require-dev": {
2224
"pestphp/pest": "^2.19",
2325
"symfony/var-dumper": "^6.3",
2426
"mockery/mockery": "^1.6",
25-
"symfony/process": "^7.4"
27+
"symfony/process": "^7.4",
28+
"guzzlehttp/guzzle": "^7.10"
2629
},
2730
"autoload": {
2831
"psr-4": {
@@ -42,11 +45,12 @@
4245
],
4346
"config": {
4447
"allow-plugins": {
45-
"pestphp/pest-plugin": true
48+
"pestphp/pest-plugin": true,
49+
"php-http/discovery": true
4650
}
4751
},
4852
"scripts": {
4953
"test": "vendor/bin/pest",
5054
"test:coverage": "XDEBUG_MODE=coverage ./vendor/bin/pest --coverage"
5155
}
52-
}
56+
}

0 commit comments

Comments
 (0)