neoxygen / neo4j-neoclient

Simple PHP HttpClient for the Neo4j ReST API with Multi DB Support
MIT License
121 stars 138 forks source link

Formatter reset problem #31

Closed mehmetbilgin closed 9 years ago

mehmetbilgin commented 9 years ago

Hi Christophe,

Looks like there is an issue with formatter.

$client = ClientBuilder::create() ->addDefaultLocalConnection() ->setAutoFormatResponse(true) ->build();

$query = "MATCH (member:Member {username:'member_1'}) RETURN member"; $result1 = $client->sendCypherQuery($query)->getResult();

$query = "MATCH (member:Member {username:'member_2'}) RETURN member"; $result2 = $client->sendCypherQuery($query)->getResult();

When I run first query and check result1 I see that there is only one node in it, which is the expected result. But after running second query, both result1 and result2 has 2 nodes (member_1 and member_2) in them.

Looks like formatter keeps its internal state between queries. There is a reset function in ResponseFormatter but I could not find any reference to it.

ikwattro commented 9 years ago

Ho thanks for the report, I'll try to run this behavior and report here .

ikwattro commented 9 years ago

Thank you very much. This has been fixed in #32 . Release 2.1.1 coming.