From 4eb12a0fe2e9a3ff5273bcc2a17619e98228e7ec Mon Sep 17 00:00:00 2001 From: Johnny Shields <27655+johnnyshields@users.noreply.github.com> Date: Wed, 7 May 2025 02:26:51 +0900 Subject: [PATCH 1/3] Remove "embedded callbacks removed" from 9.0 release notes --- source/whats-new.txt | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index c98494f..c24abaf 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -148,23 +148,6 @@ Removal of Deprecated Class ``Mongoid::Errors::InvalidStorageParent`` The deprecated class ``{+odm+}::Errors::InvalidStorageParent`` has been removed. -``around_*`` Callbacks for Embedded Documents are Ignored -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -{+odm+} v8.x and older allow user to define ``around_*`` callbacks for embedded -documents. Starting in v9.0, these callbacks are ignored and will not be executed. -A warning will be printed to the console if such callbacks are defined. - -If you want to restore the old behavior, you can set -``Mongoid.around_embedded_document_callbacks`` to true in your application. - -.. note:: - - Enabling ``around_*`` callbacks for embedded documents is not recommended - as it may cause ``SystemStackError`` exceptions when a document has many - embedded documents. See `MONGOID-5658 - `__ for more details. - ``for_js`` Method is Deprecated ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From e506eac2ab8f1164ed00b9022328cedac872c27c Mon Sep 17 00:00:00 2001 From: Johnny Shields <27655+johnnyshields@users.noreply.github.com> Date: Wed, 7 May 2025 04:22:45 +0900 Subject: [PATCH 2/3] Update whats-new.txt --- source/whats-new.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/whats-new.txt b/source/whats-new.txt index c24abaf..7c5a5bf 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -148,6 +148,23 @@ Removal of Deprecated Class ``Mongoid::Errors::InvalidStorageParent`` The deprecated class ``{+odm+}::Errors::InvalidStorageParent`` has been removed. +``around_*`` Callbacks for Embedded Documents are Ignored by Default +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +{+odm+} v8.x and older allow user to define ``around_*`` callbacks for embedded +documents. Starting in v9.0, by default, these callbacks are ignored and will +not be executed. A warning will be printed to the console if such callbacks are defined. + +If you want to restore the old behavior, you can set +``Mongoid.around_callbacks_for_embeds`` to true in your application. + +.. note:: + + Enabling ``around_*`` callbacks for embedded documents is not recommended + as it may cause ``SystemStackError`` exceptions when a document has many + embedded documents. See `MONGOID-5658 + `__ for more details. + ``for_js`` Method is Deprecated ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From f711dd8bd78389181ba911cd2a9a12f84b889676 Mon Sep 17 00:00:00 2001 From: Johnny Shields <27655+johnnyshields@users.noreply.github.com> Date: Wed, 7 May 2025 04:24:48 +0900 Subject: [PATCH 3/3] Linter doesn't know what an oxford comma is --- source/whats-new.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index 7c5a5bf..8a51fd3 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -152,7 +152,7 @@ removed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {+odm+} v8.x and older allow user to define ``around_*`` callbacks for embedded -documents. Starting in v9.0, by default, these callbacks are ignored and will +documents. Starting in v9.0, by default these callbacks are ignored and will not be executed. A warning will be printed to the console if such callbacks are defined. If you want to restore the old behavior, you can set