-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Create link_source_file helper to replace internal WebProfiler helper
#1456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,15 +30,15 @@ | |
| <div class="tab-content" id="myTabContent"> | ||
| <div class="tab-pane show active" id="controller-code" role="tabpanel" aria-labelledby="controller-tab"> | ||
| {% if controller %} | ||
| <p class="file-link">{{ controller.file_path|format_file(controller.starting_line) }}</p> | ||
| <p class="file-link">{{ link_source_file(controller.file_path, controller.starting_line) }}</p> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why making it a Twig function and not a filter ?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because both arguments are equally required. It seems more coherent to me to have them at the same level. |
||
| <pre><code class="php">{{ controller.source_code }}</code></pre> | ||
| {% else %} | ||
| <pre><code>{{ 'not_available'|trans }}</code></pre> | ||
| {% endif %} | ||
| </div> | ||
|
|
||
| <div class="tab-pane" id="template-code" role="tabpanel" aria-labelledby="template-tab"> | ||
| <p class="file-link">{{ template.file_path|format_file(template.starting_line) }}</p> | ||
| <p class="file-link">{{ link_source_file(template.file_path, template.starting_line) }}</p> | ||
| <pre><code class="twig">{{ template.source_code }}</code></pre> | ||
| </div> | ||
| </div> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
FileLinkFormatterclass was moved in Symfony 6.4, I'll wait for the demo project to be upgraded.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries. Let's merge this and then we'll update the other PR that upgrades the app to 6.4. Thanks.