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: docs/en/appendices/5-4-migration-guide.md
+23-10Lines changed: 23 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,11 @@ version is reported as `unknown`), the header is omitted.
45
45
has changed from `select` to `subquery`. If you need the previous behavior,
46
46
explicitly set `'strategy' => 'select'` when defining associations.
47
47
See [Associations](../orm/associations#has-many-associations) for more details.
48
+
-`Model.afterSaveCommit` and `Model.afterDeleteCommit` events are now fired
49
+
when `save()` or `delete()` is called inside an outer transaction. Previously,
50
+
these events were silently suppressed. They are now deferred until the
51
+
outermost transaction commits, and discarded on rollback.
52
+
See [Table Objects](../orm/table-objects#aftersavecommit) for more details.
48
53
49
54
### Controller
50
55
@@ -72,6 +77,12 @@ version is reported as `unknown`), the header is omitted.
72
77
`league/container` implementation by setting `App.container` to `cake` inside your `config/app.php`.
73
78
See [Dependency Injection Container](../development/dependency-injection) for more details.
74
79
80
+
### Collection
81
+
82
+
- Added [`keys()`](../core-libraries/collections#keys) and [`values()`](../core-libraries/collections#values) methods for extracting keys or re-indexing values.
83
+
- Added [`implode()`](../core-libraries/collections#implode) method to concatenate elements into a string.
84
+
- Added [`when()`](../core-libraries/collections#when) and [`unless()`](../core-libraries/collections#unless) methods for conditional method chaining.
85
+
75
86
### Commands
76
87
77
88
- You can use `$this->io` and `$this->args` inside your commands to access input/output and argument objects
@@ -102,6 +113,9 @@ version is reported as `unknown`), the header is omitted.
102
113
- Added `FunctionsBuilder::stringAgg()` for portable string aggregation.
103
114
Translates to `STRING_AGG` or `GROUP_CONCAT` per driver.
104
115
See [Query Builder](../orm/query-builder#string-aggregation).
116
+
- Added `Connection::afterCommit()` to register callbacks that run after the
117
+
outermost transaction commits. Callbacks are discarded on rollback.
118
+
See [Database Basics](../orm/database-basics#aftercommit) for more details.
105
119
- Added `except()` and `exceptAll()` methods on `SelectQuery` for `EXCEPT`
106
120
and `EXCEPT ALL` set operations. `EXCEPT ALL` is supported on PostgreSQL
107
121
and recent MySQL/MariaDB versions; it is not supported on SQLite or SQL Server.
@@ -113,6 +127,12 @@ version is reported as `unknown`), the header is omitted.
113
127
`Index::BRIN`, `Index::HASH`) for these access methods.
114
128
See [Reading Indexes and Constraints](../orm/schema-system#reading-indexes-and-constraints).
115
129
130
+
### Http
131
+
132
+
- Added PSR-13 Link implementation with `Cake\Http\Link\Link` and `Cake\Http\Link\LinkProvider`
133
+
classes for hypermedia link support. Links added to responses are automatically emitted
134
+
as HTTP `Link` headers. See [Hypermedia Links](../controllers/request-response#hypermedia-links).
135
+
116
136
### I18n
117
137
118
138
-`Number::toReadableSize()` now uses decimal units (KB = 1000 bytes) by default.
@@ -124,11 +144,9 @@ version is reported as `unknown`), the header is omitted.
124
144
nested array format matching `contain()` syntax.
125
145
See [Converting Request Data into Entities](../orm/saving-data#converting-request-data-into-entities).
126
146
127
-
### Http
147
+
### Testsuite
128
148
129
-
- Added PSR-13 Link implementation with `Cake\Http\Link\Link` and `Cake\Http\Link\LinkProvider`
130
-
classes for hypermedia link support. Links added to responses are automatically emitted
131
-
as HTTP `Link` headers. See [Hypermedia Links](../controllers/request-response#hypermedia-links).
149
+
-`TestCase::mockModel()` has been added to allow mocking of model classes in tests using Mockery mocks.
132
150
133
151
### Utility
134
152
@@ -137,12 +155,7 @@ version is reported as `unknown`), the header is omitted.
137
155
path manipulation. See [Filesystem Utilities](../core-libraries/filesystem.md).
138
156
-`Security::encrypt()` can now be configured to use longer keys with separate encryption and authentication keys that are derived from the provided key.
139
157
You can set `Security.encryptWithRawKey` to enable this behavior. See [here](https://github.com/cakephp/cakephp/pull/19325) for more details.
140
-
141
-
### Collection
142
-
143
-
- Added [`keys()`](../core-libraries/collections#keys) and [`values()`](../core-libraries/collections#values) methods for extracting keys or re-indexing values.
144
-
- Added [`implode()`](../core-libraries/collections#implode) method to concatenate elements into a string.
145
-
- Added [`when()`](../core-libraries/collections#when) and [`unless()`](../core-libraries/collections#unless) methods for conditional method chaining.
158
+
- Added `Text::mask()` method which masks a portion of a string with a repeated character. See [Text Masking](../core-libraries/text.md#text-masking) for more details.
0 commit comments