Skip to content

Commit 4b89706

Browse files
authored
Fixed when metadata is not scalaer on print indices command (#62)
- Remove --dev dependencies minimum-stability - Fixed wrong method in command
1 parent edde102 commit 4b89706

File tree

5 files changed

+816
-1075
lines changed

5 files changed

+816
-1075
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
test-php73:
44
docker:
5-
- image: circleci/php:7.4-cli
5+
- image: circleci/php:7.3-cli
66

77
working_directory: ~/project
88
steps:

Command/AddTokenCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected function runCommand(InputInterface $input, OutputInterface $output)
9696

9797
$this
9898
->repositoryBucket->findRepository($input->getArgument('app-name'))
99-
->addToken(
99+
->putToken(
100100
new Token(
101101
TokenUUID::createById($input->getArgument('uuid')),
102102
$appUUID,

Command/PrintIndicesCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public static function printIndices(
136136

137137
if ($withMetadata) {
138138
foreach ($index->getMetadata() as $_ => $value) {
139-
$row[] = $value;
139+
$row[] = is_scalar($value) ? $value : json_encode($value);
140140
}
141141
}
142142

composer.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"symfony/console": "^4.0 || ^5.0",
2121
"ramsey/uuid": "^3.7.1",
2222
"mmoreram/base-bundle": "^2.1.2",
23-
"apisearch-io/php-client": "0.1.*, >=0.1.23"
23+
"apisearch-io/php-client": "0.1.*, >=0.1.27"
2424
},
2525
"require-dev": {
2626
"mmoreram/symfony-bundle-dependencies": "^2.1",
@@ -32,6 +32,5 @@
3232
"psr-4": {
3333
"Apisearch\\": ""
3434
}
35-
},
36-
"minimum-stability": "dev"
35+
}
3736
}

0 commit comments

Comments
 (0)