Skip to content

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

Merged
staabm merged 7 commits intostaabm:mainfrom
vaielab:bindValue-returnSupport
Apr 17, 2026
Merged

Fix mixed row inference for PDOStatement::bindValue() + execute()#772
staabm merged 7 commits intostaabm:mainfrom
vaielab:bindValue-returnSupport

Conversation

@vaielab
Copy link
Copy Markdown
Contributor

@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
Contributor 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.

@staabm staabm force-pushed the bindValue-returnSupport branch from dc55e81 to febb8e4 Compare April 17, 2026 12:17
@staabm staabm force-pushed the bindValue-returnSupport branch from febb8e4 to fc0205b Compare April 17, 2026 12:26
Comment thread src/Extensions/PdoStatementExecuteTypeSpecifyingExtension.php
Comment thread tests/default/data/pdo-stmt-execute.php Outdated
@staabm staabm merged commit 42562f5 into staabm:main Apr 17, 2026
27 of 28 checks passed
@staabm
Copy link
Copy Markdown
Owner

staabm commented Apr 17, 2026

thank you!

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