Skip to content

Conversation

@ruflin
Copy link
Owner

@ruflin ruflin commented Sep 29, 2025

Fixes Call to a member function hasConnection() on null in Bulk.php by replacing removed Connection API calls with a configuration-based approach.

The error was introduced in Elastica 7.3.2 when new code in src/Bulk.php (for retryOnConflict logic) attempted to use Client::hasConnection() and Client::getConnection(). These methods were part of the Elastica\Connection class which was removed in Elastica 8.0, but the problematic code was backported to 7.3.2 without adapting to the new configuration-based approach, leading to a fatal error. This PR applies the correct configuration-based logic already present in the 9.x branch.


Open in Cursor Open in Web

Co-authored-by: ruflin <ruflin@elastic.co>
@cursor
Copy link

cursor bot commented Sep 29, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Co-authored-by: ruflin <ruflin@elastic.co>
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.

3 participants