Skip to content

Commit 5b32f5a

Browse files
committed
Merge branch '2.x' into 3.x
* 2.x: Run Twig-CS-Fixer on all repo's files, follow symfony#3263
2 parents 96c91d7 + 7a2fb41 commit 5b32f5a

33 files changed

+59
-59
lines changed

.twig-cs-fixer.dist.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414

1515
$finder = new TwigCsFixer\File\Finder();
1616

17-
// Some directories may not exist when running Fabbot action, if no files under them were changed.
18-
$finder->in(array_filter([__DIR__.'/src', __DIR__.'/apps'], is_dir(...)));
19-
$finder->notPath('#/Fixtures/#');
20-
$finder->notPath('#/assets/#');
21-
$finder->notPath('#/var/#');
22-
// apps/
23-
$finder->notPath(['#config/#', '#public/#', 'importmap.php'])
24-
2517
$config = new TwigCsFixer\Config\Config();
2618
$config->setCacheFile('.twig-cs-fixer.cache');
2719
$config->setRuleset($ruleset);
28-
$config->setFinder($finder);
20+
$config->setFinder(
21+
(new TwigCsFixer\File\Finder)
22+
->in(__DIR__)
23+
->notPath('#/Fixtures/#')
24+
->notPath('#/assets/#')
25+
->notPath('#/var/#')
26+
// apps/
27+
->notPath(['#config/#', '#public/#', 'importmap.php'])
28+
);
2929

3030
return $config;

ux.symfony.com/templates/components/Button.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
variant: ['destructive'],
3232
outline: ['true'],
3333
class: 'border-destructive',
34-
}]
34+
}],
3535
) -%}
3636

3737
<button
38-
class="{{ style.apply({variant, outline, size}, attributes.render('class'))|tailwind_merge }}"
38+
class="{{ style.apply({variant: variant, outline: outline, size: size}, attributes.render('class'))|tailwind_merge }}"
3939
{{ attributes.defaults({}).without('class') }}
4040
>
4141
{% block content %}{% endblock %}

ux.symfony.com/templates/components/Code/CodeWithExplanationRow.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div {{ attributes.defaults({
22
class: 'row mb-5 py-4 position-relative ' ~ (this.sticky|default ? 'align-items-start' : 'align-items-center'),
3-
style: '--bs-gutter-x: 4rem'
3+
style: '--bs-gutter-x: 4rem',
44
}) }}>
55
<div class="col-12 col-md-{{ 12 - this.codeCols }} code-description {{ not reversed ? 'order-md-2' }}"
66
style="{% if reversed %}padding-inline-end: 0;{% endif %} {{ this.sticky|default ? 'position: sticky; top: 4rem;' }}">

ux.symfony.com/templates/components/Code/TabbedCodeBlocks.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div {{ attributes.defaults({
2-
class: 'position-relative'
2+
class: 'position-relative',
33
}) }}>
44
<div class="Terminal">
55
<div class="Terminal_header pb-0">

ux.symfony.com/templates/components/HomepageTerminalSwapper.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div {{ attributes.defaults({
2-
class: 'homepage-terminal-swapper'
2+
class: 'homepage-terminal-swapper',
33
}) }}>
44
{% component Terminal with {height: '180px', bottomPadding: 0, processContents: false} %}
55
{% block content -%}

ux.symfony.com/templates/components/Icon/IconModal.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
{% for _tab, _label in {
5555
icon: 'Icon',
5656
svg: 'SVG code',
57-
meta: 'Metadata'
57+
meta: 'Metadata',
5858
} %}
5959
<button
6060
class="TabControl"

ux.symfony.com/templates/components/Package/SearchPackages.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<div class="PackageList pt-3" data-loading="addClass(opacity-50)">
66
{% for package in computed.packages %}
7-
{{ include('components/Package/PackageListItem.html.twig', {package}) }}
7+
{{ include('components/Package/PackageListItem.html.twig', {package: package}) }}
88
{% else %}
99
No packages found "{{ query }}"
1010
{% endfor %}

ux.symfony.com/templates/components/RegistrationForm.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
novalidate: true,
1010
'data-action': 'live#action:prevent',
1111
'data-live-action-param': 'saveRegistration',
12-
}
12+
},
1313
}) }}
1414
{{ form_row(form.email) }}
1515
{{ form_row(form.password) }}

ux.symfony.com/templates/components/TodoListForm.html.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
{{ form_row(form.name, {
88
label: false,
99
attr: {
10-
placeholder: 'Give your list a name'
11-
}
10+
placeholder: 'Give your list a name',
11+
},
1212
}) }}
1313
</div>
1414
</div>
@@ -28,8 +28,8 @@
2828
label: false,
2929
row_attr: {class: 'mb-1'},
3030
attr: {
31-
placeholder: 'Walk the pygmy hippo'
32-
}
31+
placeholder: 'Walk the pygmy hippo',
32+
},
3333
}) }}
3434
</td>
3535
<td>

ux.symfony.com/templates/demos/live_memory/components/LiveMemory/Board.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<div id="live-memory-score" class="LiveMemory-Score {{ game.isEnded ? 'on' : 'hidden' }}">
2828
{% if game.isEnded %}
29-
{{ include('demos/live_memory/components/LiveMemory/Score.html.twig', {game}) }}
29+
{{ include('demos/live_memory/components/LiveMemory/Score.html.twig', {game: game}) }}
3030
{% endif %}
3131
</div>
3232
</div>

0 commit comments

Comments
 (0)