Skip to content

Commit

Permalink
Merge pull request #593 from deguif/guard-file-link-filter
Browse files Browse the repository at this point in the history
Use file_link filter only when available
  • Loading branch information
goetas authored Jan 7, 2025
2 parents d1f7e18 + 42526ed commit 280f0e9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 33 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,14 @@ jobs:
fail-fast: false
matrix:
symfony-version:
- '^4.4'
- '^5.4'
- '^6.4'
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.3"
- "8.4"
dependencies:
- "lowest"
- "highest"
exclude:
- symfony-version: '^6.4'
php-version: '7.4'
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.4"

steps:
- name: "Checkout"
Expand Down
14 changes: 10 additions & 4 deletions Resources/views/Translate/messages.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@
<h6>Sources</h6>
<ul>
{% for source in message.sources %}
{%- set link = source.path|file_link(source.line) %}
{%- if link %}<a href="{{ link }}" title="{{ source }}">{% else %}<span>{% endif %}
<li class="jms-sources-list-item truncate-left">{{ source }}</li>
{%- if link %}</a>{% else %}</span>{% endif %}
{% guard filter file_link %}
{%- set link = source.path|file_link(source.line) %}
{%- if link %}<a href="{{ link }}" title="{{ source }}">{% else %}<span>{% endif %}
<li class="jms-sources-list-item truncate-left">{{ source }}</li>
{%- if link %}</a>{% else %}</span>{% endif %}
{% else %}
<span>
<li class="jms-sources-list-item truncate-left">{{ source }}</li>
</span>
{% endguard %}
{% endfor %}
</ul>
{% endif %}
Expand Down
42 changes: 21 additions & 21 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"nikic/php-parser": "^4.9 || ^5",
"symfony/console": "^4.3 || ^5.4 || ^6.0",
"symfony/expression-language": "^4.3 || ^5.4 || ^6.0",
"symfony/framework-bundle": "^4.3 || ^5.4 || ^6.0",
"symfony/config": "^4.3 || ^5.4 || ^6.2",
"symfony/translation": "^4.3 || ^5.4 || ^6.0",
"symfony/translation-contracts": "^1.1 || ^2.0 || ^3.0",
"symfony/validator": "^4.3 || ^5.4 || ^6.0",
"twig/twig": "^2.13.1 || ^3.0",
"php": "^8.1",
"nikic/php-parser": "^5",
"symfony/console": "^5.4 || ^6.4",
"symfony/expression-language": "^5.4 || ^6.4",
"symfony/framework-bundle": "^5.4 || ^6.4",
"symfony/config": "^5.4 || ^6.4",
"symfony/translation": "^5.4 || ^6.4",
"symfony/translation-contracts": "^2.0 || ^3.0",
"symfony/validator": "^5.4 || ^6.4",
"twig/twig": "^3.15",
"psr/log": "^1.0 || ^2.0"
},
"require-dev": {
"doctrine/annotations": "^1.11",
"doctrine/coding-standard": "^8.2.1",
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
"nyholm/nsa": "^1.0.1",
"symfony/phpunit-bridge": "^4.4 || ^5.4 || ^6.4",
"symfony/phpunit-bridge": "^5.4 || ^6.4",
"sensio/framework-extra-bundle": "^6.2.4",
"symfony/asset": "^4.4 || ^5.4 || ^6.4",
"symfony/browser-kit": "^4.4 || ^5.4 || ^6.4",
"symfony/css-selector": "^4.4 || ^5.4 || ^6.4",
"symfony/filesystem": "^4.4 || ^5.4 || ^6.4",
"symfony/form": "^4.4 || ^5.4 || ^6.4",
"symfony/security-csrf": "^4.4 || ^5.4 || ^6.4",
"symfony/templating": "^4.4 || ^5.4 || ^6.4",
"symfony/property-access": "^4.4 || ^5.4 || ^6.4",
"symfony/routing": "^4.4.15 || ^5.4 || ^6.4",
"symfony/twig-bundle": "^4.4 || ^5.4 || ^6.4",
"symfony/asset": "^5.4 || ^6.4",
"symfony/browser-kit": "^5.4 || ^6.4",
"symfony/css-selector": "^5.4 || ^6.4",
"symfony/filesystem": "^5.4 || ^6.4",
"symfony/form": "^5.4 || ^6.4",
"symfony/security-csrf": "^5.4 || ^6.4",
"symfony/templating": "^5.4 || ^6.4",
"symfony/property-access": "^5.4 || ^6.4",
"symfony/routing": "^5.4 || ^6.4",
"symfony/twig-bundle": "^5.4 || ^6.4",
"symfony/flex": "^1.19 || ^2.0"
},
"config": {
Expand Down

0 comments on commit 280f0e9

Please sign in to comment.