81303[FEATURE] Allow redirect filtering by "protected" state
Commit message
Review
-
Code review CR +2 Done
- Stefan Bürk +2
- Garvin Hicking +1
-
Verified V +2 Done
- Stefan Bürk +2
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 12
- typo3/sysext/core/Documentation/Changelog/13.0/Feature-102072-AllowRedirectFilteringByProtectedState.rst2new+28 −0
- typo3/sysext/core/Tests/Acceptance/Application/Redirect/RedirectModuleCest.php+4 −4
- typo3/sysext/redirects/Classes/Repository/Demand.php2+21 −3
- typo3/sysext/redirects/Classes/Repository/RedirectRepository.php2+9 −2
- typo3/sysext/redirects/Documentation/Images/RedirectList.pngbinary
- typo3/sysext/redirects/Documentation/Usage/Index.rst+1 −1
- typo3/sysext/redirects/Resources/Private/Language/locallang_module_redirect.xlf+15 −0
- typo3/sysext/redirects/Resources/Private/Templates/Management/Overview.html+19 −0
- typo3/sysext/redirects/Tests/Functional/Controller/ManagementControllerTest.php+1 −1
- typo3/sysext/redirects/Tests/Functional/Repository/Fixtures/RedirectRepositoryTest_redirects.csv+7 −7
- typo3/sysext/redirects/Tests/Functional/Repository/RedirectRepositoryTest.php2+17 −2
- typo3/sysext/redirects/Tests/Unit/Repository/DemandTest.php+44 −8
Review log 1420
-
Torben Hansen uploaded patch set 1 09/30/23, 12:48
-
core-ci voted on patch set 1 V -1 09/30/23, 12:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47319
-
Chris Müller uploaded patch set 2
V -109/30/23, 16:38 -
Chris Müller uploaded patch set 3 09/30/23, 16:41
-
core-ci voted on patch set 2 V -1 09/30/23, 16:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47320
-
core-ci voted on patch set 3 V -1 09/30/23, 16:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47321
-
Torben Hansen uploaded patch set 4
V -110/01/23, 05:36 -
core-ci voted on patch set 4 V +1 10/01/23, 05:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47325
-
Garvin Hicking commented on patch set 4 10/02/23, 16:44
Looks good to me, but I only read the code, couldn't test this yet, but maybe some feedback is helpful :-)Feature-102072-AllowRedirectFilteringByProtectedState.rst:6May be self-explanatory for many people, but I haven't worked much with redirects (yet) - so I wonder, what are "protected" redirects? Ones that can never be modified/deleted again? Maybe one short sentence or an addition in parantheses could quickly shed light on the question "what is a protected redirect"?Demand.php:128Would that mean when invoked from a CLI, where previously both protected and unprotected redirects were yielded, this now only yields unprotected ones? Could that be a BC-break worth noting, and it may be set to "-1" at this point? And/or add a getOption() possibility for this? (Disregard please if what I'm asking is nonsense, just trying to read the code)RedirectRepositoryTest.php:188Is this maybe missing the $protected demand property? -
Torben Hansen uploaded patch set 5
V +110/03/23, 04:47 -
Torben Hansen commented on patch set 4 10/03/23, 04:48
Feature-102072-AllowRedirectFilteringByProtectedState.rst:6ReplyA protected redirect is excluded from automatic deletion (see https://docs.typo3.org/c/typo3/cms-redirects/main/en-us/Usage/Index.html#confval-Protected). Added a short addition in the description of the feature.Demand.php:128ReplyI removed this again, so users using this method will not have a `0` as default for the protected property in the demand object. Currently, this method is only used once for the CLI redirects cleanup task, which only processes non protected redirects (see hardcoded constraint in `RedirectRepository->removeByDemand()`)RedirectRepositoryTest.php:188ReplyNo, we do not need it here, since the method is only used to create Demand objects for the `removeByDemandWorks` tests, which only processes redirects that are not protected (see hardcoded constraint in `RedirectRepository->removeByDemand()`) -
core-ci voted on patch set 5 V +1 10/03/23, 04:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47364
-
Garvin Hicking commented on patch set 5 V +1 CR +1 10/03/23, 09:04
Great, thanks for the explanations and changes! I just tested it, works well for me! -
Stefan Bürk commented on patch set 5 CR -1 10/05/23, 08:21
on it ...RedirectRepository.php:139We should not use the PDO constants directly. Instead `Connection::PARAM_*` constants should be used. We had a sanitatzion patch for that, however the one for the creation type slipped in - I already detected that for the POC doctrine/dbal upgrade work. -
Stefan Bürk uploaded patch set 6
CR +1V +110/05/23, 08:29 -
Stefan Bürk commented on patch set 6 10/05/23, 08:29
RedirectRepository.php:139ReplyDone -
Garvin Hicking voted on patch set 6 V +1 CR +1 10/05/23, 08:35
-
core-ci voted on patch set 6 V +1 10/05/23, 08:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47423
-
Stefan Bürk voted on patch set 6 V +2 CR +2 10/05/23, 08:50
-
Stefan Bürk merged patch set 7 10/05/23, 08:50