Skip to content

Commit 728d75b

Browse files
mdoutreluingnexabbuh
authored andcommitted
Deprecate not configuring explicitly a provider for custom_authenticators when there is more than one registered provider
1 parent 29d3c27 commit 728d75b

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

components/console/helpers/questionhelper.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ if you want to know a bundle name, you can add this to your command::
8888
8989
// ... do something with the bundleName
9090
91-
return Commande::SUCCESS;
91+
return Command::SUCCESS;
9292
}
9393

9494
The user will be asked "Please enter the name of the bundle". They can type
@@ -124,7 +124,7 @@ from a predefined list::
124124

125125
// ... do something with the color
126126
127-
return Commande::SUCCESS;
127+
return Command::SUCCESS;
128128
}
129129

130130
.. versionadded:: 5.2
@@ -166,7 +166,7 @@ this use :method:`Symfony\\Component\\Console\\Question\\ChoiceQuestion::setMult
166166
$colors = $helper->ask($input, $output, $question);
167167
$output->writeln('You have just selected: ' . implode(', ', $colors));
168168
169-
return Commande::SUCCESS;
169+
return Command::SUCCESS;
170170
}
171171

172172
Now, when the user enters ``1,2``, the result will be:
@@ -197,7 +197,7 @@ will be autocompleted as the user types::
197197
198198
// ... do something with the bundleName
199199
200-
return Commande::SUCCESS;
200+
return Command::SUCCESS;
201201
}
202202

203203
In more complex use cases, it may be necessary to generate suggestions on the
@@ -236,7 +236,7 @@ provide a callback function to dynamically generate suggestions::
236236
237237
// ... do something with the filePath
238238
239-
return Commande::SUCCESS;
239+
return Command::SUCCESS;
240240
}
241241

242242
Do not Trim the Answer
@@ -260,7 +260,7 @@ You can also specify if you want to not trim the answer by setting it directly w
260260
261261
// ... do something with the name
262262
263-
return Commande::SUCCESS;
263+
return Command::SUCCESS;
264264
}
265265

266266
Accept Multiline Answers
@@ -291,7 +291,7 @@ the response to a question should allow multiline answers by passing ``true`` to
291291
292292
// ... do something with the answer
293293
294-
return Commande::SUCCESS;
294+
return Command::SUCCESS;
295295
}
296296

297297
Multiline questions stop reading user input after receiving an end-of-transmission
@@ -319,7 +319,7 @@ convenient for passwords::
319319
320320
// ... do something with the password
321321
322-
return Commande::SUCCESS;
322+
return Command::SUCCESS;
323323
}
324324

325325
.. caution::
@@ -351,7 +351,7 @@ convenient for passwords::
351351

352352
// ...
353353
354-
return Commande::SUCCESS;
354+
return Command::SUCCESS;
355355
}
356356

357357
Normalizing the Answer
@@ -382,7 +382,7 @@ method::
382382
383383
// ... do something with the bundleName
384384
385-
return Commande::SUCCESS;
385+
return Command::SUCCESS;
386386
}
387387

388388
.. caution::
@@ -426,7 +426,7 @@ method::
426426
427427
// ... do something with the bundleName
428428
429-
return Commande::SUCCESS;
429+
return Command::SUCCESS;
430430
}
431431

432432
The ``$validator`` is a callback which handles the validation. It should
@@ -488,7 +488,7 @@ You can also use a validator with a hidden question::
488488
489489
// ... do something with the password
490490
491-
return Commande::SUCCESS;
491+
return Command::SUCCESS;
492492
}
493493

494494
Testing a Command that Expects Input

security/custom_authenticator.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ The authenticator can be enabled using the ``custom_authenticators`` setting:
130130
;
131131
};
132132
133+
.. deprecated:: 5.4
134+
135+
If you have registered multiple user providers, you must set the
136+
``provider`` key to one of the configured providers, even if your
137+
custom authenticators don't use it. Not doing so is deprecated in Symfony 5.4.
138+
133139
.. versionadded:: 5.2
134140

135141
Starting with Symfony 5.2, the custom authenticator is automatically
@@ -185,7 +191,7 @@ can define what happens in these cases:
185191
If your login method is interactive, which means that the user actively
186192
logged into your application, you may want your authenticator to implement the
187193
:class:`Symfony\\Component\\Security\\Http\\Authenticator\\InteractiveAuthenticatorInterface`
188-
so that it dispatches an
194+
so that it dispatches an
189195
:class:`Symfony\\Component\\Security\\Http\\Event\\InteractiveLoginEvent`
190196

191197
.. _security-passport:

0 commit comments

Comments
 (0)