Skip to content

Commit a8e2fd6

Browse files
committed
deprecated all formatters besides the summarised result formatter
1 parent 2f1eaf0 commit a8e2fd6

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

psalm.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@
2828
<directory name="src"/>
2929
</errorLevel>
3030
</UnusedForeachValue>
31+
<DeprecatedClass>
32+
<errorLevel type="suppress">
33+
<directory name="tests"/>
34+
<directory name="src"/>
35+
</errorLevel>
36+
</DeprecatedClass>
37+
<DeprecatedInterface>
38+
<errorLevel type="suppress">
39+
<directory name="tests"/>
40+
<directory name="src"/>
41+
</errorLevel>
42+
</DeprecatedInterface>
3143
<MissingConstructor>
3244
<errorLevel type="suppress">
3345
<directory name="tests"/>

src/Contracts/FormatterInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
* @psalm-type BoltMeta = array{t_first: int, fields: list<string>, qid ?: int}
6868
*
6969
* @template ResultFormat
70+
*
71+
* @deprecated Next major version will only use SummarizedResultFormatter
7072
*/
7173
interface FormatterInterface
7274
{

src/Formatter/BasicFormatter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
* @psalm-type BasicResults = CypherList<CypherMap<scalar|array|null>>
4343
*
4444
* @implements FormatterInterface<BasicResults>
45+
*
46+
* @deprecated Next major version will only use SummarizedResultFormatter
4547
*/
4648
final class BasicFormatter implements FormatterInterface
4749
{

src/Formatter/OGMFormatter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
* @psalm-import-type BoltMeta from FormatterInterface
5858
*
5959
* @implements FormatterInterface<CypherList<CypherMap<OGMTypes>>>
60+
*
61+
* @deprecated Next major version will only use SummarizedResultFormatter
6062
*/
6163
final class OGMFormatter implements FormatterInterface
6264
{

tests/Integration/SummarizedResultFormatterTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ public function testSerialize(): void
6969
self::assertEquals($results->toRecursiveArray(), $resultHasBeenSerialized->toRecursiveArray());
7070
}
7171

72+
/**
73+
* @doesNotPerformAssertions
74+
*/
7275
public function testDump(): void
7376
{
7477
$results = $this->getSession()->run('RETURN 1 AS one', []);

0 commit comments

Comments
 (0)