You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide_src/source/changelogs/v4.4.0.rst
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,35 @@ or more was specified. See :ref:`upgrade-440-uri-setsegment`.
29
29
30
30
The next segment (``+1``) of the current last segment can be set as before.
31
31
32
+
.. _v440-factories:
33
+
34
+
Factories
35
+
---------
36
+
37
+
Passing Fully Qualified Classname
38
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
+
40
+
Now ``preferApp`` works only when you request
41
+
:ref:`a classname without a namespace <factories-passing-classname-without-namespace>`.
42
+
43
+
For example, when you call ``model(\Myth\Auth\Models\UserModel::class)`` or
44
+
``model('Myth\Auth\Models\UserModel')``:
45
+
46
+
- before:
47
+
48
+
- returns ``App\Models\UserModel`` if exists and ``preferApp`` is true (default)
49
+
- returns ``Myth\Auth\Models\UserModel`` if exists and ``preferApp`` is false
50
+
51
+
- after:
52
+
53
+
- returns ``Myth\Auth\Models\UserModel`` even if ``preferApp`` is true (default)
54
+
- returns ``App\Models\UserModel`` if you define ``Factories::define('models', 'Myth\Auth\Models\UserModel', 'App\Models\UserModel')`` before calling the ``model()``
55
+
56
+
Property Name
57
+
^^^^^^^^^^^^^
58
+
59
+
The property ``Factories::$basenames`` has been renamed to ``$aliases``.
60
+
32
61
.. _v440-interface-changes:
33
62
34
63
Interface Changes
@@ -164,6 +193,8 @@ Others
164
193
- **RedirectException:** can also take an object that implements ResponseInterface as its first argument.
0 commit comments