Skip to content

Commit

Permalink
Fixed when metadata is not scalaer on print indices command (#62)
Browse files Browse the repository at this point in the history
- Remove --dev dependencies minimum-stability
- Fixed wrong method in command
  • Loading branch information
mmoreram authored May 7, 2020
1 parent edde102 commit 4b89706
Show file tree
Hide file tree
Showing 5 changed files with 816 additions and 1,075 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
test-php73:
docker:
- image: circleci/php:7.4-cli
- image: circleci/php:7.3-cli

working_directory: ~/project
steps:
Expand Down
2 changes: 1 addition & 1 deletion Command/AddTokenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected function runCommand(InputInterface $input, OutputInterface $output)

$this
->repositoryBucket->findRepository($input->getArgument('app-name'))
->addToken(
->putToken(
new Token(
TokenUUID::createById($input->getArgument('uuid')),
$appUUID,
Expand Down
2 changes: 1 addition & 1 deletion Command/PrintIndicesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static function printIndices(

if ($withMetadata) {
foreach ($index->getMetadata() as $_ => $value) {
$row[] = $value;
$row[] = is_scalar($value) ? $value : json_encode($value);
}
}

Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"symfony/console": "^4.0 || ^5.0",
"ramsey/uuid": "^3.7.1",
"mmoreram/base-bundle": "^2.1.2",
"apisearch-io/php-client": "0.1.*, >=0.1.23"
"apisearch-io/php-client": "0.1.*, >=0.1.27"
},
"require-dev": {
"mmoreram/symfony-bundle-dependencies": "^2.1",
Expand All @@ -32,6 +32,5 @@
"psr-4": {
"Apisearch\\": ""
}
},
"minimum-stability": "dev"
}
}
Loading

0 comments on commit 4b89706

Please sign in to comment.