Skip to content

Fix mixed row inference for PDOStatement::bindValue() + execute()#772

Open
vaielab wants to merge 4 commits intostaabm:mainfrom
vaielab:bindValue-returnSupport
Open

Fix mixed row inference for PDOStatement::bindValue() + execute()#772
vaielab wants to merge 4 commits intostaabm:mainfrom
vaielab:bindValue-returnSupport

Conversation

@vaielab
Copy link
Copy Markdown

@vaielab vaielab commented Apr 8, 2026

Summary

Fix row inference for PDO statements that use bindValue() before execute().

The issue caused iterated rows to be inferred as mixed instead of the expected typed array shape.

Changes

  • add regression coverage for the bindValue() path
  • update PdoStatementExecuteTypeSpecifyingExtension to preserve row typing after execute()

Result

foreach ($stmt as $row) now keeps the expected inferred array type for supported bindValue() usages.

@vaielab
Copy link
Copy Markdown
Author

vaielab commented Apr 11, 2026

I think it's also related to #770

@staabm
Copy link
Copy Markdown
Owner

staabm commented Apr 12, 2026

thanks for the PR. I do atm not have time to look into it. I will come back to it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants