Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

VALID_FETCH_MODES lists three entries that are not usable fetch modes

Aberta
#199 0 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@simon-mundy já está trabalhando nisso.

Desde 29/9/2026.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

bug confirmed

Result::VALID_FETCH_MODES contains three entries that cannot work through fetch():

  • PDO::FETCH_FUNC — PDO permits it only in fetchAll(). Result only ever calls fetch(), so it always raises ValueError: Can only use PDO::FETCH_FUNC in PDOStatement::fetchAll().
  • PDO::FETCH_PROPS_LATE (1048576) and PDO::FETCH_CLASSTYPE (262144) — bit flags to be OR'd with FETCH_CLASS, as the comments beside them in the source already note. Passed alone, PDO ignores them and falls back to the default mode, so accepting them as standalone modes is misleading.

Reproduced against SQLite in memory. ResultSetFetchModeTest covers all three: FETCH_FUNC under the modes that throw, the two flags under the modes that silently fall back.

Removing them is a BC break, so it wants a deprecation rather than a straight removal.

Linguagem predominante
PHP
Estrelas
18
Forks
8
Merge médio
6d 11h
PRs com merge (30d)
14

Preparar o ambiente

  • Inclui um Dockerfile ou arquivo Docker Compose
  • Sem modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de php-db/phpdb

Todas as issues de php-db/phpdb

Issues semelhantes

Mais issues de PHP

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.