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
Following PHPStan's introduction in version 5.2 for the reasons described on the [Dotkernel blog](https://www.dotkernel.com/php-development/static-analysis-replacing-psalm-with-phpstan/) a minor issue has cropped up:
29
+
with the default `memory_limit=128M` on our WSL containers, PHPStan runs out of memory
27
30
28
31
* Add the `--memory-limit 1G` option to the `static-analysis` script found in `composer.json`
29
-
> With the default `memory_limit=128M` on our WSL containers, PHPStan runs out of memory
30
-
>
31
32
> Note that you can set the memory limit to a value of your choosing, with a recommended minimum of 256M
32
33
33
34
### Update anonymization
34
35
36
+
By default, Dotkernel API uses "soft delete" for it's `User` entities in order to preserve the database entries.
37
+
38
+
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
+
Version 5.3 is adding an optional suffix from a configuration file, from where it can be used anywhere in the application.
41
+
35
42
* 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
58
65
66
+
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
+
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
+
As such, a new `Deleted` case for `UserStatusEnum` is now used to mark a deleted account and remove the redundancy.
71
+
59
72
*[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)
60
73
* Add a new "deleted" case to `UserStatusEnum`, which is to be used instead of the previous `isDeleted` property
61
74
* Update the database and it's migrations to reflect the new structure
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
+
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
+
To make the API more future-proof, the upgrade to the new version of `dot-mail` was necessary.
86
+
87
+
The default usage of the mailer remains unchanged, with the only required updates being to configuration, as described below:
88
+
68
89
* Bump `dotkernel/dot-mail` to "^5.0" in `composer.json`
69
90
* As the mail configuration file is now directly copied from the vendor via [script](#add-post-install-script), remove the existing `config/autoload/mail.global.php[.dist]` file(s)
70
91
* Update the content for each of these configuration files to reflect the new structure from [dotkernel/dot-mail](https://github.com/dotkernel/dot-mail/blob/5.0/config/mail.global.php.dist)
To make installing the API less of a hassle, a new post installation script was added.
112
+
113
+
This script generates all the configuration files required by default, leaving the user to simply complete the relevant data.
114
+
115
+
> Note that the script will not overwrite existing configuration files, preserving any user data
116
+
>
117
+
> In case the structure of a configuration file needs updating (such as [mail.local.php](#update-dotkerneldot-mail-to-version-50) in this update), simply running the script *will not* make the changes
118
+
88
119
* Add `bin/composer-post-install-script.php` to automate the post installation copying of distributed configuration files
89
120
* Add the following under the `scripts` key in `composer.json`:
* Change `COMPOSER_DEV_MODE=1` to the correct syntax `COMPOSER_DEV_MODE: 1`
195
+
The Qodana code quality workflow has changed its default PHP version to 8.4, which is unsupported by Dotkernel API, resulting in errors.
129
196
130
-
### Update Qodana configuration
197
+
The issue was fixed by restricting Qodana to the supported PHP versions.
131
198
132
199
* Update `.github/workflows/qodana_code_quality.yml`, specifying the supported PHP versions by adding the `strategy` key:
133
200
@@ -155,5 +222,9 @@ with:
155
222
156
223
### Remove laminas/laminas-http
157
224
225
+
Prior to version 5.3, `laminas/laminas-http` was only used in 2 test files to assert if correct status codes were returned.
226
+
227
+
This dependency was removed, as the usage in tests was replaced with the existing `StatusCodeInterface`.
228
+
158
229
* Remove `laminas/laminas-http` from `composer.json`
159
230
* Replace all uses of `Laminas\Http\Response` with `Fig\Http\Message\StatusCodeInterface` in `AuthorizationMiddlewareTest.php` and `ContentNegotiationMiddlewareTest.php`
0 commit comments