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

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

Open
fabiang opened this issue Apr 14, 2021 · 1 comment · May be fixed by #216
Open

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

fabiang opened this issue Apr 14, 2021 · 1 comment · May be fixed by #216
Labels

Comments

@fabiang
Copy link

fabiang commented Apr 14, 2021

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.

@laminas-bot
Copy link
Contributor

This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering Committee.
If you have a security issue, please follow our security reporting guidelines.
If you wish to take on the role of maintainer, please nominate yourself

If you are looking for an actively maintained package alternative, we recommend:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants