Skip to content

Commit 09b8b9f

Browse files
author
Benoit POLASZEK
committed
feat: update array_is_list usage and add Symfony polyfill for PHP 8.1
1 parent 3ed2e42 commit 09b8b9f

File tree

4 files changed

+4
-50
lines changed

4 files changed

+4
-50
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
"php": "^7.4 || ^8.0",
2323
"ext-json": "*",
2424
"php-http/discovery": "^1.7",
25-
"psr/http-client": "^1.0"
25+
"psr/http-client": "^1.0",
26+
"symfony/polyfill-php81": "^1.33"
2627
},
2728
"autoload": {
2829
"psr-4": {
2930
"MeiliSearch\\": "src/",
3031
"Meilisearch\\": "src/"
31-
},
32-
"files": ["src/polyfills.php"]
32+
}
3333
},
3434
"autoload-dev": {
3535
"psr-4": {

src/Http/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ private function buildQueryString(array $queryParams = []): string
165165
if (\is_bool($value)) {
166166
$queryParams[$key] = $value ? 'true' : 'false';
167167
}
168-
if (\is_array($value) && array_is_list($value)) {
168+
if (\is_array($value) && \array_is_list($value)) {
169169
$queryParams[$key] = implode(',', $value);
170170
}
171171
}

src/polyfills.php

Lines changed: 0 additions & 27 deletions
This file was deleted.

tests/PollyfillsTest.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)