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/book/v5/upgrading/UPGRADE-5.3.md
+1-14Lines changed: 1 addition & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@
4
4
5
5
Dotkernel API 5.3 is a minor release. As such, no significant backward compatibility breaks are expected,
6
6
with minor backward compatibility breaks being prefixed in this document with `[BC BREAK]`.
7
-
8
7
This document only covers upgrading from version 5.2.
9
8
10
9
## Table of Contents
@@ -34,9 +33,7 @@ Following PHPStan's introduction in version 5.2 for the reasons described on the
34
33
### Update anonymization
35
34
36
35
By default, Dotkernel API uses "soft delete" for it's `User` entities in order to preserve the database entries.
37
-
38
36
Anonymization is used to make sure any sensitive information is scrubbed from the system, with the `User`'s `identity`, `email`, `firstName` and `lastName` properties being overwritten by a unique placeholder.
39
-
40
37
Version 5.3 is adding an optional suffix from a configuration file, from where it can be used anywhere in the application.
41
38
42
39
* Add the `userAnonymizeAppend` key to the returned array in `config/autoload/local.php`, as well as to the distributed`config/autoload/local.php.dist`
### Update User status and remove isDeleted properties
65
62
66
63
Up to and including version 5.2, the `User` entity made use of the `UserStatusEnum` to mark the account status (`active` or `inactive`) and marked deleted accounts with the `isDeleted` property.
67
-
68
64
Starting from version 5.3 the `isDeleted` property has been removed because, by default, there is no use in having both it and the status property.
69
-
70
65
As such, a new `Deleted` case for `UserStatusEnum` is now used to mark a deleted account and remove the redundancy.
71
66
72
67
*[BC Break] Remove the `isDeleted` property from the `User` class, alongside all usages, as seen in the [pull request](https://github.com/dotkernel/api/pull/359/files)
73
68
* Add a new "deleted" case to `UserStatusEnum`, which is to be used instead of the previous `isDeleted` property
74
-
* Update the database and it's migrations to reflect the new structure
69
+
* Update the database and its migrations to reflect the new structure
75
70
> The use of "isDeleted" was redundant in the default application, and as such was removed
76
71
>
77
72
> All default methods are updated, but any custom functionality using "isDeleted" will require refactoring
78
73
79
74
### Update `dotkernel/dot-mail` to version 5.0
80
75
81
76
Dotkernel API uses `dotkernel/dot-mail` to handle the mailing service, which in versions older than 5.0 was based on `laminas/laminas-mail`.
82
-
83
77
Due to the deprecation of `laminas/laminas-mail`, a decision was made to switch `dot-mail` to using `symfony/mailer` starting from version 5.0.
84
-
85
78
To make the API more future-proof, the upgrade to the new version of `dot-mail` was necessary.
86
-
87
79
The default usage of the mailer remains unchanged, with the only required updates being to configuration, as described below:
88
80
89
81
* Bump `dotkernel/dot-mail` to "^5.0" in `composer.json`
@@ -109,7 +101,6 @@ Installing the API via `composer create-project` is not recommended, and because
109
101
### Add post install script
110
102
111
103
To make installing the API less of a hassle, a new post installation script was added.
112
-
113
104
This script generates all the configuration files required by default, leaving the user to simply complete the relevant data.
114
105
115
106
> Note that the script will not overwrite existing configuration files, preserving any user data
0 commit comments