Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
Expand Up @@ -20,15 +20,17 @@

protected function getExpectedSqlStatements(): array
{
return [

Check failure on line 23 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 23 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 23 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 23 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 23 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 23 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 23 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 23 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 23 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 23 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 23 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 23 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.
"SELECT (c0_.object1 ??& ARRAY['test']) AS sclr_0 FROM ContainsJsons c0_",
'checks if single key exists in jsonb' => "SELECT (c0_.object1 ??& ARRAY['test']) AS sclr_0 FROM ContainsJsons c0_",
'checks if multiple keys exist in jsonb' => "SELECT (c0_.object1 ??& ARRAY['key1', 'key2']) AS sclr_0 FROM ContainsJsons c0_",
];
}

protected function getDqlStatements(): array
{
return [

Check failure on line 31 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 31 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 31 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 31 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 31 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 31 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 31 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 31 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 31 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 31 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 31 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 31 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/AllOnTheRightExistOnTheLeftTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\AllOnTheRightExistOnTheLeftTest::getDqlStatements() should return array<int, string> but returns array<string, string>.
\sprintf("SELECT ALL_ON_RIGHT_EXIST_ON_LEFT(e.object1, ARRAY('test')) FROM %s e", ContainsJsons::class),
'checks if single key exists in jsonb' => \sprintf("SELECT ALL_ON_RIGHT_EXIST_ON_LEFT(e.object1, ARRAY('test')) FROM %s e", ContainsJsons::class),
'checks if multiple keys exist in jsonb' => \sprintf("SELECT ALL_ON_RIGHT_EXIST_ON_LEFT(e.object1, ARRAY('key1', 'key2')) FROM %s e", ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

protected function getExpectedSqlStatements(): array
{
return [

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.
'SELECT array_to_json(c0_.array1) AS sclr_0 FROM ContainsArrays c0_',
'converts simple array to json' => 'SELECT array_to_json(c0_.array1) AS sclr_0 FROM ContainsArrays c0_',
];
}

protected function getDqlStatements(): array
{
return [

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/ArrayToJsonTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\ArrayToJsonTest::getDqlStatements() should return array<int, string> but returns array<string, string>.
\sprintf('SELECT ARRAY_TO_JSON(e.array1) FROM %s e', ContainsArrays::class),
'converts simple array to json' => \sprintf('SELECT ARRAY_TO_JSON(e.array1) FROM %s e', ContainsArrays::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@

protected function getExpectedSqlStatements(): array
{
return [

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.
'SELECT json_array_length(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
'gets length of top-level array' => 'SELECT json_array_length(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
'gets length from literal json' => "SELECT json_array_length('{\"iso_3166_a3_code\":\"BGR\"}') AS sclr_0 FROM ContainsJsons c0_",
];
}

protected function getDqlStatements(): array
{
return [

Check failure on line 29 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 29 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 29 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 29 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 29 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 29 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 29 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 29 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 29 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 29 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 29 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 29 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonArrayLengthTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonArrayLengthTest::getDqlStatements() should return array<int, string> but returns array<string, string>.
\sprintf('SELECT JSON_ARRAY_LENGTH(e.object1) FROM %s e', ContainsJsons::class),
'gets length of top-level array' => \sprintf('SELECT JSON_ARRAY_LENGTH(e.object1) FROM %s e', ContainsJsons::class),
'gets length from literal json' => \sprintf("SELECT JSON_ARRAY_LENGTH('{\"iso_3166_a3_code\":\"BGR\"}') FROM %s e", ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

protected function getExpectedSqlStatements(): array
{
return [

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.
'SELECT json_each(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
'expands json object into key-value pairs' => 'SELECT json_each(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
];
}

protected function getDqlStatements(): array
{
return [

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTest::getDqlStatements() should return array<int, string> but returns array<string, string>.
\sprintf('SELECT JSON_EACH(e.object1) FROM %s e', ContainsJsons::class),
'expands json object into key-value pairs' => \sprintf('SELECT JSON_EACH(e.object1) FROM %s e', ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

protected function getExpectedSqlStatements(): array
{
return [

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 21 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getExpectedSqlStatements() should return array<int, string> but returns array<string, string>.
'SELECT json_each_text(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
'expands json object into text key-value pairs' => 'SELECT json_each_text(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
];
}

protected function getDqlStatements(): array
{
return [

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM 3.0

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 + Doctrine ORM 2.14

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getDqlStatements() should return array<int, string> but returns array<string, string>.

Check failure on line 28 in tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/JsonEachTextTest.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 + Doctrine ORM latest

Method Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\JsonEachTextTest::getDqlStatements() should return array<int, string> but returns array<string, string>.
\sprintf('SELECT JSON_EACH_TEXT(e.object1) FROM %s e', ContainsJsons::class),
'expands json object into text key-value pairs' => \sprintf('SELECT JSON_EACH_TEXT(e.object1) FROM %s e', ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,20 @@ protected function getStringFunctions(): array
protected function getExpectedSqlStatements(): array
{
return [
// Basic usage
"SELECT json_exists(c0_.object1, '$.name') AS sclr_0 FROM ContainsJsons c0_",
// Nested path
"SELECT json_exists(c0_.object1, '$.address.city') AS sclr_0 FROM ContainsJsons c0_",
// Array element
"SELECT json_exists(c0_.object1, '$.items[0]') AS sclr_0 FROM ContainsJsons c0_",
'checks if simple path exists' => "SELECT json_exists(c0_.object1, '$.name') AS sclr_0 FROM ContainsJsons c0_",
'checks if nested path exists' => "SELECT json_exists(c0_.object1, '$.address.city') AS sclr_0 FROM ContainsJsons c0_",
'checks if array element exists' => "SELECT json_exists(c0_.object1, '$.items[0]') AS sclr_0 FROM ContainsJsons c0_",
'checks if deeply nested array element exists' => "SELECT json_exists(c0_.object1, '$.users[0].addresses[0].street') AS sclr_0 FROM ContainsJsons c0_",
];
}

protected function getDqlStatements(): array
{
return [
\sprintf("SELECT JSON_EXISTS(e.object1, '$.name') FROM %s e", ContainsJsons::class),
\sprintf("SELECT JSON_EXISTS(e.object1, '$.address.city') FROM %s e", ContainsJsons::class),
\sprintf("SELECT JSON_EXISTS(e.object1, '$.items[0]') FROM %s e", ContainsJsons::class),
'checks if simple path exists' => \sprintf("SELECT JSON_EXISTS(e.object1, '$.name') FROM %s e", ContainsJsons::class),
'checks if nested path exists' => \sprintf("SELECT JSON_EXISTS(e.object1, '$.address.city') FROM %s e", ContainsJsons::class),
'checks if array element exists' => \sprintf("SELECT JSON_EXISTS(e.object1, '$.items[0]') FROM %s e", ContainsJsons::class),
'checks if deeply nested array element exists' => \sprintf("SELECT JSON_EXISTS(e.object1, '$.users[0].addresses[0].street') FROM %s e", ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ protected function getStringFunctions(): array
protected function getExpectedSqlStatements(): array
{
return [
"SELECT (c0_.object1 -> 'country') AS sclr_0 FROM ContainsJsons c0_",
'extracts top-level field from json' => "SELECT (c0_.object1 -> 'key') AS sclr_0 FROM ContainsJsons c0_",
'extracts nested field from json' => "SELECT ((c0_.object1 -> 'nested') -> 'key') AS sclr_0 FROM ContainsJsons c0_",
];
}

protected function getDqlStatements(): array
{
return [
\sprintf("SELECT JSON_GET_FIELD(e.object1, 'country') FROM %s e", ContainsJsons::class),
'extracts top-level field from json' => \sprintf("SELECT JSON_GET_FIELD(e.object1, 'key') FROM %s e", ContainsJsons::class),
'extracts nested field from json' => \sprintf("SELECT JSON_GET_FIELD(JSON_GET_FIELD(e.object1, 'nested'), 'key') FROM %s e", ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,26 @@ protected function getStringFunctions(): array
protected function getExpectedSqlStatements(): array
{
return [
"SELECT (c0_.object1 #>> '{residency,country}') AS sclr_0 FROM ContainsJsons c0_",
'extracts top-level object as text' => "SELECT (c0_.object1 #>> '{metadata}') AS sclr_0 FROM ContainsJsons c0_",
'extracts nested object as text' => "SELECT (c0_.object1 #>> '{user,address}') AS sclr_0 FROM ContainsJsons c0_",
'extracts array element as text' => "SELECT (c0_.object1 #>> '{items,0}') AS sclr_0 FROM ContainsJsons c0_",
'extracts deeply nested object as text' => "SELECT (c0_.object1 #>> '{store,departments,main}') AS sclr_0 FROM ContainsJsons c0_",
'extracts from complex path as text' => "SELECT (c0_.object1 #>> '{data,users,0,profile}') AS sclr_0 FROM ContainsJsons c0_",
'extracts last array element as text' => "SELECT (c0_.object1 #>> '{records,-1}') AS sclr_0 FROM ContainsJsons c0_",
'extracts nested array element as text' => "SELECT (c0_.object1 #>> '{categories,2,description}') AS sclr_0 FROM ContainsJsons c0_",
];
}

protected function getDqlStatements(): array
{
return [
\sprintf("SELECT JSON_GET_OBJECT_AS_TEXT(e.object1, '{residency,country}') FROM %s e", ContainsJsons::class),
'extracts top-level object as text' => \sprintf("SELECT JSON_GET_OBJECT_AS_TEXT(e.object1, '{metadata}') FROM %s e", ContainsJsons::class),
'extracts nested object as text' => \sprintf("SELECT JSON_GET_OBJECT_AS_TEXT(e.object1, '{user,address}') FROM %s e", ContainsJsons::class),
'extracts array element as text' => \sprintf("SELECT JSON_GET_OBJECT_AS_TEXT(e.object1, '{items,0}') FROM %s e", ContainsJsons::class),
'extracts deeply nested object as text' => \sprintf("SELECT JSON_GET_OBJECT_AS_TEXT(e.object1, '{store,departments,main}') FROM %s e", ContainsJsons::class),
'extracts from complex path as text' => \sprintf("SELECT JSON_GET_OBJECT_AS_TEXT(e.object1, '{data,users,0,profile}') FROM %s e", ContainsJsons::class),
'extracts last array element as text' => \sprintf("SELECT JSON_GET_OBJECT_AS_TEXT(e.object1, '{records,-1}') FROM %s e", ContainsJsons::class),
'extracts nested array element as text' => \sprintf("SELECT JSON_GET_OBJECT_AS_TEXT(e.object1, '{categories,2,description}') FROM %s e", ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,30 @@ protected function getStringFunctions(): array
protected function getExpectedSqlStatements(): array
{
return [
"SELECT json_query(c0_.object1, '$.items[*]') AS sclr_0 FROM ContainsJsons c0_",
"SELECT json_query(c0_.object1, '$.address') AS sclr_0 FROM ContainsJsons c0_",
// Additional test cases for important scenarios
"SELECT json_query(c0_.object1, '$.store.book[*].author') AS sclr_0 FROM ContainsJsons c0_",
"SELECT json_query(c0_.object1, '$.store.book[0 to 2]') AS sclr_0 FROM ContainsJsons c0_",
"SELECT json_query(c0_.object1, '$.store.book[*]?(@.price > 10)') AS sclr_0 FROM ContainsJsons c0_",
'extracts all array items' => "SELECT json_query(c0_.object1, '$.items[*]') AS sclr_0 FROM ContainsJsons c0_",
'extracts nested object' => "SELECT json_query(c0_.object1, '$.address') AS sclr_0 FROM ContainsJsons c0_",
'extracts all authors from books array' => "SELECT json_query(c0_.object1, '$.store.book[*].author') AS sclr_0 FROM ContainsJsons c0_",
'extracts specific range of books' => "SELECT json_query(c0_.object1, '$.store.book[0 to 2]') AS sclr_0 FROM ContainsJsons c0_",
'filters books by price condition' => "SELECT json_query(c0_.object1, '$.store.book[*]?(@.price > 10)') AS sclr_0 FROM ContainsJsons c0_",
// Additional scenarios based on PostgreSQL's json_query capabilities
'extracts last array element' => "SELECT json_query(c0_.object1, '$.items[last]') AS sclr_0 FROM ContainsJsons c0_",
'extracts specific keys from objects in array' => "SELECT json_query(c0_.object1, '$.users[*]?(@.active == true).name') AS sclr_0 FROM ContainsJsons c0_",
'extracts nested array with multiple conditions' => "SELECT json_query(c0_.object1, '$.store.book[*]?(@.price < 30 && @.category == \"fiction\")') AS sclr_0 FROM ContainsJsons c0_",
];
}

protected function getDqlStatements(): array
{
return [
\sprintf("SELECT JSON_QUERY(e.object1, '$.items[*]') FROM %s e", ContainsJsons::class),
\sprintf("SELECT JSON_QUERY(e.object1, '$.address') FROM %s e", ContainsJsons::class),
// Additional test cases matching the SQL statements above
\sprintf("SELECT JSON_QUERY(e.object1, '$.store.book[*].author') FROM %s e", ContainsJsons::class),
\sprintf("SELECT JSON_QUERY(e.object1, '$.store.book[0 to 2]') FROM %s e", ContainsJsons::class),
\sprintf("SELECT JSON_QUERY(e.object1, '$.store.book[*]?(@.price > 10)') FROM %s e", ContainsJsons::class),
'extracts all array items' => \sprintf("SELECT JSON_QUERY(e.object1, '$.items[*]') FROM %s e", ContainsJsons::class),
'extracts nested object' => \sprintf("SELECT JSON_QUERY(e.object1, '$.address') FROM %s e", ContainsJsons::class),
'extracts all authors from books array' => \sprintf("SELECT JSON_QUERY(e.object1, '$.store.book[*].author') FROM %s e", ContainsJsons::class),
'extracts specific range of books' => \sprintf("SELECT JSON_QUERY(e.object1, '$.store.book[0 to 2]') FROM %s e", ContainsJsons::class),
'filters books by price condition' => \sprintf("SELECT JSON_QUERY(e.object1, '$.store.book[*]?(@.price > 10)') FROM %s e", ContainsJsons::class),
// Additional scenarios based on PostgreSQL's json_query capabilities
'extracts last array element' => \sprintf("SELECT JSON_QUERY(e.object1, '$.items[last]') FROM %s e", ContainsJsons::class),
'extracts specific keys from objects in array' => \sprintf("SELECT JSON_QUERY(e.object1, '$.users[*]?(@.active == true).name') FROM %s e", ContainsJsons::class),
'extracts nested array with multiple conditions' => \sprintf("SELECT JSON_QUERY(e.object1, '$.store.book[*]?(@.price < 30 && @.category == \"fiction\")') FROM %s e", ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,18 @@ protected function getStringFunctions(): array
protected function getExpectedSqlStatements(): array
{
return [
// Basic serialization
'SELECT json_serialize(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
// With expression
'SELECT json_serialize(UPPER(c0_.object1)) AS sclr_0 FROM ContainsJsons c0_',
// With literal
"SELECT json_serialize('{\"key\": \"value\"}') AS sclr_0 FROM ContainsJsons c0_",
'serializes json field' => 'SELECT json_serialize(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
'serializes json field with expression' => 'SELECT json_serialize(UPPER(c0_.object1)) AS sclr_0 FROM ContainsJsons c0_',
'serializes json literal' => "SELECT json_serialize('{\"key\": \"value\"}') AS sclr_0 FROM ContainsJsons c0_",
];
}

protected function getDqlStatements(): array
{
return [
\sprintf('SELECT JSON_SERIALIZE(e.object1) FROM %s e', ContainsJsons::class),
\sprintf('SELECT JSON_SERIALIZE(UPPER(e.object1)) FROM %s e', ContainsJsons::class),
\sprintf("SELECT JSON_SERIALIZE('{\"key\": \"value\"}') FROM %s e", ContainsJsons::class),
'serializes json field' => \sprintf('SELECT JSON_SERIALIZE(e.object1) FROM %s e', ContainsJsons::class),
'serializes json field with expression' => \sprintf('SELECT JSON_SERIALIZE(UPPER(e.object1)) FROM %s e', ContainsJsons::class),
'serializes json literal' => \sprintf("SELECT JSON_SERIALIZE('{\"key\": \"value\"}') FROM %s e", ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ protected function getStringFunctions(): array
protected function getExpectedSqlStatements(): array
{
return [
'SELECT json_typeof(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
'determines type of json document' => 'SELECT json_typeof(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
'determines type of literal value' => "SELECT json_typeof('42') AS sclr_0 FROM ContainsJsons c0_",
];
}

protected function getDqlStatements(): array
{
return [
\sprintf('SELECT JSON_TYPEOF(e.object1) FROM %s e', ContainsJsons::class),
'determines type of json document' => \sprintf('SELECT JSON_TYPEOF(e.object1) FROM %s e', ContainsJsons::class),
'determines type of literal value' => \sprintf("SELECT JSON_TYPEOF('42') FROM %s e", ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ protected function getStringFunctions(): array
protected function getExpectedSqlStatements(): array
{
return [
'SELECT jsonb_array_elements(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
'expands jsonb array into separate rows' => 'SELECT jsonb_array_elements(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
];
}

protected function getDqlStatements(): array
{
return [
\sprintf('SELECT JSONB_ARRAY_ELEMENTS(e.object1) FROM %s e', ContainsJsons::class),
'expands jsonb array into separate rows' => \sprintf('SELECT JSONB_ARRAY_ELEMENTS(e.object1) FROM %s e', ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ protected function getStringFunctions(): array
protected function getExpectedSqlStatements(): array
{
return [
'SELECT jsonb_each(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
'expands top-level jsonb object into key-value pairs' => 'SELECT jsonb_each(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
];
}

protected function getDqlStatements(): array
{
return [
\sprintf('SELECT JSONB_EACH(e.object1) FROM %s e', ContainsJsons::class),
'expands top-level jsonb object into key-value pairs' => \sprintf('SELECT JSONB_EACH(e.object1) FROM %s e', ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ protected function getStringFunctions(): array
protected function getExpectedSqlStatements(): array
{
return [
"SELECT jsonb_exists(c0_.object1, 'country') AS sclr_0 FROM ContainsJsons c0_",
'checks if top-level key exists' => "SELECT jsonb_exists(c0_.object1, 'country') AS sclr_0 FROM ContainsJsons c0_",
];
}

protected function getDqlStatements(): array
{
return [
\sprintf("SELECT JSONB_EXISTS(e.object1, 'country') FROM %s e", ContainsJsons::class),
'checks if top-level key exists' => \sprintf("SELECT JSONB_EXISTS(e.object1, 'country') FROM %s e", ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ protected function getStringFunctions(): array
protected function getExpectedSqlStatements(): array
{
return [
'SELECT jsonb_pretty(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
"SELECT jsonb_pretty('{\"iso_3166_a3_code\":\"BGR\"}') AS sclr_0 FROM ContainsJsons c0_",
'formats jsonb document with proper indentation' => 'SELECT jsonb_pretty(c0_.object1) AS sclr_0 FROM ContainsJsons c0_',
'formats literal jsonb value' => "SELECT jsonb_pretty('{\"iso_3166_a3_code\":\"BGR\"}') AS sclr_0 FROM ContainsJsons c0_",
];
}

protected function getDqlStatements(): array
{
return [
\sprintf('SELECT JSONB_PRETTY(e.object1) FROM %s e', ContainsJsons::class),
\sprintf("SELECT JSONB_PRETTY('{\"iso_3166_a3_code\":\"BGR\"}') FROM %s e", ContainsJsons::class),
'formats jsonb document with proper indentation' => \sprintf('SELECT JSONB_PRETTY(e.object1) FROM %s e', ContainsJsons::class),
'formats literal jsonb value' => \sprintf("SELECT JSONB_PRETTY('{\"iso_3166_a3_code\":\"BGR\"}') FROM %s e", ContainsJsons::class),
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected function getExpectedSqlStatements(): array
protected function getDqlStatements(): array
{
return [
\sprintf("SELECT SIMILAR_TO(e.text1,'TEST') FROM %s e", ContainsTexts::class),
\sprintf("SELECT SIMILAR_TO(e.text1, 'TEST') FROM %s e", ContainsTexts::class),
];
}
}
Loading
Loading