90459[!!!][TASK] Introduce strict typing for Cache BE and FE
Commit message
Review
-
Code review CR +2 Done
- Benni Mack +2
- Christian Kuhn +1
- Sascha Nowak +1
-
Verified V +2 Done
- Benni Mack +2
- Oliver Klee +1
- Christian Kuhn +1
- Sascha Nowak +1
- core-ci +1 CI
Issues 1
Files 51
- Build/phpstan/phpstan-baseline.neon+0 −180
- Build/phpunit/UnitTestsBootstrap.php+1 −1
- typo3/sysext/core/Classes/Cache/Backend/AbstractBackend.php4+13 −87
- typo3/sysext/core/Classes/Cache/Backend/ApcuBackend.php2+24 −69
- typo3/sysext/core/Classes/Cache/Backend/BackendInterface.php+11 −12
- typo3/sysext/core/Classes/Cache/Backend/FileBackend.php+22 −105
- typo3/sysext/core/Classes/Cache/Backend/MemcachedBackend.php+57 −134
- typo3/sysext/core/Classes/Cache/Backend/NullBackend.php4+18 −69
- typo3/sysext/core/Classes/Cache/Backend/PhpCapableBackendInterface.php+11 −3
- typo3/sysext/core/Classes/Cache/Backend/RedisBackend.php3+57 −198
- typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php+33 −132
- typo3/sysext/core/Classes/Cache/Backend/TaggableBackendInterface.php+5 −3
- typo3/sysext/core/Classes/Cache/Backend/TransientBackendInterface.php+19 −1
- typo3/sysext/core/Classes/Cache/Backend/TransientMemoryBackend.php+21 −64
- typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php2+29 −148
- typo3/sysext/core/Classes/Cache/Exception/DuplicateIdentifierException.php+2 −3
- typo3/sysext/core/Classes/Cache/Exception/InvalidBackendException.php+2 −3
- typo3/sysext/core/Classes/Cache/Exception/InvalidCacheException.php+2 −3
- typo3/sysext/core/Classes/Cache/Exception/InvalidDataException.php+2 −3
- typo3/sysext/core/Classes/Cache/Exception/NoSuchCacheException.php+2 −3
Show 31 more files
- typo3/sysext/core/Classes/Cache/Exception/NoSuchCacheGroupException.php+2 −3
- typo3/sysext/core/Classes/Cache/Frontend/AbstractFrontend.php+28 −104
- typo3/sysext/core/Classes/Cache/Frontend/FrontendInterface.php+20 −25
- typo3/sysext/core/Classes/Cache/Frontend/NullFrontend.php+2 −8
- typo3/sysext/core/Classes/Cache/Frontend/PhpFrontend.php+19 −32
- typo3/sysext/core/Classes/Cache/Frontend/VariableFrontend.php+8 −16
- typo3/sysext/core/Classes/Cache/CacheManager.php+23 −60
- typo3/sysext/core/Classes/Cache/DatabaseSchemaService.php+3 −3
- typo3/sysext/core/Classes/Cache/Exception.php+2 −0
- typo3/sysext/core/Classes/Core/Bootstrap.php+1 −1
- typo3/sysext/core/Classes/DependencyInjection/Cache/ContainerBackend.php+1 −1
- typo3/sysext/core/Classes/Site/SiteSettingsFactory.php+1 −1
- typo3/sysext/core/Documentation/Changelog/14.0/Breaking-107315-CacheBackendAndFrontendRelatedChanges.rst2new+128 −0
- typo3/sysext/core/Tests/Functional/Cache/Backend/ApcuBackendTest.php+16 −28
- typo3/sysext/core/Tests/Functional/Cache/Backend/FileBackendTest.php+24 −35
- typo3/sysext/core/Tests/Functional/Cache/Backend/MemcachedBackendTest.php+3 −15
- typo3/sysext/core/Tests/Functional/Cache/Backend/RedisBackendTest.php+3 −115
- typo3/sysext/core/Tests/Functional/Cache/Backend/Typo3DatabaseBackendTest.php+20 −20
- typo3/sysext/core/Tests/Functional/Cache/Frontend/VariableFrontendTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Authentication/BackendUserAuthenticationTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Cache/Backend/Fixtures/ConcreteBackendFixture.php+8 −7
- typo3/sysext/core/Tests/Unit/Cache/Backend/AbstractBackendTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Cache/Backend/TransientMemoryBackendTest.php+10 −22
- typo3/sysext/core/Tests/Unit/Cache/Backend/Typo3DatabaseBackendTest.php+3 −116
- typo3/sysext/core/Tests/Unit/Cache/Fixtures/BackendConfigurationOptionFixture.php+1 −2
- typo3/sysext/core/Tests/Unit/Cache/Fixtures/BackendFixture.php+7 −4
- typo3/sysext/core/Tests/Unit/Cache/Fixtures/FrontendFixture.php+10 −7
- typo3/sysext/core/Tests/Unit/Cache/CacheManagerTest.php+2 −2
- typo3/sysext/core/Tests/Unit/FormProtection/FormProtectionFactoryTest.php+3 −8
- typo3/sysext/core/Tests/Unit/Localization/LocalizationFactoryTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Package/PackageManagerTest.php+1 −1
Review log 6796
Show 4771 earlier messages
-
Sascha Nowak uploaded patch set 1 08/19/25, 17:40
-
Sascha Nowak marked it work in progress 08/19/25, 17:40
-
core-ci voted on patch set 1 V -1 08/19/25, 17:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83622
-
Sascha Nowak uploaded patch set 2
V -108/19/25, 18:10 -
core-ci voted on patch set 2 V -1 08/19/25, 18:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83623
-
Sascha Nowak uploaded patch set 3
V -108/19/25, 18:42 -
Sascha Nowak uploaded patch set 4 08/19/25, 18:52
-
core-ci voted on patch set 3 V -1 08/19/25, 18:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83625
-
core-ci voted on patch set 4 V -1 08/19/25, 19:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83626
-
Sascha Nowak uploaded patch set 5
V -108/19/25, 19:06 -
core-ci voted on patch set 5 V -1 08/19/25, 19:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83627
-
Sascha Nowak uploaded patch set 6
V -108/19/25, 19:17 -
core-ci voted on patch set 6 V +1 08/19/25, 19:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83628
-
Sascha Nowak uploaded patch set 7
V +108/19/25, 19:35 -
Sascha Nowak commented on patch set 7 08/19/25, 19:39
This change is ready for review. -
Sascha Nowak uploaded patch set 8 08/19/25, 19:41
-
core-ci voted on patch set 7 V +1 08/19/25, 19:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83629
-
Garvin Hicking commented on patch set 8 08/19/25, 19:46
Could we addd declare(strict_types) lines to some of these files (all?) (thanks so much for your work!) -
core-ci voted on patch set 8 V +1 08/19/25, 19:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83630
-
Garvin Hicking commented on patch set 8 08/19/25, 20:05
Reply
(unresolving) Example: PhpFrontend.php -
Sascha Nowak uploaded patch set 9
V +108/19/25, 20:10 -
Sascha Nowak commented on patch set 9 08/19/25, 20:12
Reply
declare(strict_types) is now added to all files. -
core-ci voted on patch set 9 V -1 08/19/25, 20:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83632
-
Sascha Nowak uploaded patch set 10
V -108/19/25, 20:31 -
Sascha Nowak commented on patch set 10 08/19/25, 20:32
Reply
Done -
Benni Mack commented on patch set 10 08/19/25, 20:36
AbstractBackend.php:49we can drop the context now as well, if we're breaking here, let's do this as well IMHO -
core-ci voted on patch set 10 V -1 08/19/25, 20:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83633
-
Sascha Nowak uploaded patch set 11
V -108/19/25, 21:10 -
Sascha Nowak commented on patch set 11 08/19/25, 21:11
AbstractBackend.php:49ReplyDone -
Sascha Nowak uploaded patch set 12 08/19/25, 21:13
-
Sascha Nowak uploaded patch set 13 08/19/25, 21:16
-
core-ci voted on patch set 11 V -1 08/19/25, 21:23 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83635
-
core-ci voted on patch set 12 V -1 08/19/25, 21:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83636
-
core-ci voted on patch set 13 V -1 08/19/25, 21:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83637
-
Sascha Nowak uploaded patch set 14
V -108/19/25, 21:27 -
Sascha Nowak uploaded patch set 15 08/19/25, 21:33
-
core-ci voted on patch set 14 V -1 08/19/25, 21:35 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83638
-
core-ci voted on patch set 15 V +1 08/19/25, 21:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83639
-
Andreas Kienast commented on patch set 15 08/20/25, 04:41
Breaking-107315-CacheBackendAndFrontendRelatedChanges.rst:44You need a blank line between the "header" and the first bullet list point, otherwise the rendering gets borked. -
Sascha Nowak uploaded patch set 16
V +108/20/25, 06:17 -
Sascha Nowak commented on patch set 15 08/20/25, 06:18
Breaking-107315-CacheBackendAndFrontendRelatedChanges.rst:44ReplyThanks for the hint. Done -
core-ci voted on patch set 16 V +1 08/20/25, 06:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83656
-
Stefan Froemken updated the commit message in patch set 17
V +108/22/25, 08:38 -
core-ci voted on patch set 17 V +1 08/22/25, 08:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83748
-
Stefan Froemken commented on patch set 17 08/22/25, 08:45
You also have removed the calculateExpiryTime method. It was not used by core itself, but may be used by other backends. Should be mentioned in your rst file. -
Sascha Nowak uploaded patch set 18
V +108/25/25, 07:30 -
Sascha Nowak commented on patch set 18 08/25/25, 07:31
Reply
Done -
core-ci voted on patch set 18 V +1 08/25/25, 07:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83841
-
Benni Mack commented on patch set 18 09/12/25, 14:40
Hey Sascha, I'm ready for this one ;). Can you rebase? Also, we should evaluate if we can work with PSR-16 (Simple Cache) to streamline our interfaces towards that? -
Sascha Nowak uploaded patch set 19
V +109/12/25, 16:11 -
core-ci voted on patch set 19 V -1 09/12/25, 16:22 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84926
-
Sascha Nowak uploaded patch set 20
V -109/12/25, 16:25 -
core-ci voted on patch set 20 V -1 09/12/25, 16:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84927
-
Sascha Nowak uploaded patch set 21
V -109/12/25, 16:35 -
core-ci voted on patch set 21 V +1 09/12/25, 16:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84928
-
Sascha Nowak commented on patch set 21 09/12/25, 16:50
Reply
Hey Benni, the change is now rebased. Regarding the PSR-16 streamlining: since PSR-16 doesn’t support cache tags, alignment is tricky—do you have any suggestions? -
Benni Mack commented on patch set 21 09/12/25, 18:00
Reply
Thanks, I thought about this - but I'm not sure if this is useful / DX improvements to strive towards https://github.com/php-fig/simple-cache/blob/master/src/CacheInterface.php - last time I checked, symfony adds their own taggableInterface etc. on top of PSR-16, so they're also kind of "doing their own". Well, might as well be that PSR-6/16 has failed. So yes, let's keep it this way. -
Benni Mack uploaded patch set 22
V +109/23/25, 15:05 -
Benni Mack voted on patch set 22 CR +1 09/23/25, 15:05
-
core-ci voted on patch set 22 V +1 09/23/25, 15:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/85394
-
Benni Mack voted on patch set 22 V +1 09/23/25, 15:32
-
Sven Liebert commented on patch set 22 CR -1 V -1 10/18/25, 17:03
RedisBackend.php:99This is breaking the current workaround to set username and password for redis authentication. https://review.typo3.org/c/Packages/TYPO3.CMS/+/91151 is handling that while adding a new property. Within deprecation property we can not cast that right now to string. We need to cast it to array|string. -
Sven Liebert commented on patch set 22 10/18/25, 17:04
RedisBackend.php:99Reply*deprecation policy -
Simon Schaufelberger uploaded patch set 23
CR +1V +111/07/25, 18:21 -
core-ci voted on patch set 23 V +1 11/07/25, 18:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88667
-
Sascha Nowak commented on patch set 23 11/08/25, 10:24
RedisBackend.php:99ReplyDone -
Oliver Klee voted on patch set 23 V +1 11/08/25, 10:56
-
Christian Kuhn uploaded patch set 24
V +111/20/25, 11:52 -
Christian Kuhn commented on patch set 24 11/20/25, 11:54
rebased for now. -
core-ci voted on patch set 24 V +1 11/20/25, 12:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90274
-
Oliver Klee voted on patch set 24 V +1 11/20/25, 12:05
-
Lina Wolf commented on patch set 24 11/20/25, 12:21
NullBackend.php:26Can the information that these parameters are being ignored really be omitted?NullBackend.php:89And if so, this one can probably also be removed -
Lina Wolf commented on patch set 24 11/20/25, 12:28
AbstractBackend.php:138How is removing this method from the Abstract backend related to hardening types? -
Christian Kuhn commented on patch set 24 11/20/25, 13:41
ApcuBackend.php:153in the end, there is not good reason to have this back-reference from backend to frontend at all, as far as i can see. we should consider getting rid of it entirely.NullBackend.php:26Replyits obvious -
Christian Kuhn uploaded patch set 25
V +111/20/25, 15:07 -
core-ci voted on patch set 25 V -1 11/20/25, 15:15 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90302
-
Christian Kuhn uploaded patch set 26
V -111/20/25, 16:05 -
core-ci voted on patch set 26 V +1 11/20/25, 16:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90314
-
Oliver Klee voted on patch set 26 V +1 11/20/25, 16:27
-
Christian Kuhn uploaded patch set 27
V +111/20/25, 17:27 -
core-ci voted on patch set 27 V +1 11/20/25, 17:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90334
-
Oliver Klee voted on patch set 27 V +1 11/20/25, 17:40
-
Christian Kuhn uploaded patch set 28
V +111/20/25, 17:42 -
core-ci voted on patch set 28 V +1 11/20/25, 17:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90339
-
Oliver Klee voted on patch set 28 V +1 11/20/25, 17:52
-
Christian Kuhn commented on patch set 28 11/20/25, 18:22
AbstractBackend.php:138ReplyDoneApcuBackend.php:153Replyi relaxed that now by still having and calling setCache(), but no longer setting the frontend instance as property. the loop dependency itself (create backend, create frontend with handing over backend instance, then call backend to give it the frontend) can not be resolved easily especially due to the file backends which derive storage details from the frontend type.NullBackend.php:89ReplyDone -
Sascha Nowak voted on patch set 28 CR +1 V +1 11/20/25, 18:31
-
Christian Kuhn uploaded patch set 29
CR +1V +111/20/25, 18:33 -
Christian Kuhn voted on patch set 29 CR +1 V +1 11/20/25, 18:34
-
Sascha Nowak voted on patch set 29 CR +1 V +1 11/20/25, 18:36
-
Oliver Klee voted on patch set 29 V +1 11/20/25, 18:39
-
core-ci voted on patch set 29 V +1 11/20/25, 18:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90348
-
Benni Mack voted on patch set 29 CR +2 V +2 11/20/25, 20:08
-
Benni Mack merged patch set 30 11/20/25, 20:08
-
Benjamin Franzke commented on patch set 30 04/21/26, 10:24
Typo3DatabaseBackend.php:326I think this caused a configuration-regression, see https://forge.typo3.org/issues/109664 for more details -
Christian Kuhn commented on patch set 30 04/23/26, 01:48
Typo3DatabaseBackend.php:326Reply