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

Use mysql version from server rather than mysql --version #176

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

grooverdan
Copy link
Contributor

mysql --version is the version of the client program and not necessarly the server version.

Get the version accurate for the reports generated.

prepare.php Outdated Show resolved Hide resolved
Copy link
Member

@pfefferle pfefferle left a comment

Choose a reason for hiding this comment

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

LGTM but not tested!

@grooverdan
Copy link
Contributor Author

Sample output:

{
    "php_version": "7.4.33",
    "php_modules": {
        "bcmath": false,
        "curl": "7.4.33",
        "filter": "7.4.33",
        "gd": "7.4.33",
        "libsodium": false,
        "mcrypt": false,
        "mod_xml": false,
        "mysqli": "7.4.33",
        "imagick": false,
        "gmagick": false,
        "pcre": "7.4.33",
        "xml": "7.4.33",
        "xmlreader": "7.4.33",
        "zlib": "7.4.33"
    },
    "system_utils": {
        "curl": "7.74.0 OpenSSL\/1.1.1n 1.2.11",
        "openssl": "1.1.1n  15 Mar 2022"
    },
    "os_name": "Linux",
    "os_version": "6.2.14-300.fc38.x86_64",
    "mysql_version": "10.11.2-MariaDB-1:10.11.2+maria~ubu2204"
}

Needs one more change however - putting file_put_contents( __DIR__ . '/tests/phpunit/build/logs/env.json' after fetching the the mysql version. I'll append this soon.

mysql --version is the version of the client program and not necessarly
the server version.

Get the version accurate for the reports generated.
@grooverdan
Copy link
Contributor Author

Was appened so the generated file env.json is:

cat env.json 
{
    "php_version": "8.2.10",
    "php_modules": {
        "bcmath": false,
        "curl": "8.2.10",
        "dom": "20031129",
        "exif": false,
        "filter": "8.2.10",
        "gd": "8.2.10",
        "gettext": false,
        "gmagick": false,
        "iconv": "8.2.10",
        "imagick": false,
        "intl": false,
        "libsodium": false,
        "libxml": "8.2.10",
        "mbstring": "8.2.10",
        "mcrypt": false,
        "mod_xml": false,
        "mysqli": "8.2.10",
        "pcre": "8.2.10",
        "xml": "8.2.10",
        "xmlreader": "8.2.10",
        "zlib": "8.2.10"
    },
    "system_utils": {
        "curl": "7.88.1 OpenSSL\/3.0.9 1.2.13",
        "openssl": "3.0.9 30 May 2023 (Library: 3.0.9 30 May 2023)"
    },
    "os_name": "Linux",
    "os_version": "6.4.12-200.fc38.x86_64",
    "mysql_version": "11.2.2-MariaDB-1:11.2.2+maria~ubu2204"
}

This is a combined version with #177 like master...grooverdan:phpunit-test-runner:all_changes.

@grooverdan
Copy link
Contributor Author

grooverdan commented Jan 23, 2024

reminder.

Closes https://core.trac.wordpress.org/ticket/58816

@javiercasares javiercasares merged commit ccfa589 into WordPress:master Feb 7, 2024
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.

None yet

3 participants