Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle MySQL error code 4031 from PHP 8.4 #6363

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

mbeccati
Copy link
Contributor

Q A
Type improvement
Fixed issues Prevents future issues ;-)

Summary

PHP 8.4 will support a new error code 4031 in mysqlnd when the connection is dropped due to timeouts.

It has been introduced in:
mysql/mysql-server@14508bb

And PHP 8.4 will support it:
php/php-src#13618

The PR gets the test suite green again (mysqli + pdo_mysql). I have used 4.0.x as base, but feel free to change according to your preferences.

@derrabus
Copy link
Member

We need to target the 3.8.x branch with this change. Did I understand this correctly: we need the change in PHP which has not been merged yet?

@mbeccati
Copy link
Contributor Author

@derrabus ok I will update the PR to target 3.8.

Basically the change had been merged from PHP 8.2 up, but it was breaking DBAL properly recognising the connection being lost. As it is a BC-breaking change, it has been reverted and it will be soon merged to master only.

@mbeccati mbeccati changed the base branch from 4.0.x to 3.8.x April 22, 2024 15:07
Copy link

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Jul 22, 2024
@derrabus
Copy link
Member

And that's my fault, dear bot.

@derrabus derrabus removed the Stale label Jul 22, 2024
@derrabus derrabus added this to the 3.8.7 milestone Jul 22, 2024
@derrabus
Copy link
Member

I'm going to merge this PR although the corresponding PR for PHP is still open. Worst-case would be that we're able to handle an error code that PHP won't ever raise. That should not break anything, I suppose.

@derrabus derrabus merged commit 349c833 into doctrine:3.8.x Jul 22, 2024
92 checks passed
derrabus added a commit to derrabus/dbal that referenced this pull request Jul 23, 2024
* 3.8.x:
  Properly handle MySQL error code 4031 from PHP 8.4 (doctrine#6363)
  CI: Add MySQL 9, reduce test matrix (doctrine#6462)
  Complete sentence
  mariadb: add nightly workflow to facilitate mariadb "nightlies" (doctrine#6435)
derrabus added a commit to derrabus/dbal that referenced this pull request Jul 23, 2024
* 3.8.x:
  Properly handle MySQL error code 4031 from PHP 8.4 (doctrine#6363)
  CI: Add MySQL 9, reduce test matrix (doctrine#6462)
  Complete sentence
  mariadb: add nightly workflow to facilitate mariadb "nightlies" (doctrine#6435)
derrabus added a commit to derrabus/dbal that referenced this pull request Jul 23, 2024
* 3.8.x:
  Properly handle MySQL error code 4031 from PHP 8.4 (doctrine#6363)
  CI: Add MySQL 9, reduce test matrix (doctrine#6462)
  Complete sentence
derrabus added a commit to derrabus/dbal that referenced this pull request Jul 23, 2024
* 4.0.x:
  Properly handle MySQL error code 4031 from PHP 8.4 (doctrine#6363)
  CI: Add MySQL 9, reduce test matrix (doctrine#6462)
  Fix update/delete aliases in documentation (doctrine#6470)
  Complete sentence
  Docs: update custom platform example to use middlewares (doctrine#6460)
  ci: nightly - php-8.1 only + workflow_dispatch
  ci: nightly - php-8.1 min version (doctrine#6457)
  mariadb: add nightly workflow to facilitate mariadb "nightlies" (doctrine#6435)
derrabus added a commit to derrabus/dbal that referenced this pull request Jul 23, 2024
* 4.1.x:
  Properly handle MySQL error code 4031 from PHP 8.4 (doctrine#6363)
  Add SmallFloat type (doctrine#6471)
  CI: Add MySQL 9, reduce test matrix (doctrine#6462)
  Fix update/delete aliases in documentation (doctrine#6470)
  Complete sentence
  Docs: update custom platform example to use middlewares (doctrine#6460)
  ci: nightly - php-8.1 only + workflow_dispatch
  ci: nightly - php-8.1 min version (doctrine#6457)
  mariadb: add nightly workflow to facilitate mariadb "nightlies" (doctrine#6435)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants