Skip to content

Fixed iteration tests#303

Open
p123-stack wants to merge 13 commits into
mainfrom
stub-iteration-1
Open

Fixed iteration tests#303
p123-stack wants to merge 13 commits into
mainfrom
stub-iteration-1

Conversation

@p123-stack
Copy link
Copy Markdown
Collaborator

No description provided.

@p123-stack p123-stack marked this pull request as ready for review May 4, 2026 07:25
@transistive transistive changed the base branch from stub-iteration to main May 4, 2026 10:34
* When one PULL yields RECORD(s) then FAILURE, {@see pull()} defers the {@see Neo4jException} to the next
* {@see BoltResult::fetchResults()} so records are delivered before the error (TestKit pull_2_end_error.script).
*/
private ?Neo4jException $deferredPullFailure = null;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this because of peek? Can you confirm peek is @nothrow against other drivers too? Mention it in the comment here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes — updated the $deferredPullFailure docblock: it’s not peek-only (RECORD+FAILURE in one PULL); peek uses the same path via lazy current(); end-of-stream peek is non-throwing (null), matching official drivers.

/** @var list<int> $ids */
$ids = $path->ids;
/** @var list<int> $indices */
$indices = $path->indices;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this backwards compatible? What happens in a Neo4j 4.4 setting?
Another option is that it is already handled in the bolt library; if so, we need to ensure the minimum version enforces that the Path class has actual indices. Otherwise, this package will break for users.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s backwards compatible because our minimum dependency is stefanak-michal/bolt:^7.4, where Path has indices and ids is just a deprecated alias to the same array. So Neo4j 4.4 isn’t an issue here; the only risk would be someone running an older Bolt lib than our constraint. If you want extra safety, we can fall back to ids when indices isn’t present

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants