Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.
79154[BUGFIX] Handle typolinks with page?uid=current
Commit message
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 24
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/54/79154/24 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/54/79154/24 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V -1 Blocked
- core-ci -1 CI
Issues 2
Files 16
- typo3/sysext/core/Classes/Database/ReferenceIndex.php+6 −3
- typo3/sysext/core/Classes/DataHandling/SoftReference/EmailSoftReferenceParser.php+1 −1
- typo3/sysext/core/Classes/DataHandling/SoftReference/ExtensionPathSoftReferenceParser.php+1 −1
- typo3/sysext/core/Classes/DataHandling/SoftReference/SoftReferenceParserInterface.php6+3 −1
- typo3/sysext/core/Classes/DataHandling/SoftReference/SubstituteSoftReferenceParser.php+1 −1
- typo3/sysext/core/Classes/DataHandling/SoftReference/TypolinkSoftReferenceParser.php3+16 −4
- typo3/sysext/core/Classes/DataHandling/SoftReference/TypolinkTagSoftReferenceParser.php+16 −5
- typo3/sysext/core/Classes/DataHandling/SoftReference/UrlSoftReferenceParser.php+1 −1
- typo3/sysext/core/Documentation/Changelog/15.0/Deprecation-100934-IntroduceAddtitionalArgumentInSoftrefParseFunction.rstnew+74 −0
- typo3/sysext/core/Tests/Functional/Database/Fixtures/ReferenceIndex/UpdateIndexAddIndexPageLinkCurrent.csvnew+6 −0
- typo3/sysext/core/Tests/Functional/Database/Fixtures/ReferenceIndex/UpdateIndexAddIndexPageLinkCurrentResult.csvnew+9 −0
- typo3/sysext/core/Tests/Functional/Database/ReferenceIndexTest.php+8 −0
- typo3/sysext/core/Tests/Unit/DataHandling/SoftReference/TypoLinkSoftReferenceParserTest.php+14 −0
- typo3/sysext/core/Tests/Unit/DataHandling/SoftReference/TypoLinkTagSoftReferenceParserTest.php+36 −2
- typo3/sysext/form/Classes/SoftReference/FormPersistenceIdentifierSoftReferenceParser.php+1 −1
- typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php+2 −2
Review log 4064
Show 2239 earlier messages
-
Sybille Peters uploaded patch set 1 05/31/23, 09:57
-
Sybille Peters uploaded patch set 2 05/31/23, 10:05
-
core-ci voted on patch set 1 V -1 05/31/23, 10:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42107
-
core-ci voted on patch set 2 V -1 05/31/23, 10:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42108
-
Sybille Peters uploaded patch set 3 05/31/23, 10:24
Copied Votes: * Verified-1 (copy condition: "changekind:NO_CHANGE") -
core-ci voted on patch set 3 V -1 05/31/23, 10:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42109
-
Sybille Peters uploaded patch set 4
V -105/31/23, 11:13 -
core-ci voted on patch set 4 V -1 05/31/23, 11:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42110
-
Sybille Peters uploaded patch set 5
V -105/31/23, 12:27 -
core-ci voted on patch set 5 V +1 05/31/23, 12:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42112
-
Sybille Peters uploaded patch set 6
V +105/31/23, 13:32 -
core-ci voted on patch set 6 V -1 05/31/23, 13:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42115
-
Sybille Peters uploaded patch set 7
V -106/01/23, 07:44 -
Sybille Peters commented on patch set 7 06/01/23, 07:46
See discussion of various solutions for this in issue: https://forge.typo3.org/issues/100934#note-12 -
core-ci voted on patch set 7 V -1 06/01/23, 07:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42133
-
Sybille Peters uploaded patch set 8
V -106/01/23, 08:01 -
Sybille Peters uploaded patch set 9 06/01/23, 08:05
-
core-ci voted on patch set 8 V -1 06/01/23, 08:14 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42134
-
core-ci voted on patch set 9 V -1 06/01/23, 08:17 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42135
-
Sybille Peters uploaded patch set 10
V -106/01/23, 08:30 -
core-ci voted on patch set 10 V -1 06/01/23, 09:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42136
-
Sybille Peters uploaded patch set 11
V -106/01/23, 09:32 -
core-ci voted on patch set 11 V -1 06/01/23, 09:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42141
-
Sybille Peters uploaded patch set 12
V -106/01/23, 10:01 -
core-ci voted on patch set 12 V -1 06/01/23, 10:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42143
-
Sybille Peters uploaded patch set 13
V -106/01/23, 10:50 -
core-ci voted on patch set 13 V -1 06/01/23, 11:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42147
-
Sybille Peters uploaded patch set 14
V -106/01/23, 11:59 -
core-ci voted on patch set 14 V +1 06/01/23, 12:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42153
-
Sybille Peters uploaded patch set 15
V +106/01/23, 12:21 -
core-ci voted on patch set 15 V +1 06/01/23, 12:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42154
-
Sybille Peters updated the commit message in patch set 16
V +106/03/23, 08:42 -
core-ci voted on patch set 16 V +1 06/03/23, 08:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42182
-
Susi Moog commented on patch set 16 07/04/23, 14:34
TypolinkSoftReferenceParser.php:46How does this behave for pages? is pid correct there or should this be uid? -
Oliver Klee commented on patch set 16 08/03/23, 19:43
There is a merge conflict - we'll need a rebase for this.SoftReferenceParserInterface.php:46Can we remove the commented-out code and the corresponding `@param` annotation (which would remove the new PHPStan warning)? (We still can keep the `@todo` annotation and then add the PHPDoc annotation when we really add the array. Or we could create a ticket instead of having the commented-out code. What do you think? -
Jasmina Ließmann uploaded patch set 17
V +108/03/23, 21:39 -
core-ci voted on patch set 17 V +1 08/03/23, 21:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44996
-
Sybille Peters rebased onto patch set 18
V +108/12/23, 09:13 -
Sybille Peters commented on patch set 18 08/12/23, 09:14
Reply
Done
-
core-ci voted on patch set 18 V +1 08/12/23, 09:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45407
-
Sybille Peters commented on patch set 18 08/12/23, 09:36
SoftReferenceParserInterface.php:46ReplyJust removing the comment and @param annotation will not get rid of all phpstan warnings. What is current best practice for adding a new function parameter in a non-breaking way? Cleaner way I see is to introduce a new method and deprecate the old one. (I did ask what was best practice at the time, but this patch is now older so that might no longer apply). -
Sybille Peters commented on patch set 18 08/12/23, 09:36
TypolinkSoftReferenceParser.php:46ReplyGood point. Should be checked as well. I am on it ... -
Oliver Klee commented on patch set 18 08/12/23, 10:59
SoftReferenceParserInterface.php:46ReplyAFAIK, adding a new parameter and making it optional is non-breaking. If you do not want to add the new parameter yet, I would recommend creating a ticket instead of commented-out code. -
Sybille Peters commented on patch set 18 08/12/23, 14:29
SoftReferenceParserInterface.php:46ReplyAdding the parameter without commenting it out in the interface will break classes implementing SoftReferenceParserInterface (if they do not implement the method with the $row parameter). This can be handled in the core, but if extensions write their own SoftReferenceParsers based on SoftReferenceParserInterface this will break. e.g. ``` PHP Fatal error: Declaration of TYPO3\CMS\Core\DataHandling\SoftReference\EmailSoftReferenceParser::parse(string $table, string $field, int $uid, string $content, string $structurePath = ''): TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserResult must be compatible with TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserInterface::parse(string $table, string $field, int $uid, string $content, string $structurePath = '', array $row = []): TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserResult in /var/www/t3coredev13/typo3/sysext/core/Classes/DataHandling/SoftReference/EmailSoftReferenceParser.php on line 25 ``` I am trying to do this in 2 steps as recommended a couple of months ago via Slack when this patch was created, so the change will be announced now and breaking in next core version, see https://typo3.slack.com/archives/C03AM9R17/p1685546320706729 -
Sybille Peters uploaded patch set 19
V +108/12/23, 14:48 -
Sybille Peters commented on patch set 18 08/12/23, 14:48
TypolinkSoftReferenceParser.php:46ReplyDone -
core-ci voted on patch set 19 V +1 08/12/23, 14:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45418
-
Stefan Bürk commented on patch set 19 08/15/23, 13:08
SoftReferenceParserInterface.php:46ReplyI talked with Oliver Klee already about this. Adding my comments here for other reviewers. Olivers point was about avoiding outcomment code, which may become out of sync. That's usually a valid argument. However, in this special case the whole story is another one. The point is to integrate a further method argument into the interface, which is currently not possible without beeing breaking for developers implementing the interface. Adding the new argument as `@param` shows the available new argument for implementors, so they know that this argument can/should be passed. Mainly, because there is no native argument/typed argument. The outcommented argument is added, so people looking into the code see it directly there. This may be discussable, but I would say that this make sense. And with v14 there is no rethinking what to add - and if the @param comment is correct. It showes which argument(type) is planned for v14. This way to do it is nothing we came up with, but the way other open source libraries and framews are doing this. For example doctrine and symfony is using excatly that way to provide a upward awareness raising to be breaking on the next version. Implementing code can add the new argument directly and being compatible with v13 and v14 without having breaking issues in v14 than. That means, this is a sane way to having something breaking, but can be addressed in dual core version code without having hard headaches. Additionally, core implementations checks if the argument is passed or not, and emitting a deprecation that calling code should pass it. That does not help developers implementing the code, they just can adopt it. Example from symfony: * Inteface: https://github.com/symfony/symfony/pull/46567/files#diff-0acae78debaf9755135c1ca990f4c77d52df8ee1bdfc36d997230b6fdffa2171R24-R29 ``` public function createLoginLink( UserInterface $user, Request $request = null /*, int $lifetime = null */ ): LoginLinkDetails; ``` * Implemting code: https://github.com/symfony/symfony/pull/46567/files#diff-9a769cb79d1b50d804969e256e0443b7d98bc0e6bf421778ad3b22aa02849507R47 ``` public function createLoginLink( UserInterface $user, Request $request = null, int $lifetime = null ): LoginLinkDetails { // @todo implementation } ``` In this case, we need to live with the fact that a tool (phpstan) can't cope with the things we need to provide: The best possible way for extension/project developers and having a way to prepare before upgrading and doing dual version code in a easy way. Therefore, we accept the added phpstan baseline entry in this case. Until someone can come up with a better way to provide the best upgrade path for developers and making the tool happy I would say this is the only possible way for doing this on a interface level. And we are doing it the same way well known framework and libriers are doing it. I close this comment for now as resolved. The only point is - if we really should handle this as "deprecation" along with a deprecation rst file. Is this really a "deprecation" ? Maybe having a important rest file may be sufficient for this. Not sure. We can talk about that point. @Oliver Klee Is the explanation sufficient for you ?Deprecation-100934-DeprecateParseFunctionInSoftReferenceParsers.rst:57UnresolvedMaybe we can add a sentance / note that this can be done in v13 and avoiding being breaking in v14. Having one code for core 13 and v14 support. Can work for v12+v13 too - if not. It may be good to add a example to leave the method type out and retrieve the additional comment with `func_get_args()` along with a version check for v12 + v13 support in a custom implementation. -
Oliver Klee commented on patch set 19 08/15/23, 13:38
SoftReferenceParserInterface.php:46ReplyYes, this is sufficient for me. Thanks for writing this explanation (and for reaching out to me to talk beforehand)! -
Sybille Peters commented on patch set 19 CR -1 08/24/23, 05:01
Open comments should get resolvedDeprecation-100934-DeprecateParseFunctionInSoftReferenceParsers.rst:6Better to rename title: now sounds like function is being deprecated. We are only adding one optional argument. -
Sybille Peters uploaded patch set 20
CR -1V +108/24/23, 05:14 -
Sybille Peters commented on patch set 19 CR -1 08/24/23, 05:14
Deprecation-100934-DeprecateParseFunctionInSoftReferenceParsers.rst:6ReplyDone -
core-ci voted on patch set 20 V +1 08/24/23, 05:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45772
-
Sybille Peters uploaded patch set 21
V +108/24/23, 05:40 -
core-ci voted on patch set 21 V +1 08/24/23, 05:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45773
-
Oliver Klee wrote 10/08/23, 13:24
Removed cc Oliver Klee. -
Sybille Peters commented on patch set 21 06/22/24, 05:58
NotifySoftReferenceParser.php:42I am not sure how to proceed here. I tried rebasing and resolving conflicts, but there have been considerable changes, e.g. typo3/sysext/core/Classes/DataHandling/SoftReference/NotifySoftReferenceParser.php was deleted in HEAD and modified in this patch. I will recheck if bug still exists in latest main. If yes, advice would be appreciated - whether we should proceed with this solution. -
Sybille Peters commented on patch set 21 06/22/24, 06:05
NotifySoftReferenceParser.php:42Reply UnresolvedIssue https://forge.typo3.org/issues/100933 still reproducible -
Sybille Peters uploaded patch set 22
V +104/06/25, 07:59 -
core-ci voted on patch set 22 V -1 04/06/25, 08:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77066
-
Benni Mack uploaded patch set 23
V -109/25/26, 18:36 -
core-ci voted on patch set 23 V -1 09/25/26, 18:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109293
-
Benni Mack commented on patch set 24
V -110/02/26, 11:56Published edit on patch set 23. -
core-ci voted on patch set 24 V -1 10/02/26, 12:07 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109929