Skip to content

Add #[\NoDiscard] to result-oriented DBAL APIs#328

Merged
hrach merged 4 commits intomainfrom
copilot/add-nodiscard-attribute
Apr 14, 2026
Merged

Add #[\NoDiscard] to result-oriented DBAL APIs#328
hrach merged 4 commits intomainfrom
copilot/add-nodiscard-attribute

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 13, 2026

  • Investigate CI failure: PHP 8.5 #[\\NoDiscard] emits E_USER_WARNING before function executes, Nette Tester converts it to a wrong-type exception inside Assert::exception / Assert::throws closures
  • Add $_ = in ResultTest.phpt for fetchField() and fetchPairs() call sites inside exception-testing closures
  • Add $_ = in result.buffering.phpt for fetchPairs() call site inside exception-testing closure
  • Add $_ = in connection.postgres.phpt for getLastInsertedId() call site inside exception-testing closure
  • Validate syntax of changed files

Copilot AI linked an issue Apr 13, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add NoDiscard attribute to relevant API locations Add #[\NoDiscard] to result-oriented DBAL APIs Apr 13, 2026
Copilot AI requested a review from hrach April 13, 2026 20:20
Comment thread src/Result/Result.php Outdated
Comment thread src/Connection.php Outdated
Comment thread src/IConnection.php Outdated
Agent-Logs-Url: https://github.com/nextras/dbal/sessions/ca1d7294-6f6f-459d-be6f-4d7b8ff148f1

Co-authored-by: hrach <284263+hrach@users.noreply.github.com>
Copilot AI requested a review from hrach April 13, 2026 21:08
Copilot AI requested a review from hrach April 14, 2026 16:52
@hrach hrach marked this pull request as ready for review April 14, 2026 16:55
Copilot stopped work on behalf of hrach due to an error April 14, 2026 17:03
Copilot AI requested a review from hrach April 14, 2026 17:03
@hrach hrach merged commit 6b6f592 into main Apr 14, 2026
12 of 13 checks passed
@hrach hrach deleted the copilot/add-nodiscard-attribute branch April 14, 2026 18:37
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.

Implement #[NoDiscard]

2 participants