77285[FEATURE] Show the redirect integrity status
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Anja Leichsenring +1
-
Verified V +2 Done
- Stefan Bürk +2
- Anja Leichsenring +1
- core-ci +1 CI
Issues 1
Files 18
- typo3/sysext/core/Documentation/Changelog/13.0/Feature-99485-ShowTheRedirectIntegrityStatus.rst2new+37 −0
- typo3/sysext/redirects/Classes/Command/CheckIntegrityCommand.php+16 −3
- typo3/sysext/redirects/Classes/Command/CleanupRedirectsCommand.php+7 −0
- typo3/sysext/redirects/Classes/Controller/ManagementController.php+4 −0
- typo3/sysext/redirects/Classes/Event/ModifyRedirectManagementControllerViewDataEvent.php+11 −0
- typo3/sysext/redirects/Classes/Repository/Demand.php4+25 −4
- typo3/sysext/redirects/Classes/Repository/RedirectRepository.php2+25 −0
- typo3/sysext/redirects/Classes/Service/IntegrityService.php3+16 −0
- typo3/sysext/redirects/Classes/Service/SlugService.php+4 −0
- typo3/sysext/redirects/Classes/Utility/RedirectConflict.php6new+27 −0
- typo3/sysext/redirects/Configuration/TCA/sys_redirect.php2+23 −1
- typo3/sysext/redirects/Resources/Private/Language/locallang.xlf2+3 −0
- typo3/sysext/redirects/Resources/Private/Language/locallang_db.xlf+15 −0
- typo3/sysext/redirects/Resources/Private/Language/locallang_module_redirect.xlf+6 −0
- typo3/sysext/redirects/Resources/Private/Templates/Management/Overview.html+10 −1
- typo3/sysext/redirects/Tests/Functional/Service/IntegrityServiceTest.php+29 −0
- typo3/sysext/redirects/Tests/Unit/Event/ModifyRedirectManagementControllerViewDataEventTest.php+5 −0
- typo3/sysext/redirects/Tests/Unit/Repository/DemandTest.php+16 −11
Review log 6287
Show 4362 earlier messages
-
Guido Schmechel uploaded patch set 1 01/07/23, 18:33
-
Chris Müller commented on patch set 1 01/07/23, 18:39
-
core-ci voted on patch set 1 V -1 01/07/23, 18:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35570
-
Guido Schmechel commented on patch set 1 01/07/23, 18:48
RedirectConflictUtility.php:23ReplyGood point. We are more modern here ;-) I'll change it. -
Guido Schmechel uploaded patch set 2
V -101/07/23, 18:56 -
core-ci voted on patch set 2 V +1 01/07/23, 19:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35574
-
Guido Schmechel uploaded patch set 3
V +101/07/23, 19:27 -
core-ci voted on patch set 3 V -1 01/07/23, 19:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35575
-
Guido Schmechel uploaded patch set 4
V -101/07/23, 19:42 -
Guido Schmechel uploaded patch set 5 01/07/23, 19:43
-
core-ci voted on patch set 4 V +1 01/07/23, 19:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35576
-
core-ci voted on patch set 5 V +1 01/07/23, 19:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35577
-
Guido Schmechel commented on patch set 5 01/07/23, 19:56
The patch is now ready for review. As always, please check my commit messages and documentation. The documentation will be extended again after the merge of https://review.typo3.org/c/Packages/TYPO3.CMS/+/77284. This patch is intended to be a start for further integrity checks. For this reason, the integrity status has been stored as enum.RedirectConflictUtility.php:23ReplyDone -
Guido Schmechel uploaded patch set 6
V +101/07/23, 22:49 -
core-ci voted on patch set 6 V +1 01/07/23, 22:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35578
-
Stefan Bürk commented on patch set 6 CR -1 01/18/23, 10:33
temp -1, will have a deep look later (after work) -
Sybille Peters commented on patch set 6 06/17/23, 12:29
Reply
@Stefan Can you free this up or give general recommendations? (e.g. like "is generally ok but needs more work", "I disagree with it conceptually", "conflicts with work in other areas, should wait" or "I can't say, just wanted to review it but didn't have time" or something like that) . It looks like progress on this patch has now stalled and the -1 basically blocks it (no progress or reviews since then). -
Guido Schmechel uploaded patch set 7
CR -1V +108/09/23, 19:23 -
core-ci voted on patch set 7 V -1 08/09/23, 19:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45290
-
Guido Schmechel uploaded patch set 8
V -108/09/23, 19:40 -
core-ci voted on patch set 8 V -1 08/09/23, 19:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45291
-
Guido Schmechel uploaded patch set 9
V -108/09/23, 19:54 -
core-ci voted on patch set 9 V +1 08/09/23, 20:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45293
-
Stefan Bürk commented on patch set 9 08/10/23, 12:16
Reply
TBH - I can' rember it exactly. Basically it was "temp -1 I want to review it with time because I have seen something I'm want to verify" or something like that. Cannot rember what it was. I remember, started doing a review and have been disturbed by other things back than and then forgot about it. So, ignore my temp -1 for now so other can review or work on it. Will have a review if I find time. -
Stefan Bürk wrote 08/10/23, 14:37
Removed reviewer Stefan Bürk. -
Guido Schmechel commented on patch set 9 08/10/23, 15:14
Reply
A little background: we had been working on EXT:redirects in parallel at the time, and I had some major changes in mind as far as the integrity status was concerned. So we had blocked that at that time. That should have been resolved now that the event is already there. (And will be extended again with this patch). -
Stefan Bürk commented on patch set 9 CR -1 09/26/23, 09:31
Feature-99485-ShowTheRedirectIntegrityStatus.rst:14This rest file should contain some more context. At least, we need to communicate that the `ModifyRedirectManagementControllerViewDataEvent` got a new property along with a getter and setter.Demand.php:55As already commented for the enum, ext_tables and tca we should go more for a string based integrity status - which needs to be adopted here too.RedirectConflict.php:23TBH I'm not sure if a enum is the right choice for this. Enum's cannot be extended as they are `final` by PHP nativly. That make's further enhancement in this area nearly impossible. Granted, currently it's more a "internal" usage and only used in the core check implementation. But I see the danger that the enum may be spreaded and used as method arguments and for checks in the future and eventually undergo the review process not having further events for extension developers in mind. Therefore, I would say we should avoid introducing this enum in core here.sys_redirect.php:290See comment for `ext_tables.sql` - We should more move to a string value for the integrity_status field and using here the string equialent as default value, same for the other options for this select field.ext_tables.sql:10Maybe we should go more for a `VARCHAR(180)` field with a index on it here. That allows to have readable values directly in the database, and additionally being more prepared for later opening enhancement to extension developers. That would also avoid the need of `int => description` mapping somewhere. Additionally, extension authors could prefix there "values" to avoid conflicts with core and other extensions. I guess, that it's more unlikely to implement further conflict type and checking in the core, but having it open and easily extendable for extension developers, public or private, should be in our minds here. What do you think ? -
Sybille Peters commented on patch set 9 09/26/23, 09:46
@Stefan @Guido Can we assume this is a change which is generally mergeable from a conceptual point of view? I think it might be good to decide this at least roughly before we put a lot of effort into reviews and changes. I think the idea is good and it makes sense to show the integrity status in the list, however I had not had a closer look yet. -
Stefan Bürk commented on patch set 9 09/26/23, 10:14
Reply
From a general point of view I would say that this makes sense, conceptually. However, it's only a start. Without follow up patches open this up for extension developers, for example giving the a way to do custom integrity checks based on some hooks or providers, the full power would reveal this. Will have a deeper look into this later - reading your comments, my mind is considering if we should have not only a integrity check status on the record it self but more a check history or something like that. Will look if that would need to be done first or if that can be a follow up. And other further use-cases and improvements. However, having the current styte somehow persisted and displayed / filterable in the redirects managemnet view makes sense for me anyway. -
Guido Schmechel commented on patch set 9 09/26/23, 11:10
ext_tables.sql:10ReplyWe can gladly go the string way. I just had in mind to work with integers when it comes to DB filtering and so on. So the change is fine for me. Enum was a decision, because recently more enums came into the core. What would be a sensible and expandable alternative for you? Working with class constants and later adding an event to be able to register further conflict types? Then it would still be readable and extension developers could hook into it. You are welcome to give a direction there. The patch should definitely give a good direction, as it is a basis for several follow-up patches. -
Guido Schmechel uploaded patch set 10
CR -1V +110/21/23, 19:24 -
core-ci voted on patch set 10 V -1 10/21/23, 19:32 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48012
-
Guido Schmechel uploaded patch set 11
V -110/21/23, 20:04 -
core-ci voted on patch set 11 V -1 10/21/23, 20:11 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48013
-
Guido Schmechel uploaded patch set 12
V -110/21/23, 20:26 -
core-ci voted on patch set 12 V -1 10/21/23, 20:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48014
-
Guido Schmechel uploaded patch set 13
V -110/21/23, 20:54 -
core-ci voted on patch set 13 V +1 10/21/23, 21:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48015
-
Guido Schmechel commented on patch set 13 10/21/23, 21:09
Feature-99485-ShowTheRedirectIntegrityStatus.rst:14ReplyDoneDemand.php:55ReplyDoneRedirectConflict.php:23ReplyDonesys_redirect.php:290ReplyDoneext_tables.sql:10ReplyDone -
Guido Schmechel uploaded patch set 14
V +110/21/23, 22:58 -
core-ci voted on patch set 14 V +1 10/21/23, 23:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48018
-
Guido Schmechel commented on patch set 14 10/21/23, 23:09
"Ready to review" again after all the changes. There is no UpgradeWizard for the new field, as SQL will automatically enter the default value. -
Guido Schmechel commented on patch set 14 10/22/23, 07:32
With the extension for developers in a FollowUp patch, I thought that the RedirectConflict class gets an array that can be changed via PSR-14 event. And there should also be an itemsProcFunction for the TCA. The question is whether the work without PSR-14 event already belongs in this patch? So that the FollowUp patch is really only about the PSR-14 event. -
Stefan Bürk voted on patch set 14 CR -1 10/23/23, 15:45
-
Guido Schmechel uploaded patch set 15
CR -1V +110/26/23, 21:48 -
core-ci voted on patch set 15 V +1 10/26/23, 21:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/48268
-
Guido Schmechel commented on patch set 15 CR -1 10/26/23, 22:08
Just a rebase, already -1 from Stefan -
Stefan Bürk commented on patch set 15 10/26/23, 22:18
Reply
The -1 was that I wanted to review it and change some details I already saw. Just got distracted. I try to do that the next days, but have some points to finish before. Thanks for rebasing and reapplying the -1 ;). (And already thanks for addressing earlier comments !!!) -
Simon Schaufelberger uploaded patch set 16
CR -1V +112/22/23, 01:16 -
core-ci voted on patch set 16 V +1 12/22/23, 01:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50892
-
Stefan Bürk uploaded patch set 17
V +101/06/24, 15:46 -
Stefan Bürk voted on patch set 17 CR +1 V +1 01/06/24, 15:46
-
core-ci voted on patch set 17 V +1 01/06/24, 15:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51167
-
Markus Klein commented on patch set 17 CR -1 01/06/24, 21:53
Demand.php:71Why is this nullable?RedirectRepository.php:191c&p mistakeIntegrityService.php:91are we still referencing PDO directly?RedirectConflict.php:23Convert this to an enum maybe? -
Stefan Bürk commented on patch set 17 01/06/24, 22:05
Demand.php:71Replynull = no filter (all records)IntegrityService.php:91ReplyNope - Had that in mind last year, but forgot to change it today. Good catch. Will push replacing it.RedirectConflict.php:23ReplyNope, read the comments already. Enums cannot be extended. And for simply string value constants enums are not a really good match. However, I already thought about removing it at all - but there are some places in the core/this change which uses the values. -
Stefan Bürk uploaded patch set 18
CR +1V +101/06/24, 22:07 -
Stefan Bürk commented on patch set 18 01/06/24, 22:08
RedirectRepository.php:191ReplyDoneIntegrityService.php:91ReplyDone -
Stefan Bürk commented on patch set 18 01/06/24, 22:12
RedirectConflict.php:23ReplyI highly vote against a enum here. It removes the risk, that the enum may be used later in a event or passed as method arguments, and therefore making custom integrity types impossible. To avoid this from the start, we either use the class with constants (which can be extended in custom extension to have them combined) - but are not passable directly - or remove it at all and replace the current usages with the strings directly. Personally, I would drop this completly but kept the class constants way as compromise for the original intended enum solution. My thoughts are coming from own plans and after a call with Guido about his plans. What do you think ? -
core-ci voted on patch set 18 V +1 01/06/24, 22:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51173
-
Stefan Bürk updated the commit message in patch set 19
V +101/06/24, 22:18 -
core-ci voted on patch set 19 V +1 01/06/24, 22:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51174
-
Markus Klein commented on patch set 19 01/07/24, 18:41
RedirectConflict.php:23ReplyTotally fine with me to keep it like that. Thanks.
-
Markus Klein voted on patch set 19 CR +1 01/07/24, 18:41
-
Stefan Bürk voted on patch set 19 CR +1 V +1 01/10/24, 15:55
-
Anja Leichsenring updated the commit message in patch set 20
CR +1V +101/14/24, 08:31 -
core-ci voted on patch set 20 V +1 01/14/24, 08:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51546
-
Anja Leichsenring commented on patch set 20 CR +1 V +1 01/14/24, 08:41
very nice, thank you! -
Anja Leichsenring uploaded patch set 21
CR +1V +101/14/24, 08:50 -
Anja Leichsenring uploaded patch set 22 01/14/24, 08:52
-
Anja Leichsenring commented on patch set 22 CR +1 V +1 01/14/24, 08:53
sorry for the repush, I messed up the branches. Back to PS 20 now, adjusted commit message. No functional changes. -
core-ci voted on patch set 21 V +1 01/14/24, 08:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51547
-
core-ci voted on patch set 22 V +1 01/14/24, 09:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51548
-
Stefan Bürk uploaded patch set 23
CR +1V +101/14/24, 20:17 -
Stefan Bürk commented on patch set 23 CR +1 V +1 01/14/24, 20:18
solved merge conflig in language file (recently merged change adding also an entry) -
core-ci voted on patch set 23 V +1 01/14/24, 20:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51560
-
Simon Schaufelberger commented on patch set 23 01/14/24, 23:17
locallang.xlf:38indentation looks wrong here. -
Stefan Bürk uploaded patch set 24
CR +1V +101/15/24, 08:24 -
Stefan Bürk commented on patch set 24 CR +1 V +1 01/15/24, 08:25
locallang.xlf:38ReplyDone -
core-ci voted on patch set 24 V +1 01/15/24, 08:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/51568
-
Stefan Bürk commented on patch set 24 CR -1 01/17/24, 02:03
ext_tables.sql:7I would say, we do not need to add the integrity_status here. Should be generated automatically based on default TCA schema generation. TBH - not tested yet. -
Stefan Bürk uploaded patch set 25
CR -1V +101/24/24, 23:33 -
Stefan Bürk commented on patch set 25 01/24/24, 23:34
ext_tables.sql:7ReplyRemoved the entry and added a dblength to the tca configuration. TYPO3 core will create the field based on that information. Default value is respected by the form-engine, and I added it to the auto-redirect creation manually for now along with a todo that this should be read from TCA defaults anyway. -
core-ci voted on patch set 25 V +1 01/24/24, 23:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/52119
-
Stefan Bürk voted on patch set 25 CR +1 V +1 01/25/24, 00:53
-
Anja Leichsenring voted on patch set 25 CR +1 V +1 01/25/24, 08:33
-
Stefan Bürk voted on patch set 25 CR +2 V +2 01/25/24, 08:34
-
Stefan Bürk merged patch set 26 01/25/24, 08:34
RedirectConflictUtility.php:23