Skip to content

Commit 7a48f15

Browse files
committed
1.4.2: Chg: Minimal PHP version is 8.1 & Fix: Added PHP extensions requirements: MBString, JSON and BCMath or GMP
1 parent 03dcbd5 commit 7a48f15

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

authclient/Keycloak.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,6 @@ protected function normalizeUserAttributes($attributes)
259259
isset($attributes['username'], $attributes['email'])
260260
&& $attributes['username'] === $attributes['email']
261261
) {
262-
/* @var $userModule \humhub\modules\user\Module */
263-
$userModule = Yii::$app->getModule('user');
264262
$attributes['username'] = BaseInflector::id2camel(
265263
BaseInflector::slug(
266264
$attributes['firstname'] . ' ' . $attributes['lastname']

docs/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
Changelog
22
=========
33

4-
Unreleased
4+
1.4.2 (Feb 19, 2024)
55
--------------------
66
- Enh: Added the new `requirements.php` file (https://github.com/humhub/humhub/issues/6831)
7+
- Chg: Require PHP 8.1 or later
8+
- Fix: Added PHP extensions requirements: `MBString`, `JSON` and `BCMath` or `GMP`
79

810
1.4.1 (Jan 18, 2024)
911
--------------------

docs/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ A new button "Keycloak" (which can be renamed) will appear on the login page.
2323

2424
## Requirements
2525

26-
- PHP 8.0 or later
26+
- PHP 8.1 or later
2727
- [PHP `allow_url_fopen`](https://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen) must be enabled
28+
- PHP extensions: `MBString`, `JSON` and `BCMath` or `GMP`
29+
- Depending on the algorithms you're using, other PHP extensions may be required (e.g. OpenSSL, Sodium). Full details: https://web-token.spomky-labs.com/introduction/pre-requisite
2830
- For users' groups and email synchronization: on Keycloak, users attributes must be writable (it can be tested by changing the email address of a user on Keycloak administration).
2931

3032
## Configuration

module.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"auth",
77
"keycloak"
88
],
9-
"version": "1.4.1",
9+
"version": "1.4.2",
1010
"humhub": {
1111
"minVersion": "1.15"
1212
},

requirements.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

3-
if (PHP_VERSION_ID < 80000) {
4-
return 'Please upgrade to PHP Version 8 or later!';
3+
if (PHP_VERSION_ID < 80100) {
4+
return 'Please upgrade to PHP Version 8.1 or later!';
55
}
66

77
if (PHP_VERSION_ID >= 90000) {
@@ -12,4 +12,16 @@
1212
return 'You need to enable allow_url_fopen in your PHP configuration on the server.';
1313
}
1414

15+
if (!extension_loaded('mbstring')) {
16+
return 'You need to enable MBString extension in your PHP configuration on the server.';
17+
}
18+
19+
if (!extension_loaded('json')) {
20+
return 'You need to enable JSON extension in your PHP configuration on the server.';
21+
}
22+
23+
if (!extension_loaded('gmp') && !extension_loaded('bcmath')) {
24+
return 'You need to enable GMP or BCMath extension in your PHP configuration on the server.';
25+
}
26+
1527
return null;

0 commit comments

Comments
 (0)