From 05f5b74709c48716cab5e493ee3cca9a414de853 Mon Sep 17 00:00:00 2001 From: Nora Reidy Date: Fri, 11 Oct 2024 13:22:01 -0400 Subject: [PATCH 1/2] DOCSP-43615: raw() field conversions (#3172) * DOCSP-43615: raw() ID conversion * utcdatetime * wording --- docs/upgrade.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/upgrade.txt b/docs/upgrade.txt index 3032b8e1e..d730435fa 100644 --- a/docs/upgrade.txt +++ b/docs/upgrade.txt @@ -114,12 +114,19 @@ This library version introduces the following breaking changes: - In query results, the library converts BSON ``UTCDateTime`` objects to ``Carbon`` date classes, applying the default timezone. + In v5.1, the library also performs this conversion to the ``Model::raw()`` + method results before hydrating a Model instance. + - ``id`` is an alias for the ``_id`` field in MongoDB documents, and the library automatically converts between ``id`` and ``_id`` when querying data. The query result object includes an ``id`` field to represent the document's ``_id`` field. Because of this behavior, you cannot have two separate ``id`` and ``_id`` fields in your documents. + In v5.1, the library also performs this conversion to the ``Model::raw()`` + method results before hydrating a Model instance. When passing a complex query + filter, use the ``DB::where()`` method instead of ``Model::raw()``. + - Removes support for the ``$collection`` property. The following code shows how to assign a MongoDB collection to a variable in your ``User`` class in older versions compared to v5.0: From 99af0359da6dcf32f9e16e650693f9476b469084 Mon Sep 17 00:00:00 2001 From: Nora Reidy Date: Fri, 11 Oct 2024 13:33:13 -0400 Subject: [PATCH 2/2] DOCSP-44172: Laravel Herd (#3171) Adds information about Laravel Herd to the quick start --- docs/quick-start/download-and-install.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/quick-start/download-and-install.txt b/docs/quick-start/download-and-install.txt index 5e9139ec8..f4e480ce5 100644 --- a/docs/quick-start/download-and-install.txt +++ b/docs/quick-start/download-and-install.txt @@ -28,6 +28,19 @@ Download and Install the Dependencies Complete the following steps to install and add the {+odm-short+} dependencies to a Laravel web application. +.. tip:: + + As an alternative to the following installation steps, you can use Laravel Herd + to install MongoDB and configure a Laravel MongoDB development environment. For + more information about using Laravel Herd with MongoDB, see the following resources: + + - `Installing MongoDB via Herd Pro + `__ in the Herd + documentation + - `Laravel Herd Adds Native MongoDB Support + `__ + in the MongoDB Developer Center + .. procedure:: :style: connected