8000 bug #32012 Add statement to fileLink to ignore href code when no file… · symfony/symfony@9865988 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9865988

Browse files
committed
bug #32012 Add statement to fileLink to ignore href code when no fileLink. (bmxmale)
This PR was merged into the 4.3 branch. Discussion ---------- Add statement to fileLink to ignore href code when no fileLink. | Q | A | ------------- | --- | Branch? | 4.3 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? |no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> <!-- Replace this notice by a short README for your feature/bugfix. This will help people understand your PR and can be used as a start for the documentation. Additionally (see https://symfony.com/roadmap): - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against branch 4.4. - Legacy code removals go to the master branch. --> This fix add statement to `\Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor::formatControllerLink` to fix display bug. **Before** ![image](https://user-images.githubusercontent.com/23213308/59355771-ed8a1000-8d27-11e9-998f-fa2fc34edd62.png) **After** ![image](https://user-images.githubusercontent.com/23213308/59355785-f2e75a80-8d27-11e9-953b-7523e0c9ad35.png) Commits ------- b9eab42 Add statement to fileLink to ignore href code when no fileLink.
2 parents 648aa67 + b9eab42 commit 9865988

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,11 @@ private function formatControllerLink($controller, string $anchorText): string
557557
}
558558

559559
$fileLink = $this->fileLinkFormatter->format($r->getFileName(), $r->getStartLine());
560+
if ($fileLink) {
561+
return sprintf('<href=%s>%s</>', $fileLink, $anchorText);
562+
}
560563

561-
return sprintf('<href=%s>%s</>', $fileLink, $anchorText);
564+
return $anchorText;
562565
}
563566

564567
private function formatCallable($callable): string

0 commit comments

Comments
 (0)
0