Closed tim-hanssen closed 1 month ago
Hello @tim-hanssen. Could you provide a code sample I could use to reproduce and investigate this issue?
We just released 3.1.1. This should address the "implicit conversion" warning you get. Let us know if this version fixes your issue as we weren't able to reproduce it
Hey @exaby73 so the warning is indeed fixed in 3.1.1, but the double loop is still the same.
It happens after we retrieve the object from a cache layer in a clean Laravel install. I guess it's serializing the class so it can be stored into redis.
$data = Cache::remember('save-me', 604800, function () {
// THIS RETURNS a Laudis\Neo4j\Databags\SummarizedResult class.
});
I found the issue to be serialization/deserialization of the CypherList class causing results to be double. I'm working on a fix and will update soon
@tim-hanssen 3.1.2 should be the fix you're looking for :) Thanks for bringing this up so we could catch it early
Upgrading from 3.0 to 3.1 breaks our implementation. All results are returned double (except result 0, the first) when foreaching a
Laudis\Neo4j\Databags\SummarizedResult
.If instead of directly foreaching we use the ->toArray() on the object, the number of rows is back to normal.
Expected behavior Foreach of the object results in the same result as toArray() and not double them.
Desktop (please complete the following information):
We also receive a PHP warning from a linked class: