Skip to content

Fix 5.4 docs for afterSaveCommit/afterDeleteCommit, document Connection.afterCommit event - #8349

Open
dereuromark wants to merge 1 commit into
5.xfrom
fix/5.4-commit-events-docs
Open

dereuromark wants to merge 1 commit into
5.xfrom
fix/5.4-commit-events-docs

Conversation

@dereuromark

Copy link
Copy Markdown
Member

Closes #8348.

The deferred dispatch of Model.afterSaveCommit and Model.afterDeleteCommit inside an outer transaction (cakephp/cakephp#19383) was reverted in cakephp/cakephp#19417 before 5.4.0 shipped. The docs still described it as a 5.4 change.

  • appendices/5-4-migration-guide.md: removed the behavior-change bullet and added the Connection.afterCommit event under new Database features.
  • orm/table-objects.md: both events are back to the 5.3 wording (not triggered when a transaction was started before save()/delete()), without the "Changed in 5.4.0" boxes. Each now links to the connection-level hooks.
  • orm/database-basics.md: new "Connection.afterCommit Event" section for the event added in Add Connection.afterCommit event for outermost-commit hooks cakephp#19429.

The Japanese pages never received the deferral text, so they are unchanged.

The deferred dispatch of Model.afterSaveCommit and Model.afterDeleteCommit
inside an outer transaction was reverted before 5.4.0 shipped, but the
docs still described it. Restore the 5.3 wording (the events are not
triggered when a transaction was started before save/delete), drop the
"Changed in 5.4.0" notes and the migration guide bullet.

Document the Connection.afterCommit event, which is the supported hook
for reacting to the outermost commit, and link it from both events.
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.

5.4 docs: afterSaveCommit/afterDeleteCommit deferral was reverted

1 participant