Skip to content

::getColumnMeta() for JSON-column in MySQL #20122

Closed

Description

@lon9man

Description

The following code:

<?php
$metadata = $pdoStatement->getColumnMeta($i);

Resulted in this output:

Image

But I expected this output instead:

expect to see something possible to use inside PHP (native_type or something else).

6 years old bug here: https://bugs.php.net/bug.php?id=78596

how about fix?

PHP Version

PHP 8.0.30 (cli) (built: Nov 21 2023 16:17:51) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.30, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.30, Copyright (c), by Zend Technologies
    with Xdebug v3.2.2, Copyright (c) 2002-2023, by Derick Rethans

Operating System

Debian GNU/Linux 11 (bullseye)

Activity

  1. self-assigned this
    on Oct 11, 2025
  2. added a commit that references this issue on Oct 11, 2025
    df0c7af
  3. lon9man commented on Oct 15, 2025

    @lon9man
    Author

    @nielsdos hello, can you answer on the questions:

    1. will this change give possibility to use native_type or it will need something else?
    2. where i can track release and for what extension/package/...?
    3. what is the estimate to release this change?
    4. will it be available for PHP 8.0, which we are using currently? it will be very helpful

    Thanks!

  4. ndossche commented on Oct 15, 2025

    @ndossche
    Member
    1. The PR I linked will make it possible to use native_type
    2. The change itself is in the lower level mysql driver, so it applies to pdo_mysql and mysqli.
    3. It will likely make it into the next releases of PHP 8.3.x and PHP 8.4.x. This is scheduled November 6th.
    4. No, the lowest supported bugfix version at this moment is PHP 8.3.x.
  5. lon9man commented on Oct 15, 2025

    @lon9man
    Author

    @nielsdos
    Thanks for the clarification and solution for the issue!

  6. added 4 commits that reference this issue on Oct 16, 2025
    4fa4509
    02bd332
    984416d
    94284df
  7. lon9man commented on Nov 17, 2025

    @lon9man
    Author

    Hello @ndossche, you have announced release to November 6 for the current issue, but i don't see it.
    what is the state of things?

    i see release 8.3.27 (3 weeks ago) - but this issue is absent in the changelog. am i missing something?

    thanks!

  8. ndossche commented on Nov 17, 2025

    @ndossche
    Member

    Hi @lon9man

    It appears I was wrong about the release date.
    The item is included here:

    php-src/NEWS

    Line 88 in 46a15ed

    . Fixed bug GH-20122 (getColumnMeta() for JSON-column in MySQL). (nielsdos)
    so in PHP 8.3.28 which will release on November 20.

    I based myself off of the release date of the previous PHP 8.4 release + 4 weeks.
    Here it seems that the wrong date was entered for the 8.4 release:

    php-src/NEWS

    Line 160 in 9db074d

    09 Oct 2025, PHP 8.4.14

    cc @SakiTakamachi The listed release date should be that of the GA not the RC of the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions