Skip to content

FetchMode::GROUP, FetchMode::UNIQUE are missing #4206

@ZaneCEO

Description

@ZaneCEO

BC Break Report

Q A
BC Break yes
Version 2.7

Summary

My code spits this: PHP Deprecated: Using a PDO fetch mode or their combination (196610 given) is deprecated and will cause an error in Doctrine DBAL 3.0, so I'm trying to upgrade

This should be the part where my code is unfit:

$stmt->fetchAll(\PDO::FETCH_GROUP|\PDO::FETCH_UNIQUE|\PDO::FETCH_ASSOC)

As suggested in the upgrade.MD, I tried to replace it with this:

$stmt->fetchAll(FetchMode::GROUP|FetchMode::UNIQUE|FetchMode::ASSOCIATIVE)

But it doesn't work, because the FetchMode class doesn't define neither FetchMode::GROUP nor FetchMode::UNIQUE

What am I missing here?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions