Remove MYSQLND_MINIMUM_VERSION and LIBMYSQLCLIENT_MINIMUM_VERSION checks

Created on 3 April 2024, 4 months ago
Updated 19 April 2024, 3 months ago

Problem/Motivation

in #3421175: Update INSTALL.txt and hook_requirements() etc. with Drupal 11 platform requirements β†’ catch pointed out that MYSQLND_MINIMUM_VERSION or LIBMYSQLCLIENT_MINIMUM_VERSION haven't been changes since 2015. He also questioned if they are still needed.

Steps to reproduce

Proposed resolution

TBA

Remaining tasks

Discuss

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

10.3 ✨

Component
BaseΒ  β†’

Last updated about 14 hours ago

Created by

πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @quietone
  • πŸ‡¬πŸ‡§United Kingdom catch

    This was originally added in #2529188: Provide better error handling for MySQL client and server utf8mb4 incompatibility β†’ , utf8mb4 has been around for a very long time now, so I wonder whether it's possible to have a client installed that could run into this error any more. Maybe we can just drop the constants and supporting code.

  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    I am pretty sure we could drop this now, surely nobody is building PHP 8.3 linked to much older versions of mysqlnd or libmysqlclient.

  • Merge request !7306remove constants β†’ (Open) created by quietone
  • Pipeline finished with Success
    4 months ago
    Total: 683s
    #136243
  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand

    In anticipation of agreement to remove them I made an MR

  • Status changed to Needs work 4 months ago
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    I also expect that we can drop it but I did not validate that.

    There is also still this error message produced that is misleading (specifies a much lower version of MySQL):

            // Detect utf8mb4 incompatibility.
            if ($e->getCode() == Connection::UNSUPPORTED_CHARSET || ($e->getCode() == Connection::SQLSTATE_SYNTAX_ERROR && $e->errorInfo[1] == Connection::UNKNOWN_CHARSET)) {
              $this->fail(t('Your MySQL server and PHP MySQL driver must support utf8mb4 character encoding. Make sure to use a database system that supports this (such as MySQL/MariaDB/Percona 5.5.3 and up), and that the utf8mb4 character set is compiled in. See the <a href=":documentation" target="_blank">MySQL documentation</a> for more information.', [':documentation' => 'https://dev.mysql.com/doc/refman/5.0/en/cannot-initialize-character-set.html']));
    

    It may still be possible to configure a DB without this? If that is the case, I would remove the very old version number reference, since Drupal 11 is by far not compatible with that anyway, so having MySQL 5.5.4 would not help users, despite what the message says.

  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    libmysqlclient 5.5.3 shipped with MySQL 5.5.3 which was released in 2010 and was end of life in 2018, so in my opinion we can drop support for this now given that we do not support old PHP or database versions.

    The mysqlnd check can also be dropped, the PHP version and mysqlnd versions are the same since PHP 7.4: https://github.com/php/php-src/commit/37043e07dfa57dbc567b7217ca7aa25a13...

  • Status changed to Needs review 4 months ago
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Also removed the utf8mb4 fallback code noted in #6 given we don't support those versions any more.

  • Pipeline finished with Failed
    4 months ago
    Total: 180s
    #136403
  • Pipeline finished with Success
    4 months ago
    #136410
  • Status changed to RTBC 4 months ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    Very nice indeed.

  • Status changed to Needs work 4 months ago
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Left a comment on the MR.

  • Status changed to Needs review 4 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone New Zealand
  • Status changed to RTBC 4 months ago
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Review was addressed. clientVersion() isn't part of the interface, isn't used in core, but GitLab search finds many false positives so I can't be sure it's unused in contrib - it isn't doing any harm by keeping it anyway.

  • Status changed to Fixed 4 months ago
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Committed and pushed 28d407eb05 to 11.x and 1a4aa4ea0e to 10.3.x. Thanks!

    Backported to 10.3.x because the minimum version of PHP is 8.1 there and too new for this stuff too.

    • alexpott β†’ committed 1a4aa4ea on 10.3.x
      Issue #3437786 by quietone, longwave, catch, GΓ‘bor Hojtsy: Remove...
    • alexpott β†’ committed 28d407eb on 11.x
      Issue #3437786 by quietone, longwave, catch, GΓ‘bor Hojtsy: Remove...
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024