Skip to content

Commit 67cb407

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: Bump Symfony version to 6.2.2 Update VERSION for 6.2.1 Update CHANGELOG for 6.2.1 [DependencyInjection] Fix `ContainerBuilder` stats env usage with enum [Mailer] Fix rendered templates for notifications [HttpKernel] Fix using entities with the #[Cache()] attribute [DependencyInjection] Remove refs that point to container.excluded services when allowed Revert "bug #48027 [DependencyInjection] Don't autoconfigure tag when it's already set with attributes (nicolas-grekas)" [WebProfilerBundle] Use same color as other icons for the close toolbar btn [Profiler] Fix the dump view panel
2 parents 94d6bbb + f57bcb6 commit 67cb407

File tree

16 files changed

+150
-50
lines changed

16 files changed

+150
-50
lines changed

CHANGELOG-6.2.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ in 6.2 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v6.2.0...v6.2.1
99

10+
* 6.2.1 (2022-12-06)
11+
12+
* bug #48502 [DependencyInjection] Fix `ContainerBuilder` stats env usage with enum (alamirault)
13+
* bug #48509 [HttpKernel] Fix using entities with the `#[Cache()]` attribute (HypeMC)
14+
* bug #48505 [Mailer] Fix rendered templates for notifications (fabpot)
15+
* bug #48476 [WebProfilerBundle] Use same color as other icons for the close toolbar btn (ogizanagi)
16+
* bug #48483 [DependencyInjection] Remove refs that point to container.excluded services when allowed (nicolas-grekas)
17+
* bug #48346 [HttpKernel] In DateTimeValueResolver, convert previously defined date attribute to the expected class (GromNaN)
18+
* bug #48450 [WebProfilerBundle] Fix form panel expanders (MatTheCat)
19+
* bug #48459 [FrameworkBundle] [Framework] Fix Infobip Mailer transport factory import (gnito-org)
20+
* bug #48461 [VarExporter] Fix possible memory-leak when using lazy-objects (nicolas-grekas)
21+
* bug #48335 [TwigBridge] Amend `MoneyType` twig to include a space (mogilvie)
22+
* bug #48046 [WebProfilerBundle] Remove redundant code from logger template (HypeMC)
23+
* bug #48428 Fixed undefined variable error (Kevin Meijer)
24+
* bug #48416 [FrameworkBundle] don't register the MailerTestCommand symfony/console is not installed (xabbuh)
25+
* bug #48395 [String] Fix AsciiSlugger with emojis (fancyweb)
26+
* bug #48385 [Security] Reuse `AbstractFactory`'s config tree in `AccessTokenFactory` (chalasr)
27+
* bug #48292 [Security] [LoginLink] Throw InvalidLoginLinkException on missing parameter (MatTheCat)
28+
1029
* 6.2.0 (2022-11-30)
1130

1231
* bug #48395 [String] Fix AsciiSlugger with emojis (fancyweb)

src/Symfony/Bridge/Twig/Mime/BodyRenderer.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,13 @@ public function render(Message $message): void
5959

6060
if ($template = $message->getTextTemplate()) {
6161
$message->text($this->twig->render($template, $vars));
62-
$message->textTemplate(null);
6362
}
6463

6564
if ($template = $message->getHtmlTemplate()) {
6665
$message->html($this->twig->render($template, $vars));
67-
$message->htmlTemplate(null);
6866
}
6967

70-
$message->context([]);
68+
$message->markAsRendered();
7169

7270
// if text body is empty, compute one from the HTML body
7371
if (!$message->getTextBody() && null !== $html = $message->getHtmlBody()) {

src/Symfony/Bridge/Twig/Mime/NotificationEmail.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class NotificationEmail extends TemplatedEmail
4040
'raw' => false,
4141
'footer_text' => 'Notification e-mail sent by Symfony',
4242
];
43+
private bool $rendered = false;
4344

4445
public function __construct(Headers $headers = null, AbstractPart $body = null)
4546
{
@@ -178,6 +179,18 @@ public function getContext(): array
178179
return array_merge($this->context, parent::getContext());
179180
}
180181

182+
public function isRendered(): bool
183+
{
184+
return $this->rendered;
185+
}
186+
187+
public function markAsRendered(): void
188+
{
189+
parent::markAsRendered();
190+
191+
$this->rendered = true;
192+
}
193+
181194
public function getPreparedHeaders(): Headers
182195
{
183196
$headers = parent::getPreparedHeaders();
@@ -225,15 +238,17 @@ private function getExceptionAsString(\Throwable|FlattenException $exception): s
225238
*/
226239
public function __serialize(): array
227240
{
228-
return [$this->context, $this->theme, parent::__serialize()];
241+
return [$this->context, $this->theme, $this->rendered, parent::__serialize()];
229242
}
230243

231244
/**
232245
* @internal
233246
*/
234247
public function __unserialize(array $data): void
235248
{
236-
if (3 === \count($data)) {
249+
if (4 === \count($data)) {
250+
[$this->context, $this->theme, $this->rendered, $parentData] = $data;
251+
} elseif (3 === \count($data)) {
237252
[$this->context, $this->theme, $parentData] = $data;
238253
} else {
239254
// Backwards compatibility for deserializing data structures that were serialized without the theme

src/Symfony/Bridge/Twig/Mime/TemplatedEmail.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ public function getContext(): array
6767
return $this->context;
6868
}
6969

70+
public function isRendered(): bool
71+
{
72+
return null === $this->htmlTemplate && null === $this->textTemplate;
73+
}
74+
75+
public function markAsRendered(): void
76+
{
77+
$this->textTemplate = null;
78+
$this->htmlTemplate = null;
79+
$this->context = [];
80+
}
81+
7082
/**
7183
* @internal
7284
*/

src/Symfony/Bundle/DebugBundle/Resources/views/Profiler/dump.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
{{ dump.data|raw }}
6969
</div>
7070
{% else %}
71-
<div class="empty">
71+
<div class="empty empty-panel">
7272
<p>No content was dumped.</p>
7373
</div>
7474
{% endfor %}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125

126126
.sf-toolbarreset .hide-button {
127127
background: var(--sf-toolbar-gray-800);
128+
color: var(--sf-toolbar-gray-300);
128129
display: block;
129130
position: absolute;
130131
top: 2px;

src/Symfony/Component/DependencyInjection/Compiler/ResolveInstanceofConditionalsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private function processDefinition(ContainerBuilder $container, string $id, Defi
126126
foreach ($instanceofTags[$i] as $k => $v) {
127127
if (null === $definition->getDecoratedService() || \in_array($k, $tagsToKeep, true)) {
128128
foreach ($v as $v) {
129-
if ($definition->hasTag($k) && (!$v || \in_array($v, $definition->getTag($k)))) {
129+
if ($definition->hasTag($k) && \in_array($v, $definition->getTag($k))) {
130130
continue;
131131
}
132132
$definition->addTag($k, $v);

src/Symfony/Component/DependencyInjection/Compiler/ResolveInvalidReferencesPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private function processValue(mixed $value, int $rootLevel = 0, int $level = 0):
9595
$value = array_values($value);
9696
}
9797
} elseif ($value instanceof Reference) {
98-
if ($this->container->has($id = (string) $value)) {
98+
if ($this->container->hasDefinition($id = (string) $value) ? !$this->container->getDefinition($id)->hasTag('container.excluded') : $this->container->hasAlias($id)) {
9999
return $value;
100100
}
101101

src/Symfony/Component/DependencyInjection/ParameterBag/EnvPlaceholderParameterBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function get(string $name): array|bool|string|int|float|\UnitEnum|null
4949
}
5050

5151
$uniqueName = md5($name.'_'.self::$counter++);
52-
$placeholder = sprintf('%s_%s_%s', $this->getEnvPlaceholderUniquePrefix(), strtr($env, ':-.', '___'), $uniqueName);
52+
$placeholder = sprintf('%s_%s_%s', $this->getEnvPlaceholderUniquePrefix(), strtr($env, ':-.\\', '____'), $uniqueName);
5353
$this->envPlaceholders[$env][$placeholder] = $placeholder;
5454

5555
return $placeholder;

src/Symfony/Component/DependencyInjection/Tests/Compiler/IntegrationTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,6 @@ static function (ChildDefinition $definition, CustomAutoconfiguration $attribute
849849
$definition->addTag('app.custom_tag', get_object_vars($attribute) + ['class' => $reflector->getName()]);
850850
}
851851
);
852-
$container->registerForAutoconfiguration(TaggedService1::class)->addTag('app.custom_tag');
853852

854853
$container->register('one', TaggedService1::class)
855854
->setPublic(true)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy