8000 Merge branch '6.4' into 7.1 · symfony/symfony@d79f638 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit d79f638

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: (29 commits) Fix #53778 [PropertyInfo] Add missing test fix tests [Security][Validators] Review translations. [validator] Updated Dutch translation [FrameworkBundle] Fix wiring ConsoleProfilerListener [HttpKernel] Fix link to php doc [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 [Validator] Missing translations for Brazilian Portuguese (pt_BR) [Translation][Validator] Review Russian translation (114 - 120) Review validator-related persian translation with id 120 [Scheduler] Clarify description of exclusion time [HttpFoundation][FrameworkBundle] Reset Request's formats using the service resetter [Mailer] Fix SMTP stream EOF handling on Windows by using feof() [Translations] Make sure PL translations validators.pl.xlf follow the same style [Validator] Checked Turkish validators translations and confirmed [VarDumper] Fix blank strings display ...
2 parents 7085ad8 + 0e610a8 commit d79f638

File tree

53 files changed

+694
-182
lines changed

Some content is hidden

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

53 files changed

+694
-182
lines changed

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

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

287-
return $io->choice('Select one of the following services to display its information', $matchingServices);
287+
natsort($matchingServices);
288+
289+
return $io->choice('Select one of the following services to display its information', array_values($matchingServices));
288290
}
289291

290292
private function findProperTagName(InputInterface $input, SymfonyStyle $io, ContainerBuilder $container, string $tagName): string
@@ -302,7 +304,9 @@ private function findProperTagName(InputInterface $input, SymfonyStyle $io, Cont
302304
return $matchingTags[0];
303305
}
304306

305-
return $io->choice('Select one of the following tags to display its information', $matchingTags);
307+
natsort($matchingTags);
308+
309+
return $io->choice('Select one of the following tags to display its information', array_values($matchingTags));
306310
}
307311

308312
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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ class_exists(WorkflowEvents::class) ? WorkflowEvents::ALIASES : []
9999
->alias(HttpKernelInterface::class, 'http_kernel')
100100

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

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', $< 10000 /span>tester->getDisplay());
149+
$this->assertStringContainsString('Symfony Container Services Tagged with "kernel.cache_clearer" Tag', $tester->getDisplay());
150150
}
151151

152152
public function testDescribeEnvVars()
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",
10000 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)
0