yiisoft / yiisoft/db

Renew connection if it was closed

Open
#1,155 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

status:ready for adoption type:feature
Dominant language
PHP
Stars
216
Forks
51
Avg merge
3d 10h
Merged PRs (30d)
2

Description

Proposed new feature or change
  1. Collect params to bind
    https://github.com/yiisoft/db/blob/e753995673aafcbd97e84a489ee09e0b80ee811d/src/Driver/Pdo/AbstractPdoCommand.php#L77
  2. Pass CommandInterface ($this) to retryHandler() #1130
    https://github.com/yiisoft/db/blob/e753995673aafcbd97e84a489ee09e0b80ee811d/src/Driver/Pdo/AbstractPdoCommand.php#L210
  3. By default, try to renew connection and pdoStatement if the connection was closed
  4. Throw an exception if a transaction was started

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Driver/Pdo/AbstractPdoCommand.php at the parameter-binding reference and the retryHandler() call around line 210; also read issue #1130. Trace how CommandInterface, the connection, and the PDO statement are handled, then verify that the requested renewal behavior and transaction exception are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.