89992[FEATURE] Allow install tool sessions without shared file system
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Garvin Hicking +1
-
Verified V +2 Done
- Benni Mack +2
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 6
- typo3/sysext/core/Configuration/DefaultConfiguration.php+6 −0
- typo3/sysext/core/Documentation/Changelog/14.0/Feature-101059-AddRedisSessionHandlerInstallTool.rst5new+70 −0
- typo3/sysext/install/Classes/Service/Session/FileSessionHandler.php+5 −6
- typo3/sysext/install/Classes/Service/Session/RedisSessionHandler.php13new+127 −0
- typo3/sysext/install/Classes/Service/SessionService.php11+25 −17
- typo3/sysext/install/Classes/ServiceProvider.php+1 −1
Review log 5574
Show 3649 earlier messages
-
Sven Liebert uploaded patch set 1 07/05/25, 15:46
-
core-ci voted on patch set 1 V -1 07/05/25, 15:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81340
-
Sven Liebert uploaded patch set 2
V -107/05/25, 15:55 -
Sven Liebert uploaded patch set 3 07/05/25, 15:58
-
core-ci voted on patch set 2 V -1 07/05/25, 16:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81341
-
Sven Liebert uploaded patch set 4 07/05/25, 16:03
-
Sven Liebert uploaded patch set 5 07/05/25, 16:05
-
core-ci voted on patch set 3 V -1 07/05/25, 16:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81342
-
core-ci voted on patch set 4 V -1 07/05/25, 16:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81343
-
core-ci voted on patch set 5 V +1 07/05/25, 16:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81344
-
Simon Schaufelberger commented on patch set 5 07/05/25, 19:40
Features can't be backported. No 13.4 release. Additionally the commit message and changelog should be improved. The english is not really correct. -
Sven Liebert commented on patch set 5 07/05/25, 19:46
Reply
I will improve the english. Sorry. But this feature here is backported or was it before development of v14 started? https://forge.typo3.org/issues/105638 -
Sven Liebert uploaded patch set 6
V +107/05/25, 19:48 -
Sven Liebert commented on patch set 6 07/05/25, 19:48
Reply
Done including removing backporting for v13 -
core-ci voted on patch set 6 V +1 07/05/25, 19:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81345
-
Garvin Hicking commented on patch set 6 07/05/25, 20:30
Reply
Thanks for this patch, I think having this flexibility is a good thing to discuss. The mentioned issue was an exemption because it is/was very important to the adoption of Content-Blocks. Generally, Simon is right, and backporting features by default is not planned. In some cases exemptions need to be made, and is discussed by the merger team. -
Sven Liebert commented on patch set 6 07/05/25, 20:34
Reply
Yeah we have some real struggles with the current approach in kubernetes environment, so I looked that it‘s compatible with v13 without breaking stuff and hoped we can get it in v13, but if thats not possible, thats ok either. Thank you! :) -
Garvin Hicking commented on patch set 6 07/05/25, 21:21
Reply
For sure! Interested parties could include it as a composer patch. And the way you implemented it could allow future ofher session handlers too, thats a good foresight. In the install tool context and the reduced DI failsafe container env we probably can't use "cooler" ways of this via autotagging or service definitions. It's not my special area but let's see where this can go, thanks for the initiative to solve it. If I may ask (curiosity): Most instances I know that use horizontal scaling and redis-y clusters are so deployment-driven or set up in read-only containers with their setup that they don't utilize the install tool context (or even are now lacking Ext:install). Maybe you could describe your scenario where/how you use the install tool here, so that shared install tool sessions would be vital? -
Sven Liebert commented on patch set 6 07/06/25, 06:23
Reply
We have multiple CMS pods and we use the maintenance tool for flushing caches when needed or database comparing. The install tool itself we don‘t use in production context. But in my mind it is not a good solution to share files between pods, so is might be better to use redis or something to have a shared install tool session. And I‘m open for cooler implementation ways, if possible :) So don‘t hesitate to discuss that here :) -
Oliver Klee updated the commit message in patch set 7
V +107/06/25, 08:53 -
core-ci voted on patch set 7 V +1 07/06/25, 09:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81361
-
Andreas Kienast commented on patch set 7 07/07/25, 06:27
We already have the Session Storage introduced with https://review.typo3.org/c/Packages/TYPO3.CMS/+/51549. Perhaps we can extend this approach for usage in the Install Tool? -
Andreas Kienast commented on patch set 7 07/07/25, 06:28
Reply
_unresolved..._ -
Sven Liebert commented on patch set 7 07/07/25, 06:44
Reply
Maybe I just not understand the feature from there, but basically it's exactly that or isn't it? An interface (SessionBackendInterface) is defined there and then it could used from multiple backends. Here we have a PHP-defined interface for session handling, which is needed to be implemented. And then every implementation could used like in backend sessions. Maybe you can give me a short summary what you mean? :) -
Andreas Kienast commented on patch set 7 07/07/25, 07:07
Reply
The patch I've linked introduced a `RedisSessionBackend`, yours introduces another `RedisSessionHandler`. This looks like a different concept (I'm totally fine with streamlining this, I've never worked with `\SessionHandlerInterface`). Also, there's already the configuration path `SYS/session`, while this patch introduces `BE/installToolSession` for this. -
Sven Liebert commented on patch set 7 07/07/25, 07:12
Reply
Ah that makes it clear, thank you. I'm not sure wether we should use the existing RedisSessionBackend, because the install tool session works with PHP custom session handler today: https://www.php.net/manual/en/session.customhandler.php So for using redis here, I needed to implement `\SessionHandlerInterface)`. But you are right, we could add the configuration to `SYS\session`. Any thoughts about that from maybe @benni@typo3.org or @garvin@hick.ing ? :) -
Sven Liebert commented on patch set 7 07/07/25, 10:58
I will add authentication possibility when it's clear where we want to configure that. -
Sven Liebert uploaded patch set 8
V +108/07/25, 19:07 -
Sven Liebert commented on patch set 8 08/07/25, 19:08
I add authentication and made it more failure proof. If something goes wrong with redis (unavailable or wrong configured) it fallbacks to file based session. I checked together with Benni to use Symfony RedisSessionHandler but it's not suitable for our purposes. -
core-ci voted on patch set 8 V -1 08/07/25, 19:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82878
-
Sven Liebert uploaded patch set 9
V -108/07/25, 19:27 -
core-ci voted on patch set 9 V +1 08/07/25, 19:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82884
-
Sven Liebert commented on patch set 9 08/07/25, 19:37
Reply
Done -
Sven Liebert commented on patch set 9 08/07/25, 19:38
Reply
Discussed with Benni, that the place to configure is valid -
Sven Liebert commented on patch set 9 08/07/25, 19:38
Reply
Done -
Sven Liebert uploaded patch set 10
V +108/07/25, 20:00 -
Sven Liebert uploaded patch set 11 08/07/25, 20:08
-
Benni Mack commented on patch set 11 08/07/25, 20:08
Feature-101059-AddRedisSessionHandlerInstallTool.rst:7use === until the end of the line.RedisSessionHandler.php:2use strictSessionService.php:72needs ?? '' - right?SessionService.php:74obsolete.SessionService.php:118let's use new in install tool context. -
core-ci voted on patch set 10 V +1 08/07/25, 20:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82906
-
Benni Mack uploaded patch set 12 08/07/25, 20:21
-
Sven Liebert commented on patch set 12 08/07/25, 20:22
Feature-101059-AddRedisSessionHandlerInstallTool.rst:7ReplyDoneRedisSessionHandler.php:2ReplyDoneSessionService.php:72ReplyDoneSessionService.php:74ReplyDoneSessionService.php:118ReplyDone -
core-ci voted on patch set 11 V +1 08/07/25, 20:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82911
-
Benni Mack uploaded patch set 13 08/07/25, 20:33
-
Benni Mack voted on patch set 13 CR +1 V +1 08/07/25, 20:33
-
Sven Liebert voted on patch set 13 CR +1 V +1 08/07/25, 20:34
-
core-ci voted on patch set 12 V -1 08/07/25, 20:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82917
-
Elias Häußler commented on patch set 13 08/07/25, 21:00
RedisSessionHandler.php:22Can we make this class `final`, since all relevant properties are already `private` and therefore inaccessible in child classes?SessionService.php:69An additional check if `$sessionHandlerClass` implements `\SessionHandlerInterface` would be nice to avoid errors here. -
core-ci voted on patch set 13 V -1 08/07/25, 21:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82923
-
Sven Liebert uploaded patch set 14
CR +1V +108/07/25, 21:05
-
Sven Liebert commented on patch set 14 CR +1 V +1 08/07/25, 21:05
RedisSessionHandler.php:22ReplyDoneSessionService.php:69ReplyI think it's not useful here because we silently fail on any error -
core-ci voted on patch set 14 V -1 08/07/25, 21:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82934
-
Sven Liebert uploaded patch set 15
CR +1V +108/07/25, 21:23 -
Andreas Wolf commented on patch set 14 08/07/25, 21:26
RedisSessionHandler.php:35This could also be annotated on the method: ``` /** * @param array{user?: string, pass?: string} $authentication */ ```RedisSessionHandler.php:65I guess this is a no-op because Redis handles expiry automatically? Might be good to add a comment stating that here.RedisSessionHandler.php:81According to the PHP docs, this should return `false` if the record was not found: https://www.php.net/manual/en/sessionhandlerinterface.read.phpSessionService.php:70Shouldn't this at least log something or somehow indicate that this is only the fallback? I can imagine that this will create hard to catch errors otherwise… -
Sven Liebert uploaded patch set 16 08/07/25, 21:30
-
core-ci voted on patch set 15 V +1 08/07/25, 21:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82939
-
Sven Liebert commented on patch set 16 08/07/25, 21:33
RedisSessionHandler.php:35ReplyDoneRedisSessionHandler.php:65ReplyDoneRedisSessionHandler.php:81ReplyLeads to error like it's used from SessionService. You can recheck the FileSessionHandler. There is return also always an empty string.SessionService.php:70ReplyThere is no logging inside the install tool session handling at all. I think it's not necessary to log here. -
core-ci voted on patch set 16 V +1 08/07/25, 21:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82942
-
Sven Liebert uploaded patch set 17
V +108/07/25, 21:42 -
Sven Liebert commented on patch set 16 08/07/25, 21:42
SessionService.php:70ReplyImplemented logging here. Thought about it. I think you are right! -
Sven Liebert uploaded patch set 18 08/07/25, 21:45
-
Sven Liebert commented on patch set 18 08/07/25, 21:45
RedisSessionHandler.php:81ReplyAdded comment to clarify -
Sven Liebert uploaded patch set 19 08/07/25, 21:47
-
core-ci voted on patch set 17 V -1 08/07/25, 21:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82946
-
Andreas Wolf commented on patch set 19 CR +1 08/07/25, 21:57
RedisSessionHandler.php:35ReplyThis comment can go now IMO. -
Sven Liebert uploaded patch set 20
CR +108/07/25, 21:58 -
Sven Liebert commented on patch set 19 08/07/25, 21:58
RedisSessionHandler.php:35ReplyDone -
core-ci voted on patch set 19 V +1 08/07/25, 22:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82954
-
core-ci voted on patch set 20 V +1 08/07/25, 22:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82956
-
Garvin Hicking voted on patch set 20 CR +1 V +1 08/07/25, 22:19
-
Benni Mack commented on patch set 20 CR +2 V +2 08/08/25, 07:46
works now (even in v13 :)) -
Benni Mack merged patch set 21 08/08/25, 07:46
-
Benjamin Franzke commented on patch set 21 09/17/25, 06:59
Feature-101059-AddRedisSessionHandlerInstallTool.rst:47Hey, Were you able to test this example as configured directly in `system/settings.php`. I guess you tested via additional.php but there is actually a fine difference in this case. I just stumbled over this while thinking about change the defaults to be static: > 90698: [WIP][TASK] Use a static default for the install tool session path | https://review.typo3.org/c/Packages/TYPO3.CMS/+/90698 There is a problem with how system settings from `config/system/settings.php` are merged with default configuration, which means that this example combined with the current default configuration will result in an actualy configuration like: ``` installToolSessionHandler className = TYPO3\CMS\Install\Service\Session\RedisSessionHandler options authentication pass = redis user = redis database = 0 host = 127.0.0.1 port = 6379 sessionPath = /var/www/…/session ``` You see that `$sessionPath` is added because it is configured in DefaultConfiguration.php which ultimately resolves in a constructor error which is (thankfully!) logged as: ``` Wed, 17 Sep 2025 08:51:33 +0200 [ERROR] request="bb869bc0ecc7a" component="TYPO3.CMS.Install.Service.SessionService": Session handler is not configured properly: Unknown named parameter $sessionPath ``` I just want to mention this problem here for now. I don't know yet how to solve this properly as I'm not sure it is a good idea to pass the configuration as plain constructor arguments in https://review.typo3.org/c/Packages/TYPO3.CMS/+/89992/21/typo3/sysext/install/Classes/Service/SessionService.php#69 I see two options: * Define factories instead of implying a 1:1 option-to-constructor-argument transformation * Remove the default options and let the file session handler resolve them on it's own -
Benjamin Franzke commented on patch set 21 09/17/25, 07:04
Feature-101059-AddRedisSessionHandlerInstallTool.rst:47ReplyMoved this into an issue so we can track this easier: https://forge.typo3.org/issues/107466 -
Sven Liebert commented on patch set 21 10/21/25, 15:43
Feature-101059-AddRedisSessionHandlerInstallTool.rst:47ReplyFixed in follow up