Skip to content

Commit a5f01fc

Browse files
authored
v3.0.0
__BREAKING CHANGES__ * Upgrade to support Symfony 6 and PHP 8.1.
1 parent 8a5b2e8 commit a5f01fc

13 files changed

+39
-32
lines changed

CHANGELOG-3.x.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# CHANGELOG for 3.x
2+
This changelog references the relevant changes done in 3.x versions.
3+
4+
5+
## v3.0.0
6+
__BREAKING CHANGES__
7+
8+
* Upgrade to support Symfony 6 and PHP 8.1.

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"type": "symfony-bundle",
66
"license": "Apache-2.0",
77
"require": {
8-
"php": ">=7.4",
9-
"gdbots/ncr": "^2.1",
10-
"gdbots/pbjx-bundle": "^2.1"
8+
"php": ">=8.1",
9+
"gdbots/ncr": "^3.0",
10+
"gdbots/pbjx-bundle": "^3.0"
1111
},
1212
"require-dev": {
1313
"phpunit/phpunit": "^9.5",

src/Command/CreateSearchStorageCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7171
{
7272
$skipErrors = $input->getOption('skip-errors');
7373
$context = $input->getOption('context') ?: '{}';
74-
if (strpos($context, '{') === false) {
74+
if (!str_contains($context, '{')) {
7575
$context = base64_decode($context);
7676
}
7777
$context = json_decode($context, true);

src/Command/CreateStorageCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7171
{
7272
$skipErrors = $input->getOption('skip-errors');
7373
$context = $input->getOption('context') ?: '{}';
74-
if (strpos($context, '{') === false) {
74+
if (!str_contains($context, '{')) {
7575
$context = base64_decode($context);
7676
}
7777
$context = json_decode($context, true);

src/Command/DescribeSearchStorageCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function configure()
6464
protected function execute(InputInterface $input, OutputInterface $output): int
6565
{
6666
$context = $input->getOption('context') ?: '{}';
67-
if (strpos($context, '{') === false) {
67+
if (!str_contains($context, '{')) {
6868
$context = base64_decode($context);
6969
}
7070
$context = json_decode($context, true);

src/Command/DescribeStorageCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function configure()
6464
protected function execute(InputInterface $input, OutputInterface $output): int
6565
{
6666
$context = $input->getOption('context') ?: '{}';
67-
if (strpos($context, '{') === false) {
67+
if (!str_contains($context, '{')) {
6868
$context = base64_decode($context);
6969
}
7070
$context = json_decode($context, true);

src/Command/ExportNodesCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8686
$batchSize = NumberUtil::bound((int)$input->getOption('batch-size'), 1, 2000);
8787
$batchDelay = NumberUtil::bound((int)$input->getOption('batch-delay'), 10, 600000);
8888
$context = $input->getOption('context') ?: '{}';
89-
if (strpos($context, '{') === false) {
89+
if (!str_contains($context, '{')) {
9090
$context = base64_decode($context);
9191
}
9292
$context = json_decode($context, true);

src/Command/GetNodeCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ protected function execute(InputInterface $input, OutputInterface $output): int
7878
$errOutput->setVerbosity(OutputInterface::VERBOSITY_NORMAL);
7979

8080
$context = $input->getOption('context') ?: '{}';
81-
if (strpos($context, '{') === false) {
81+
if (!str_contains($context, '{')) {
8282
$context = base64_decode($context);
8383
}
8484
$context = json_decode($context, true);
8585
$context['tenant_id'] = (string)$input->getOption('tenant-id');
8686

8787
$nodeRef = NodeRef::fromString($input->getArgument('node-ref'));
88-
$consistent = $input->getOption('consistent') ? true : false;
88+
$consistent = (bool)$input->getOption('consistent');
8989

9090
try {
9191
$node = $this->ncr->getNode($nodeRef, $consistent, $context);

src/Command/ReindexNodesCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
101101
$batchSize = NumberUtil::bound((int)$input->getOption('batch-size'), 1, 2000);
102102
$batchDelay = NumberUtil::bound((int)$input->getOption('batch-delay'), 10, 600000);
103103
$context = $input->getOption('context') ?: '{}';
104-
if (strpos($context, '{') === false) {
104+
if (!str_contains($context, '{')) {
105105
$context = base64_decode($context);
106106
}
107107
$context = json_decode($context, true);

src/Command/SyncNodeCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8181
{
8282
$noShapshot = $input->getOption('no-snapshot');
8383
$context = $input->getOption('context') ?: '{}';
84-
if (strpos($context, '{') === false) {
84+
if (!str_contains($context, '{')) {
8585
$context = base64_decode($context);
8686
}
8787
$context = json_decode($context, true);

0 commit comments

Comments
 (0)