Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

declare(strict_types=1);

namespace MartinGeorgiev\Doctrine\DBAL\Types\Exceptions;

use Doctrine\DBAL\Types\ConversionException;

class InvalidJsonbArrayItemForPHPException extends ConversionException
{
private static function create(string $message, mixed $value): self
{
return new self(\sprintf($message, \var_export($value, true)));
}

public static function forInvalidType(mixed $value): self
{
return self::create('Array values must be valid JSON objects, %s given', $value);
}

public static function forInvalidFormat(mixed $value): self
{
return self::create('Invalid JSONB format in array: %s', $value);
}
}

This file was deleted.

This file was deleted.

15 changes: 5 additions & 10 deletions src/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace MartinGeorgiev\Doctrine\DBAL\Types;

use MartinGeorgiev\Doctrine\DBAL\Types\Exceptions\UnexpectedTypeOfTransformedPHPValue;
use MartinGeorgiev\Doctrine\DBAL\Types\Exceptions\InvalidJsonbArrayItemForPHPException;

/**
* Implementation of PostgreSQL JSONB[] data type.
Expand All @@ -18,9 +18,6 @@ class JsonbArray extends BaseArray
{
use JsonTransformer;

/**
* @var string
*/
protected const TYPE_NAME = 'jsonb[]';

protected function transformArrayItemForPostgres(mixed $item): string
Expand Down Expand Up @@ -48,17 +45,15 @@ protected function transformPostgresArrayToPHPArray(string $postgresArray): arra
*/
public function transformArrayItemForPHP($item): array
{
$transformedValue = null;

try {
$transformedValue = $this->transformFromPostgresJson($item);
if (!\is_array($transformedValue)) {
throw new UnexpectedTypeOfTransformedPHPValue($item, \gettype($transformedValue));
throw InvalidJsonbArrayItemForPHPException::forInvalidType($item);
}

return $transformedValue;
} catch (\JsonException) {
throw new UnexpectedTypeOfTransformedPHPValue($item, \gettype($transformedValue));
throw InvalidJsonbArrayItemForPHPException::forInvalidFormat($item);
}

return $transformedValue;
}
}
26 changes: 21 additions & 5 deletions tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Tests\MartinGeorgiev\Doctrine\DBAL\Types;

use Doctrine\DBAL\Platforms\AbstractPlatform;
use MartinGeorgiev\Doctrine\DBAL\Types\Exceptions\UnexpectedTypeOfTransformedPHPValue;
use MartinGeorgiev\Doctrine\DBAL\Types\Exceptions\InvalidJsonbArrayItemForPHPException;
use MartinGeorgiev\Doctrine\DBAL\Types\JsonbArray;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
Expand Down Expand Up @@ -92,13 +92,29 @@

/**
* @test
*
* @dataProvider provideInvalidTransformations
*/
public function throws_an_error_when_transformed_value_is_not_an_array(): void
public function throws_exception_when_invalid_data_provided_to_convert_to_php_value(string $postgresValue): void
{
$this->expectException(UnexpectedTypeOfTransformedPHPValue::class);

$postgresValue = '"a string encoded as json"';
$this->expectException(InvalidJsonbArrayItemForPHPException::class);
$this->expectExceptionMessage('Invalid JSONB format in array');

$this->fixture->convertToPHPValue($postgresValue, $this->platform);
}

/**
* @return array<string, array{string, string}>
*/
public static function provideInvalidTransformations(): array
{
return [

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 3.0

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 2.1

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0 + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 2.1

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14 + Doctrine Lexer 1.2

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.

Check failure on line 111 in tests/MartinGeorgiev/Doctrine/DBAL/Types/JsonbArrayTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest

Method Tests\MartinGeorgiev\Doctrine\DBAL\Types\JsonbArrayTest::provideInvalidTransformations() should return array<string, array{string, string}> but returns array{non-array json: array{'"a string encoded…'}, invalid json format: array{'{invalid json}'}}.
'non-array json' => [
'"a string encoded as json"',
],
'invalid json format' => [
'{invalid json}',
],
];
}
}
Loading