90466[TASK] Refactor workspace BE module internals
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Stefan Froemken +1
-
Verified V +2 Done
- Christian Kuhn +2
- core-ci +1 CI
Issues 1
Files 21
- Build/phpstan/phpstan-baseline.neon+0 −6
- typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseUserPermissionCheck.php2+3 −6
- typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php2+7 −0
- typo3/sysext/workspaces/Classes/Backend/ToolbarItems/WorkspaceSelectorToolbarItem.php2+1 −1
- typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php+133 −130
- typo3/sysext/workspaces/Classes/Controller/Remote/RemoteServer.php4+46 −29
- typo3/sysext/workspaces/Classes/Controller/AjaxDispatcher.php2+28 −1
- typo3/sysext/workspaces/Classes/Controller/ReviewController.php+36 −41
- typo3/sysext/workspaces/Classes/Domain/Model/Workspace.php2new+48 −0
- typo3/sysext/workspaces/Classes/Domain/Model/WorkspaceStage.phpnew+41 −0
- typo3/sysext/workspaces/Classes/Domain/Record/StageRecord.phpdeleted+0 −272
- typo3/sysext/workspaces/Classes/Domain/Record/WorkspaceRecord.phpdeleted+0 −225
- typo3/sysext/workspaces/Classes/Domain/Repository/WorkspaceRepository.php2new+56 −0
- typo3/sysext/workspaces/Classes/Domain/Repository/WorkspaceStageRepository.phpnew+155 −0
- typo3/sysext/workspaces/Classes/Exception/AbstractException.phpnew+22 −0
- typo3/sysext/workspaces/Classes/Exception/WorkspaceStageNotFoundException.phpnew+20 −0
- typo3/sysext/workspaces/Classes/Service/GridDataService.php+32 −15
- typo3/sysext/workspaces/Classes/Service/StagesService.php+150 −267
- typo3/sysext/workspaces/Classes/Service/WorkspaceService.php+2 −5
- typo3/sysext/workspaces/Resources/Private/Language/locallang.xlf+2 −7
Review log 1523
-
Christian Kuhn uploaded patch set 1 08/21/25, 14:16
-
Christian Kuhn commented on patch set 1 CR -1 08/21/25, 14:17
testing details -
core-ci voted on patch set 1 V +1 08/21/25, 14:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83703
-
Christian Kuhn uploaded patch set 2
CR -1V +108/21/25, 15:50 -
core-ci voted on patch set 2 V +1 08/21/25, 15:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83706
-
Christian Kuhn uploaded patch set 3
V +108/21/25, 18:34 -
core-ci voted on patch set 3 V +1 08/21/25, 18:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83708
-
Christian Kuhn uploaded patch set 4
V +108/21/25, 19:48 -
core-ci voted on patch set 4 V +1 08/21/25, 19:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83710
-
Christian Kuhn uploaded patch set 5 08/21/25, 20:04
Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**") -
Christian Kuhn uploaded patch set 6
V +108/21/25, 20:07 -
Christian Kuhn commented on patch set 6 08/21/25, 20:10
found two minor issues while testing the backport that i fixed here. i'll upmerge these to main as follow-up. -
core-ci voted on patch set 5 V +1 08/21/25, 20:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83711
-
core-ci voted on patch set 6 V +1 08/21/25, 20:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83712
-
Stefan Froemken updated the commit message in patch set 7
V +108/22/25, 06:37 -
core-ci voted on patch set 7 V +1 08/22/25, 06:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83738
-
Stefan Froemken commented on patch set 7 08/22/25, 07:14
Nice clean-up. Can you streamline the variables a little bit? In one class you name it $currentWorkspace in another class $activeWorkspace and if you retrieve the workspace from BE_USER you also write "workspace", but its NOT a Workspace object, it's a workspace ID. I think the variablenames should respect that.DatabaseUserPermissionCheck.php:53Can we remove these self-explaining annotations? There are no additional information and the arguments and return values are types in method already.GeneralUtilityTest.php:849Why is this important? In general it is a "normal" PHP:explode which never removes duplicate valuesWorkspaceSelectorToolbarItem.php:34Aua...hard to remove because of RequestAwareToolbarItemInterface, right?AjaxDispatcher.php:40protected const?RemoteServer.php:114No try-catch?RemoteServer.php:303Just pseudo stage. I have no clue what you mean with "execute"Workspace.php:25Just for my brain. If I add one or two additional columns to sys_workspace I'm completely lost. It's not possible to retrieve my own fields anywhere again in various eventlisteners of workspace code, right. If I get the WS UID I have to retrieve the sys_workspace record again with plain ConnectionPool.WorkspaceRepository.php:39Isn't that a job for BitSet? -
Christian Kuhn commented on patch set 7 08/22/25, 10:33
Reply
since this is the backport of the main patch, i'll keep this for now. the patch creates the foundation for further refactorings that should be much easier now, an unfortunate variable name is not critically important at this point. i hope this point of view is ok with you at the moment.DatabaseUserPermissionCheck.php:53ReplyDoneGeneralUtilityTest.php:849Replyit wasn't obvious to me. this added test case just specifies the detail behavior a bit better and does not hurt.WorkspaceSelectorToolbarItem.php:34Replyyeah. part of the current toolbar behavior. i guess that won't change anytime soon.AjaxDispatcher.php:40Replywill be kept in v13, has been dissolved in main already.RemoteServer.php:114Replyis validated by be-auth code already. should be fine.RemoteServer.php:303Replysee description in the stages repository class.Workspace.php:25Replyyeah. this DO is a contract between db state and the application. there aren't many events anyways, this DO does not represent 'everything' from DB, and it is tailored for the BE module that isn't trivial to adapt at the moment. this final is fine, at least for the time being. we need a solid ground to allow further refactoring.WorkspaceRepository.php:39Replytoo much overhead with too little gain in this case i'd say. still unsure on how the permission system will evolve, so let's keep it very simple for now. -
Christian Kuhn uploaded patch set 8
V +108/22/25, 10:33 -
Stefan Froemken voted on patch set 8 CR +1 08/22/25, 10:41
-
core-ci voted on patch set 8 V +1 08/22/25, 10:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83751
-
Christian Kuhn voted on patch set 8 CR +2 V +2 08/22/25, 10:45
-
Christian Kuhn merged patch set 9 08/22/25, 10:45