Skip to content

Regression: PDO::FETCH_COLUMN were commented and marked as invalid, but it's not #189

Open
@fabiang

Description

@fabiang

BC Break Report

Q A
Version 2.11.1

Summary

#33 and version 2.11.1 introduced better checking for PDO::FETCH_* constants but marked the constant PDO::FETCH_COLUMN as invalid and commented it out. I guess this was done based on this comment: zendframework/zend-db#296 (comment)

I can't find any reason why it should be invalid in the documentation. And based on some research it should be supported by all PDO drivers.

I've also tested if and it returns an array where the values are the value from the selected field for each row. So it should work as expected (only tested with MySQL).

Previous behavior

PDO::FETCH_COLUMN was an valid fetch mode.

Current behavior

Laminas\Db\Adapter\Driver\Pdo\Result throws an exception when PDO::FETCH_COLUMN is used.

How to reproduce

Use any query and set fetch mode to PDO::FETCH_COLUMN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions