98379[FEATURE] Select linkvalidator linktypes by the link type
Commit message
A custom link handler is validated by a linktype whose identifier equals the substitution type of the soft reference, such as "shop". The reference index does not know such types and ignores the link, and soft reference objects only support records and values. The link validator now passes the link type of the soft reference substitution to the linktypes as "linkType", next to the "type". AbstractLinktype::fetchType() selects a linktype by either of them. Event listeners for custom link handlers can now add their soft references as objects with addSoftReference() and are still checked by their linktype. The documentation uses this way now. LinktypeInterface keeps its array based signatures, so existing linktypes keep working.
Show more Show less
Resolves: #111737 Related: #111730 Releases: main Change-Id: Ida9474f87cdb0837e6e32730c1291756c3a2c95e
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 1
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/79/98379/1 && git checkout FETCH_HEAD
- Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/79/98379/1 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V 0 Needs a vote
- core-ci +1 CI
Relation chain 5
- 98380[TASK] Deprecate the array representation of soft references
-
98379 [FEATURE] Select linkvalidator linktypes by the link type This change
- 98378[TASK] Replace soft reference tokens in one place
- 98377[FEATURE] Provide soft references in AppendLinkHandlerElementsEvent
- 98363[FEATURE] Provide soft references as value objects
Merge conflicts 31
- 96543[WIP][POC][TASK] Write and read records by the same rules and rights
- 79154[!!!][BUGFIX] Handle typolinks with page?uid=current
- 98154[FEATURE] Use Monolog as backend of the TYPO3 logger
- 97533[FEATURE] Use symfony/lock for locking
- 92349[TASK] Replace deprecated usage for custom phpstan rule and add tests
- 97436[!!!][FEATURE] Link content elements as records
- 94552[WIP][FEATURE] Passwordless passkey login for the backend
- 97641[WIP][TASK] Reuse Styleguide fixtures on all databases
- 97655[TEST][TASK] Test framework snapshot sequence metadata in Core
- 97630[!!!][FEATURE] Support dependency injection for routing aspects
- 97554[FEATURE] Introduce remote media providers
- 91666[TASK] Provide OpenAPI spec w/ Swagger UI for Actions API
- 91563[FEATURE] Introduce Action API
- 92197[WIP][FEATURE] Provide Record Actions
- 91486[FEATURE] Implement API Hub
- 95867[FEATURE] Render pages without TypoScript
- 96660[TASK] Derive argument schemas from signatures
- 96661[TASK] Add capability invoker and registry
- 96682[FEATURE] Add MCP system extension and endpoint
- 94709[BUGFIX] Fix sending spooled emails using HttpTransport
- 96533[WIP][!!!][TASK] Build Extbase persistence on doctrine/orm
- 96201[FEATURE] Introduce upload constraints for file uploads
- 95145[TASK] Migrate LanguageService->sL() labels to new domain syntax
- 88507[WIP][FEATURE] AI suggest demo using tools API
- 95337[WIP][TASK] Evaluate phpunit parallel test execution
- 94945[WIP][TASK] Test testing-framework context leak fix
- 94029[FEATURE] Add secrets store and key management
- 92068[WIP][TASK] Avoid Symfony v8 for transitive Symfony dependencies
- 85574[WIP][FEATURE] Language-aware slugs and slug normalizer API
- 76662[FEATURE] Introduce global routes
- 88232[WIP][TASK] fixture-packages composer plugin
Show 26 more changes Show less
Issues 2
Files 14
- typo3/sysext/core/Documentation/Changelog/15.0/Feature-111737-LinktypesMatchTheLinkTypeOfSoftReferences.rstnew+49 −0
- typo3/sysext/linkvalidator/Classes/Linktype/AbstractLinktype.php+4 −3
- typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php+25 −6
- typo3/sysext/linkvalidator/Documentation/Development/CustomLinkHandler.rst+10 −4
- typo3/sysext/linkvalidator/Documentation/Development/_CustomLinkHandlerLinktype.php.inc+11 −2
- typo3/sysext/linkvalidator/Documentation/Development/_CustomLinkHandlerListener.php.inc+11 −11
- typo3/sysext/linkvalidator/Tests/Functional/Fixtures/Extensions/test_softreference_linktype/Classes/EventListener/AddShopSoftReference.phpnew+40 −0
- typo3/sysext/linkvalidator/Tests/Functional/Fixtures/Extensions/test_softreference_linktype/Classes/Linktype/ShopLinktype.phpnew+37 −0
- typo3/sysext/linkvalidator/Tests/Functional/Fixtures/Extensions/test_softreference_linktype/Configuration/Services.yamlnew+8 −0
- typo3/sysext/linkvalidator/Tests/Functional/Fixtures/Extensions/test_softreference_linktype/composer.jsonnew+24 −0
- typo3/sysext/linkvalidator/Tests/Functional/Fixtures/expected_output_content_with_custom_link_handler.csvnew+3 −0
- typo3/sysext/linkvalidator/Tests/Functional/Fixtures/input_content_with_custom_link_handler.csvnew+6 −0
- typo3/sysext/linkvalidator/Tests/Functional/LinkAnalyzerTest.php+23 −0
- composer.json+1 −0
Review log 12
-
Benni Mack uploaded patch set 1 12/05/26, 21:50
-
core-ci voted on patch set 1 V +1 12/05/26, 22:07 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/116477