Skip to content

Commit d5a8fb4

Browse files
committed
[!!!][FEATURE] Added TYPO3 v14 compatibility
Refs #107 Signed-off-by: Torben Hansen <derhansen@gmail.com>
1 parent 989a0ae commit d5a8fb4

9 files changed

Lines changed: 43 additions & 45 deletions

File tree

.Build/composer.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,26 @@
99
],
1010
"require": {
1111
"derhansen/fe_change_pwd": "@dev",
12-
"typo3/cms-core": "^13.4",
12+
"typo3/cms-core": "^14.0",
1313
"ext-curl": "*",
1414
"ext-pdo": "*",
1515
"php": ">=8.2"
1616
},
1717
"require-dev": {
18-
"typo3/cms-backend": "^13.4",
19-
"typo3/cms-frontend": "^13.4",
20-
"typo3/cms-recordlist": "^13.4",
21-
"typo3/cms-extbase": "^13.4",
22-
"typo3/cms-fluid": "^13.4",
23-
"typo3/cms-install": "^13.4",
18+
"typo3/cms-backend": "^14.0",
19+
"typo3/cms-frontend": "^14.0",
20+
"typo3/cms-recordlist": "^14.0",
21+
"typo3/cms-extbase": "^14.0",
22+
"typo3/cms-fluid": "^14.0",
23+
"typo3/cms-install": "^14.0",
2424
"typo3/cms-composer-installers": "^5.0",
2525
"typo3/testing-framework": "^9.0",
2626
"friendsofphp/php-cs-fixer": "^3.12.0",
27-
"saschaegerer/phpstan-typo3": "^1.1.2",
27+
"phpstan/phpstan": "2.1.22",
2828
"phpstan/extension-installer": "^1.1"
2929
},
3030
"config": {
31+
"lock": false,
3132
"allow-plugins": {
3233
"typo3/class-alias-loader": true,
3334
"typo3/cms-composer-installers": true,

.Build/phpstan/phpstan.neon

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@ parameters:
1010
ignoreErrors:
1111
- identifier: missingType.iterableValue
1212
reportUnmatchedIgnoredErrors: true
13-
typo3:
14-
requestGetAttributeMapping:
15-
frontend.page.information: \TYPO3\CMS\Frontend\Page\PageInformation

.github/workflows/CodeQuality.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
env:
1313
- { php: 8.2}
1414
- { php: 8.3}
15+
- { php: 8.4}
1516

1617
env: ${{ matrix.env }}
1718

Classes/Service/PageAccessService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function isIncludePage(int $pageUid, array $siteSettings): bool
6464
) {
6565
$includePids = $this->extendPidListByChildren(
6666
$siteSettings['redirect']['includePageUids'],
67-
(int)$siteSettings['redirect']['includePageUidsRecursionLevel']
67+
(int)($siteSettings['redirect']['includePageUidsRecursionLevel'] ?? 0)
6868
);
6969
$includePids = GeneralUtility::intExplode(',', $includePids, true);
7070
} else {
@@ -83,7 +83,7 @@ public function isExcludePage(int $pageUid, array $siteSettings): bool
8383
) {
8484
$excludePids = $this->extendPidListByChildren(
8585
$siteSettings['redirect']['excludePageUids'],
86-
(int)$siteSettings['redirect']['excludePageUidsRecursionLevel']
86+
(int)($siteSettings['redirect']['excludePageUidsRecursionLevel'] ?? 0)
8787
);
8888
$excludePids = GeneralUtility::intExplode(',', $excludePids, true);
8989
} else {

Classes/Updates/PluginToContentElementUpdater.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Derhansen\FeChangePwd\Updates;
66

77
use TYPO3\CMS\Core\Attribute\UpgradeWizard;
8-
use \TYPO3\CMS\Core\Upgrades\AbstractListTypeToCTypeUpdate;
8+
use TYPO3\CMS\Core\Upgrades\AbstractListTypeToCTypeUpdate;
99

1010
#[UpgradeWizard('feChangePwdPluginToContentElementUpdate')]
1111
class PluginToContentElementUpdater extends AbstractListTypeToCTypeUpdate

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ Password changes for frontend users can be enforced and passwords can expire aft
1818
* Change password plugin
1919
* Validates the password against the TYPO3 password policies for frontend users
2020
* Force password change for frontend users
21-
* Redirect to configured page when password change is required
22-
* Password expiration after a configurable amount of days
23-
* Optional require the current password in order to change the password
24-
* Optional require a change password code, which is sent to the users email address, in order to change the password
21+
* Redirect to a configured page when password change is required
22+
* Password expiration after a configurable number of days
23+
* Optional requires the current password to change the password
24+
* Optional requires a change password code, which is sent to the users email address, to change the password
2525

2626
## Screenshot
2727

@@ -37,7 +37,7 @@ a weak password.
3737

3838
2) Add the site set "Change password for frontend users" to your site
3939

40-
3) Create a new page and make sure, that the page is only visible to logged in frontend users.
40+
3) Create a new page and make sure that the page is only visible to logged in frontend users.
4141

4242
4) Add the Plugin "Change Frontend User Password" to the page created in step 2
4343

@@ -46,7 +46,7 @@ a weak password.
4646

4747
6) Change TypoScript settings to your needs.
4848

49-
7) Optionally change the path to the extension templates in TypoScript and modify the templates to your needs.
49+
7) Optionally, change the path to the extension templates in TypoScript and modify the templates to your needs.
5050

5151
## New fe_user fields
5252

@@ -123,7 +123,7 @@ override for the `ChangePasswordCode` template.
123123

124124
### No password hashing service
125125

126-
The extension will not save a users password, if it can not be hashed. If this scenario occurs,
126+
The extension will not save a user password if it cannot be hashed. If this scenario occurs,
127127
the following exception is shown:
128128

129129
`No secure password hashing service could be initialized. Please check your TYPO3 system configuration`
@@ -159,8 +159,9 @@ use this event to add the data to the `ContextData` DTO.
159159

160160
| Version | TYPO3 | PHP | Support/Development |
161161
|---------|------------|-----------|--------------------------------------|
162-
| 5.x | 13.4 | 8.2 - 8.4 | Features, Bugfixes, Security Updates |
163-
| 4.x | 12.4 | 8.1 - 8.4 | Features, Bugfixes, Security Updates |
162+
| 6.x | 14.3 | 8.2 - 8.5 | Features, Bugfixes, Security Updates |
163+
| 5.x | 13.4 | 8.2 - 8.5 | Features, Bugfixes, Security Updates |
164+
| 4.x | 12.4 | 8.1 - 8.4 | Bugfixes, Security Updates |
164165
| 3.x | 11.5 | 7.4 - 8.3 | Security Updates |
165166
| 2.x | 9.5 - 10.4 | 7.2 - 7.4 | Support dropped |
166167
| 1.x | 8.7 - 9.5 | 7.0 - 7.3 | Support dropped |
@@ -205,7 +206,7 @@ policy is used for password validation.
205206
### Version 3.0.0
206207

207208
* Dropped TYPO3 9.5 and 10.4 compatibility.
208-
* Changed file extension für TypoScript files to `.typoscript`
209+
* Changed file extension for TypoScript files to `.typoscript`
209210
* Replaced signal slot with PSR-14 event
210211

211212
### Version 2.0.0

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"GPL-2.0-or-later"
2020
],
2121
"require": {
22-
"typo3/cms-core": "^13.4",
22+
"typo3/cms-core": "^14.0",
2323
"ext-curl": "*",
2424
"ext-pdo": "*",
2525
"php": ">=8.2"

ext_emconf.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
'author' => 'Torben Hansen',
99
'author_email' => 'torben@derhansen.com',
1010
'state' => 'stable',
11-
'version' => '5.3.2',
11+
'version' => '6.0.0',
1212
'constraints' => [
1313
'depends' => [
14-
'typo3' => '13.4.0-13.4.99'
14+
'typo3' => '14.0.0-14.3.99'
1515
],
1616
'conflicts' => [],
1717
'suggests' => [],

ext_localconf.php

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,20 @@
55
use Derhansen\FeChangePwd\Controller\PasswordController;
66
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
77

8-
call_user_func(function () {
9-
ExtensionUtility::configurePlugin(
10-
'fe_change_pwd',
11-
'Pi1',
12-
[
13-
PasswordController::class => ['edit', 'update', 'sendChangePasswordCode'],
14-
],
15-
// non-cacheable actions
16-
[
17-
PasswordController::class => ['edit', 'update', 'sendChangePasswordCode'],
18-
],
19-
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
20-
);
8+
ExtensionUtility::configurePlugin(
9+
'fe_change_pwd',
10+
'Pi1',
11+
[
12+
PasswordController::class => ['edit', 'update', 'sendChangePasswordCode'],
13+
],
14+
// non-cacheable actions
15+
[
16+
PasswordController::class => ['edit', 'update', 'sendChangePasswordCode'],
17+
],
18+
ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
19+
);
2120

22-
// Define template override for Fluid email
23-
if (!isset($GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'][750])) {
24-
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'][750] = 'EXT:fe_change_pwd/Resources/Private/Templates/Email';
25-
}
26-
});
21+
// Define template override for Fluid email
22+
if (!isset($GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'][750])) {
23+
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'][750] = 'EXT:fe_change_pwd/Resources/Private/Templates/Email';
24+
}

0 commit comments

Comments
 (0)