Skip to content

Document Connection::afterCommit() and deferred commit events#8281

Open
jamisonbryant wants to merge 2 commits into5.nextfrom
docs/connection-after-commit
Open

Document Connection::afterCommit() and deferred commit events#8281
jamisonbryant wants to merge 2 commits into5.nextfrom
docs/connection-after-commit

Conversation

@jamisonbryant
Copy link
Copy Markdown

@jamisonbryant jamisonbryant commented Apr 14, 2026

Summary

Documentation for Connection::afterCommit() and the updated behavior of afterSaveCommit/afterDeleteCommit events introduced in cakephp/cakephp#19383.

Major Changes

  • Added new afterCommit section to database-basics.md documenting Connection::afterCommit() with API signature, usage examples (basic and nested transactions), and explanation of immediate-execution semantics outside transactions
  • Updated afterSaveCommit section in table-objects.md to document the new deferred behavior when called inside outer transactions, replacing the previous "not triggered" language
  • Updated afterDeleteCommit section in table-objects.md with the same deferred behavior documentation
  • Added Changed in version 5.4.0 annotations to both event sections
  • Added entries to the 5.4 migration guide under Behavior Changes (ORM) and New Features (Database)

Minor Changes

  • Fixed typo in afterDeleteCommit description ("has been is committed" -> "has been committed")

Work Remaining

None.

Test Plan

  • Verify database-basics.html#aftercommit renders correctly with code examples and version annotation
  • Verify table-objects.html#aftersavecommit shows updated behavior description and version annotation
  • Verify table-objects.html#afterdeletecommit shows updated behavior description and version annotation
  • Verify 5.4 migration guide lists the behavior change and new feature

jamisonbryant added a commit to cakephp/cakephp that referenced this pull request Apr 14, 2026
Add Connection::afterCommit() to fix suppressed afterSaveCommit/afterDeleteCommit in outer transactions

Docs here: cakephp/docs#8281
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant