Skip to content

Commit 31b386e

Browse files
fancywebnicolas-grekas
authored andcommitted
Deprecate things that prevent \Throwable from bubbling down
1 parent 41dc9ca commit 31b386e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ CHANGELOG
2020
* [BC Break] The `framework.messenger.routing.senders` config key is not deep merged anymore.
2121
* Added `secrets:*` commands and `%env(secret:...)%` processor to deal with secrets seamlessly.
2222
* Made `framework.session.handler_id` accept a DSN
23+
* Marked the `RouterDataCollector` class as `@final`.
2324

2425
4.3.0
2526
-----

Console/Application.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,15 @@ private function renderRegistrationErrors(InputInterface $input, OutputInterface
207207
(new SymfonyStyle($input, $output))->warning('Some commands could not be registered:');
208208

209209
foreach ($this->registrationErrors as $error) {
210-
if (!$error instanceof \Exception) {
211-
$error = new ErrorException($error);
212-
}
210+
if (method_exists($this, 'doRenderThrowable')) {
211+
$this->doRenderThrowable($error, $output);
212+
} else {
213+
if (!$error instanceof \Exception) {
214+
$error = new ErrorException($error);
215+
}
213216

214-
$this->doRenderException($error, $output);
217+
$this->doRenderException($error, $output);
218+
}
215219
}
216220
}
217221
}

DataCollector/RouterDataCollector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* RouterDataCollector.
2020
*
2121
* @author Fabien Potencier <fabien@symfony.com>
22+
*
23+
* @final since Symfony 4.4
2224
*/
2325
class RouterDataCollector extends BaseRouterDataCollector
2426
{

0 commit comments

Comments
 (0)