81405[BUGFIX] Use telephone as fallback for link text
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Garvin Hicking +1
-
Verified V +2 Done
- Oli Bartsch +2
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 2
Review log 1926
Show 1 earlier messages
-
Michael Hitzler uploaded patch set 1 10/10/23, 15:12
-
Michael Hitzler uploaded patch set 2 10/10/23, 15:14
-
core-ci voted on patch set 1 V -1 10/10/23, 15:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47654
-
core-ci voted on patch set 2 V +1 10/10/23, 15:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47655
-
Oliver Klee commented on patch set 2 10/10/23, 15:57
Looks in general quite good! I've added some comments concerning array accesses and the tests.TelephoneLinkBuilder.php:27Do we need to check if `$linkDetails['telephone']` is set here?TelephoneLinkBuilderTest.php:28I propose naming tests so that they form a complete (short) sentence with a statement about the tested behavior: https://speakerdeck.com/oliverklee/test-driven-development-with-phpunit-915a5f2c-3d37-4e41-b5bc-ef1efca9c01e?slide=39TelephoneLinkBuilderTest.php:37These two assertions are two separate pieces of behavior. I propose making two separate tests for this. (Ditto for the other test.)TelephoneLinkBuilderTest.php:38For tests, I generally recommend to use the strictest (or most specific) test possible, i.e., `assertSame` instead of `assertEquals` where possible. -
Daniel Siepmann uploaded patch set 3
V +110/11/23, 13:36 -
Daniel Siepmann commented on patch set 3 10/11/23, 13:39
TelephoneLinkBuilder.php:27ReplyI guess it will always be set. But this is a public class and it might be called by 3rd party code. So I've added a fallback, thanks.TelephoneLinkBuilderTest.php:28ReplyI hope the changes now are better suited?TelephoneLinkBuilderTest.php:37ReplyI've reduced to a single assert per test. Thanks.TelephoneLinkBuilderTest.php:38ReplyWe've copied the PageLinkBuilderTest as a base which used them. But I've updated as I also think more specific is better. -
core-ci voted on patch set 3 V +1 10/11/23, 13:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47684
-
Oliver Klee commented on patch set 3 V +1 CR +1 10/11/23, 14:05
TelephoneLinkBuilderTest.php:28ReplyYes, a lot better. Thanks! -
Garvin Hicking commented on patch set 3 V +1 10/11/23, 15:07
Could it be a valid case that integrators want to provide a link with no actual text (i.e. because they use CSS to style the link, use a button and title/attributes?) The way I read the fallback code, you wouldn't be able to pass an empty string like '' into it to receive something like: <a href="tel:0190331332" class="bootstrap-phone"></a> (Not an expert on the LinkBuilders, so if that wouldn't be used when generating such a link, I'm sorry, then just disregard) -
Daniel Siepmann commented on patch set 3 10/11/23, 15:09
Reply
I don't know. The change now streamlines the handling to work the same as existing links, e.g. Page, Folder, Email, etc. One could use return* in TypoScript or f:uri. Instead of f:link to build the a-Tag manual. I'd love to see all links to work the same. That would ease expectations and templates. -
Garvin Hicking updated the commit message in patch set 4
CR +1V +103/12/24, 20:58 -
Garvin Hicking commented on patch set 4 CR +1 V +1 03/12/24, 20:59
Adjusted to not backport to 11.5, I think this doesn't qualify for priority bugfix. Would be nice if we could get this merged for main&12! -
Oliver Klee voted on patch set 4 CR +1 V +1 03/12/24, 21:15
-
core-ci voted on patch set 4 V -1 03/13/24, 00:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54446
-
Oli Bartsch commented on patch set 4 CR -1 03/13/24, 07:37
Metadata found in doc-comment for method TYPO3\CMS\Frontend\Tests\Unit\Typolink\TelephoneLinkBuilderTest::respectsProvidedLinkParameter(). Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead. -
Daniel Siepmann uploaded patch set 5
CR +1V +103/13/24, 07:44 -
Oli Bartsch commented on patch set 4 CR 0 03/13/24, 07:44
Reply
Done -
Oli Bartsch uploaded patch set 6 03/13/24, 07:44
-
core-ci voted on patch set 5 V +1 03/13/24, 07:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54457
-
core-ci voted on patch set 6 V -1 03/13/24, 07:55 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54458
-
core-ci voted on patch set 6 V +1 03/13/24, 08:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54458
-
Garvin Hicking commented on patch set 6 CR +1 V +1 03/13/24, 08:38
(Restarted the CI job, seems that was a random selenium fluke) -
Oli Bartsch voted on patch set 6 CR +2 V +2 03/13/24, 09:07
-
Oli Bartsch merged patch set 7 03/13/24, 09:07