Skip to content

Commit f7770a3

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: prevent the installation of unstable phpdocumentor/type-resolver releases chore: fix typo 'do' verb [Twig Bridge] Add PHPdoc information to some email methods Amend MoneyType twig to include a space. [WebProfilerBundle] Remove redundant code from logger template
2 parents 5a0b963 + 4f3bc60 commit f7770a3

8 files changed

+20
-7
lines changed

Mime/WrappedTemplatedEmail.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ public function toName(): string
3535
return $this->message->getTo()[0]->getName();
3636
}
3737

38+
/**
39+
* @param string $image A Twig path to the image file. It's recommended to define
40+
* some Twig namespace for email images (e.g. '@email/images/logo.png').
41+
* @param string|null $contentType The media type (i.e. MIME type) of the image file (e.g. 'image/png').
42+
* Some email clients require this to display embedded images.
43+
*/
3844
public function image(string $image, string $contentType = null): string
3945
{
4046
$file = $this->twig->getLoader()->getSourceContext($image);
@@ -47,6 +53,13 @@ public function image(string $image, string $contentType = null): string
4753
return 'cid:'.$image;
4854
}
4955

56+
/**
57+
* @param string $file A Twig path to the file. It's recommended to define
58+
* some Twig namespace for email files (e.g. '@email/files/contract.pdf').
59+
* @param string|null $name A custom file name that overrides the original name of the attached file.
60+
* @param string|null $contentType The media type (i.e. MIME type) of the file (e.g. 'application/pdf').
61+
* Some email clients require this to display attached files.
62+
*/
5063
public function attach(string $file, string $name = null, string $contentType = null): void
5164
{
5265
$file = $this->twig->getLoader()->getSourceContext($file);

Resources/views/Form/bootstrap_4_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{%- set prepend = not (money_pattern starts with '{{') -%}
77
{%- set append = not (money_pattern ends with '}}') -%}
88
{%- if prepend or append -%}
9-
<div class="input-group{{ group_class|default('') }}">
9+
<div class="input-group {{ group_class|default('') }}">
1010
{%- if prepend -%}
1111
<div class="input-group-prepend">
1212
<span class="input-group-text">{{ money_pattern|form_encode_currency }}</span>

Resources/views/Form/bootstrap_5_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{%- set prepend = not (money_pattern starts with '{{') -%}
77
{%- set append = not (money_pattern ends with '}}') -%}
88
{%- if prepend or append -%}
9-
<div class="input-group{{ group_class|default('') }}">
9+
<div class="input-group {{ group_class|default('') }}">
1010
{%- if prepend -%}
1111
<span class="input-group-text">{{ money_pattern|form_encode_currency }}</span>
1212
{%- endif -%}

Resources/views/Form/bootstrap_base_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{% set prepend = not (money_pattern starts with '{{') %}
1212
{% set append = not (money_pattern ends with '}}') %}
1313
{% if prepend or append %}
14-
<div class="input-group{{ group_class|default('') }}">
14+
<div class="input-group {{ group_class|default('') }}">
1515
{% if prepend %}
1616
<span class="input-group-addon">{{ money_pattern|form_encode_currency }}</span>
1717
{% endif %}

Tests/Extension/AbstractBootstrap4LayoutTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ public function testMoney()
11651165

11661166
$this->assertWidgetMatchesXpath($form->createView(), ['id' => 'my&id', 'attr' => ['class' => 'my&class']],
11671167
'/div
1168-
[@class="input-group"]
1168+
[@class="input-group "]
11691169
[
11701170
./div
11711171
[@class="input-group-prepend"]

Tests/Extension/AbstractBootstrap5LayoutTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,7 @@ public function testMoney()
14501450

14511451
$this->assertWidgetMatchesXpath($form->createView(), ['id' => 'my&id', 'attr' => ['class' => 'my&class']],
14521452
'/div
1453-
[@class="input-group"]
1453+
[@class="input-group "]
14541454
[
14551455
./span
14561456
[@class="input-group-text"]

Tests/Extension/FormExtensionBootstrap4LayoutTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function testMoneyWidgetInIso()
102102
;
103103

104104
$this->assertSame(<<<'HTML'
105-
<div class="input-group"><div class="input-group-prepend">
105+
<div class="input-group "><div class="input-group-prepend">
106106
<span class="input-group-text">&euro; </span>
107107
</div><input type="text" id="name" name="name" required="required" class="form-control" /></div>
108108
HTML

Tests/Extension/FormExtensionBootstrap5LayoutTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function testMoneyWidgetInIso()
104104
->createView();
105105

106106
self::assertSame(<<<'HTML'
107-
<div class="input-group"><span class="input-group-text">&euro; </span><input type="text" id="name" name="name" required="required" class="form-control" /></div>
107+
<div class="input-group "><span class="input-group-text">&euro; </span><input type="text" id="name" name="name" required="required" class="form-control" /></div>
108108
HTML
109109
, trim($this->renderWidget($view)));
110110
}

0 commit comments

Comments
 (0)