Skip to content

Commit cad21a9

Browse files
committed
Merge branch '7.2' into 7.3
* 7.2: (37 commits) fix dumped markup improve amqp connection issues [Serializer] [ObjectNormalizer] Filter int when using FILTER_BOOL Fix #53778 Issue 59387-2: make check with prefix more robust [PropertyInfo] Add missing test fix tests [Security][Validators] Review translations. [validator] Updated Dutch translation [FrameworkBundle] Fix wiring ConsoleProfilerListener [HttpKernel] Fix link to php doc [Lock] Make sure RedisStore will also support Valkey [Validator] Update sr_Cyrl 120:This value is not a valid slug. [Validator] Update sr_Latn 120:This value is not a valid slug. 6.4 Missing translations for Italian (it) #59419 tests(notifier): avoid failing SNS test with local AWS configuration Fix typo ratio comment chore: PropertyAccess - fix typo in DocBlock [Validator] Missing translations for Brazilian Portuguese (pt_BR) fix(dependency-injection): reset env vars with kernel.reset ...
2 parents 6301bbb + 1b22bbe commit cad21a9

File tree

60 files changed

+752
-201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+752
-201
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,9 @@ private function findProperServiceName(InputInterface $input, SymfonyStyle $io,
290290
return $matchingServices[0];
291291
}
292292

293-
return $io->choice('Select one of the following services to display its information', $matchingServices);
293+
natsort($matchingServices);
294+
295+
return $io->choice('Select one of the following services to display its information', array_values($matchingServices));
294296
}
295297

296298
private function findProperTagName(InputInterface $input, SymfonyStyle $io, ContainerBuilder $container, string $tagName): string
@@ -308,7 +310,9 @@ private function findProperTagName(InputInterface $input, SymfonyStyle $io, Cont
308310
return $matchingTags[0];
309311
}
310312

311-
return $io->choice('Select one of the following tags to display its information', $matchingTags);
313+
natsort($matchingTags);
314+
315+
return $io->choice('Select one of the following tags to display its information', array_values($matchingTags));
312316
}
313317

314318
private function findServiceIdsContaining(ContainerBuilder $container, string $name, bool $showHidden): array

src/Symfony/Bundle/FrameworkBundle/EventListener/ConsoleProfilerListener.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ final class ConsoleProfilerListener implements EventSubscriberInterface
3838
/** @var \SplObjectStorage<Request, ?Request> */
3939
private \SplObjectStorage $parents;
4040

41+
private bool $disabled = false;
42+
4143
public function __construct(
4244
private readonly Profiler $profiler,
4345
private readonly RequestStack $requestStack,
@@ -66,7 +68,7 @@ public function initialize(ConsoleCommandEvent $event): void
6668

6769
$input = $event->getInput();
6870
if (!$input->hasOption('profile') || !$input->getOption('profile')) {
69-
$this->profiler->disable();
71+
$this->disabled = true;
7072

7173
return;
7274
}
@@ -92,7 +94,12 @@ public function catch(ConsoleErrorEvent $event): void
9294

9395
public function profile(ConsoleTerminateEvent $event): void
9496
{
95-
if (!$this->cliMode || !$this->profiler->isEnabled()) {
97+
$error = $this->error;
98+
$this->error = null;
99+
100+
if (!$this->cliMode || $this->disabled) {
101+
$this->disabled = false;
102+
96103
return;
97104
}
98105

@@ -114,8 +121,7 @@ public function profile(ConsoleTerminateEvent $event): void
114121
$request->command->exitCode = $event->getExitCode();
115122
$request->command->interruptedBySignal = $event->getInterruptingSignal();
116123

117-
$profile = $this->profiler->collect($request, $request->getResponse(), $this->error);
118-
$this->error = null;
124+
$profile = $this->profiler->collect($request, $request->getResponse(), $error);
119125
$this->profiles[$request] = $profile;
120126

121127
if ($this->parents[$request] = $this->requestStack->getParentRequest()) {

src/Symfony/Bundle/FrameworkBundle/Resources/config/profiling.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,19 @@
4040

4141
->set('console_profiler_listener', ConsoleProfilerListener::class)
4242
->args([
43-
service('profiler'),
43+
service('.lazy_profiler'),
4444
service('.virtual_request_stack'),
4545
service('debug.stopwatch'),
4646
param('kernel.runtime_mode.cli'),
4747
service('router')->nullOnInvalid(),
4848
])
4949
->tag('kernel.event_subscriber')
5050

51+
->set('.lazy_profiler', Profiler::class)
52+
->factory('current')
53+
->args([[service('profiler')]])
54+
->lazy()
55+
5156
->set('.virtual_request_stack', VirtualRequestStack::class)
5257
->args([service('request_stack')])
5358
->public()

src/Symfony/Bundle/FrameworkBundle/Resources/config/services.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class_exists(WorkflowEvents::class) ? WorkflowEvents::ALIASES : []
100100
->alias(HttpKernelInterface::class, 'http_kernel')
101101

102102
->set('request_stack', RequestStack::class)
103+
->tag('kernel.reset', ['method' => 'resetRequestFormats', 'on_invalid' => 'ignore'])
103104
->public()
104105
->alias(RequestStack::class, 'request_stack')
105106

@@ -197,6 +198,7 @@ class_exists(WorkflowEvents::class) ? WorkflowEvents::ALIASES : []
197198
tagged_iterator('container.env_var_loader'),
198199
])
199200
->tag('container.env_var_processor')
201+
->tag('kernel.reset', ['method' => 'reset'])
200202

201203
->set('slugger', AsciiSlugger::class)
202204
->args([

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDebugCommandTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ public function testTagsPartialSearch()
140140
$tester->run(['command' => 'debug:container', '--tag' => 'kernel.'], ['decorated' => false]);
141141

142142
$this->assertStringContainsString('Select one of the following tags to display its information', $tester->getDisplay());
143-
$this->assertStringContainsString('[0] kernel.event_subscriber', $tester->getDisplay());
144-
$this->assertStringContainsString('[1] kernel.locale_aware', $tester->getDisplay());
145-
$this->assertStringContainsString('[2] kernel.cache_warmer', $tester->getDisplay());
143+
$this->assertStringContainsString('[0] kernel.cache_clearer', $tester->getDisplay());
144+
$this->assertStringContainsString('[1] kernel.cache_warmer', $tester->getDisplay());
145+
$this->assertStringContainsString('[2] kernel.event_subscriber', $tester->getDisplay());
146146
$this->assertStringContainsString('[3] kernel.fragment_renderer', $tester->getDisplay());
147-
$this->assertStringContainsString('[4] kernel.reset', $tester->getDisplay());
148-
$this->assertStringContainsString('[5] kernel.cache_clearer', $tester->getDisplay());
149-
$this->assertStringContainsString('Symfony Container Services Tagged with "kernel.event_subscriber" Tag', $tester->getDisplay());
147+
$this->assertStringContainsString('[4] kernel.locale_aware', $tester->getDisplay());
148+
$this->assertStringContainsString('[5] kernel.reset', $tester->getDisplay());
149+
$this->assertStringContainsString('Symfony Container Services Tagged with "kernel.cache_clearer" Tag', $tester->getDisplay());
150150
}
151151

152152
public function testDescribeEnvVars()

src/Symfony/Component/DependencyInjection/Container.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,14 @@ public function reset(): void
291291
$this->envCache = $this->services = $this->factories = $this->privates = [];
292292
}
293293

294+
/**
295+
* @internal
296+
*/
297+
public function resetEnvCache(): void
298+
{
299+
$this->envCache = [];
300+
}
301+
294302
/**
295303
* Gets all service ids.
296304
*

src/Symfony/Component/DependencyInjection/EnvVarProcessor.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,5 +380,9 @@ public function reset(): void
380380
{
381381
$this->loadedVars = [];
382382
$this->loaders = $this->originalLoaders;
383+
384+
if ($this->container instanceof Container) {
385+
$this->container->resetEnvCache();
386+
}
383387
}
384388
}
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
[
2+
"abbr",
3+
"accept",
4+
"accept-charset",
5+
"accesskey",
6+
"action",
7+
"align",
8+
"alink",
9+
"allow",
10+
"allowfullscreen",
11+
"allowpaymentrequest",
12+
"alt",
13+
"anchor",
14+
"archive",
15+
"as",
16+
"async",
17+
"autocapitalize",
18+
"autocomplete",
19+
"autocorrect",
20+
"autofocus",
21+
"autopictureinpicture",
22+
"autoplay",
23+
"axis",
24+
"background",
25+
"behavior",
26+
"bgcolor",
27+
"border",
28+
"bordercolor",
29+
"capture",
30+
"cellpadding",
31+
"cellspacing",
32+
"challenge",
33+
"char",
34+
"charoff",
35+
"charset",
36+
"checked",
37+
"cite",
38+
"class",
39+
"classid",
40+
"clear",
41+
"code",
42+
"codebase",
43+
"codetype",
44+
"color",
45+
"cols",
46+
"colspan",
47+
"compact",
48+
"content",
49+
"contenteditable",
50+
"controls",
51+
"controlslist",
52+
"conversiondestination",
53+
"coords",
54+
"crossorigin",
55+
"csp",
56+
"data",
57+
"datetime",
58+
"declare",
59+
"decoding",
60+
"default",
61+
"defer",
62+
"dir",
63+
"direction",
64+
"dirname",
65+
"disabled",
66+
"disablepictureinpicture",
67+
"disableremoteplayback",
68+
"disallowdocumentaccess",
69+
"download",
70+
"draggable",
71+
"elementtiming",
72+
"enctype",
73+
"end",
74+
"enterkeyhint",
75+
"event",
76+
"exportparts",
77+
"face",
78+
"for",
79+
"form",
80+
"formaction",
81+
"formenctype",
82+
"formmethod",
83+
"formnovalidate",
84+
"formtarget",
85+
"frame",
86+
"frameborder",
87+
"headers",
88+
"height",
89+
"hidden",
90+
"high",
91+
"href",
92+
"hreflang",
93+
"hreftranslate",
94+
"hspace",
95+
"http-equiv",
96+
"id",
97+
"imagesizes",
98+
"imagesrcset",
99+
"importance",
100+
"impressiondata",
101+
"impressionexpiry",
102+
"incremental",
103+
"inert",
104+
"inputmode",
105+
"integrity",
106+
"invisible",
107+
"is",
108+
"ismap",
109+
"keytype",
110+
"kind",
111+
"label",
112+
"lang",
113+
"language",
114+
"latencyhint",
115+
"leftmargin",
116+
"link",
117+
"list",
118+
"loading",
119+
"longdesc",
120+
"loop",
121+
"low",
122+
"lowsrc",
123+
"manifest",
124+
"marginheight",
125+
"marginwidth",
126+
"max",
127+
"maxlength",
128+
"mayscript",
129+
"media",
130+
"method",
131+
"min",
132+
"minlength",
133+
"multiple",
134+
"muted",
135+
"name",
136+
"nohref",
137+
"nomodule",
138+
"nonce",
139+
"noresize",
140+
"noshade",
141+
"novalidate",
142+
"nowrap",
143+
"object",
144+
"open",
145+
"optimum",
146+
"part",
147+
"pattern",
148+
"ping",
149+
"placeholder",
150+
"playsinline",
151+
"policy",
152+
"poster",
153+
"preload",
154+
"pseudo",
155+
"readonly",
156+
"referrerpolicy",
157+
"rel",
158+
"reportingorigin",
159+
"required",
160+
"resources",
161+
"rev",
162+
"reversed",
163+
"role",
164+
"rows",
165+
"rowspan",
166+
"rules",
167+
"sandbox",
168+
"scheme",
169+
"scope",
170+
"scopes",
171+
"scrollamount",
172+
"scrolldelay",
173+
"scrolling",
174+
"select",
175+
"selected",
176+
"shadowroot",
177+
"shadowrootdelegatesfocus",
178+
"shape",
179+
"size",
180+
"sizes",
181+
"slot",
182+
"span",
183+
"spellcheck",
184+
"src",
185+
"srcdoc",
186+
"srclang",
187+
"srcset",
188+
"standby",
189+
"start",
190+
"step",
191+
"style",
192+
"summary",
193+
"tabindex",
194+
"target",
195+
"text",
196+
"title",
197+
"topmargin",
198+
"translate",
199+
"truespeed",
200+
"trusttoken",
201+
"type",
202+
"usemap",
203+
"valign",
204+
"value",
205+
"valuetype",
206+
"version",
207+
"virtualkeyboardpolicy",
208+
"vlink",
209+
"vspace",
210+
"webkitdirectory",
211+
"width",
212+
"wrap"
213+
]

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