Skip to content

Commit 016e54a

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: Fix Method 'getException' not found in ExceptionEvent Corrected return type of anonymous functions
2 parents 571c7d7 + c613d80 commit 016e54a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/console/helpers/questionhelper.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ provide a callback function to dynamically generate suggestions::
217217
// where files and dirs can be found
218218
$foundFilesAndDirs = @scandir($inputPath) ?: [];
219219

220-
return array_map(function (string $dirOrFile) use ($inputPath): void {
220+
return array_map(function (string $dirOrFile) use ($inputPath): string {
221221
return $inputPath.$dirOrFile;
222222
}, $foundFilesAndDirs);
223223
};
@@ -462,7 +462,7 @@ You can also use a validator with a hidden question::
462462
$question->setNormalizer(function (?string $value): string {
463463
return $value ?? '';
464464
});
465-
$question->setValidator(function (string $value): void {
465+
$question->setValidator(function (string $value): string {
466466
if ('' === trim($value)) {
467467
throw new \Exception('The password cannot be empty');
468468
}

configuration/micro_kernel_trait.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ events directly from the kernel, again it will be registered automatically::
178178

179179
public function onKernelException(ExceptionEvent $event): void
180180
{
181-
if ($event->getException() instanceof Danger) {
181+
if ($event->getThrowable() instanceof Danger) {
182182
$event->setResponse(new Response('It\'s dangerous to go alone. Take this ⚔'));
183183
}
184184
}

0 commit comments

Comments
 (0)