Skip to content

Commit d62a2fc

Browse files
committed
Deprecate things that prevent \Throwable from bubbling down
1 parent 4cd3dc8 commit d62a2fc

36 files changed

+187
-22
lines changed

UPGRADE-4.4.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ Cache
55
-----
66

77
* Added argument `$prefix` to `AdapterInterface::clear()`
8+
* Marked the `CacheDataCollector` class as `@final`.
89

910
Console
1011
-------
1112

1213
* Deprecated finding hidden commands using an abbreviation, use the full name instead
1314
* Deprecated returning `null` from `Command::execute()`, return `0` instead
15+
* Deprecated the `Application::renderException()` and `Application::doRenderException()` methods,
16+
use `renderThrowable()` and `doRenderThrowable()` instead.
1417

1518
Debug
1619
-----
@@ -65,6 +68,7 @@ DoctrineBridge
6568
* Deprecated `RegistryInterface`, use `Doctrine\Common\Persistence\ManagerRegistry`.
6669
* Added a new `getMetadataDriverClass` method to replace class parameters in `AbstractDoctrineExtension`. This method
6770
will be abstract in Symfony 5 and must be declared in extending classes.
71+
* Marked the `DoctrineDataCollector` class as `@final`.
6872

6973
Filesystem
7074
----------
@@ -91,6 +95,7 @@ FrameworkBundle
9195
* Deprecated `routing.loader.service`, use `routing.loader.container` instead.
9296
* Not tagging service route loaders with `routing.route_loader` has been deprecated.
9397
* Overriding the methods `KernelTestCase::tearDown()` and `WebTestCase::tearDown()` without the `void` return-type is deprecated.
98+
* Marked the `RouterDataCollector` class as `@final`.
9499

95100
HttpClient
96101
----------
@@ -144,6 +149,13 @@ HttpKernel
144149
current directory or with a glob pattern. The fallback directories have never been advocated
145150
so you likely do not use those in any app based on the SF Standard or Flex edition.
146151
* Getting the container from a non-booted kernel is deprecated
152+
* Marked the `AjaxDataCollector`, `ConfigDataCollector`, `EventDataCollector`,
153+
`ExceptionDataCollector`, `LoggerDataCollector`, `MemoryDataCollector`,
154+
`RequestDataCollector` and `TimeDataCollector` classes as `@final`.
155+
* Marked the `Profiler::collect()` and `RouterDataCollector::collect()` methods as `@final`.
156+
* Deprecated the `ExceptionListener::logException()` method, use `logThrowable()` instead.
157+
* The `DataCollectorInterface::collect()` method third parameter signature will
158+
be `\Throwable $exception = null` instead of `\Exception $exception = null` in Symfony 5.0.
147159

148160
Lock
149161
----
@@ -164,6 +176,7 @@ Messenger
164176
* [BC BREAK] Removed `$retryStrategyLocator` argument from `ConsumeMessagesCommand::__construct`.
165177
* [BC BREAK] Removed `$senderClassOrAlias` argument from `RedeliveryStamp::__construct`.
166178
* [BC BREAK] Removed `UnknownSenderException`.
179+
* Marked the `MessengerDataCollector` class as `@final`.
167180

168181
Mime
169182
----
@@ -216,6 +229,11 @@ Security
216229
) {}
217230
```
218231

232+
SecurityBundle
233+
--------------
234+
235+
* Marked the `SecurityDataCollector` class as `@final`.
236+
219237
Serializer
220238
----------
221239

@@ -231,13 +249,15 @@ Translation
231249

232250
* Deprecated support for using `null` as the locale in `Translator`.
233251
* Deprecated accepting STDIN implicitly when using the `lint:xliff` command, use `lint:xliff -` (append a dash) instead to make it explicit.
252+
* Marked the `TranslationDataCollector` class as `@final`.
234253

235254
TwigBridge
236255
----------
237256

238257
* Deprecated to pass `$rootDir` and `$fileLinkFormatter` as 5th and 6th argument respectively to the
239258
`DebugCommand::__construct()` method, swap the variables position.
240259
* Deprecated accepting STDIN implicitly when using the `lint:twig` command, use `lint:twig -` (append a dash) instead to make it explicit.
260+
* Marked the `TwigDataCollector` class as `@final`.
241261

242262
TwigBundle
243263
----------
@@ -342,6 +362,7 @@ Validator
342362
* deprecated `ValidatorBuilder::setMetadataCache`, use `ValidatorBuilder::setMappingCache` instead.
343363
* The `Range` constraint has a new message option `notInRangeMessage` that is used when both `min` and `max` values are set.
344364
In case you are using custom translations make sure to add one for this new message.
365+
* Marked the `ValidatorDataCollector` class as `@final`.
345366

346367
WebProfilerBundle
347368
-----------------

src/Symfony/Bridge/Doctrine/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CHANGELOG
88
* deprecated `RegistryInterface`, use `Doctrine\Common\Persistence\ManagerRegistry`
99
* added support for invokable event listeners
1010
* added `getMetadataDriverClass` method to deprecate class parameters in service configuration files
11+
* Marked the `DoctrineDataCollector` class as `@final`.
1112

1213
4.3.0
1314
-----

src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
* DoctrineDataCollector.
2424
*
2525
* @author Fabien Potencier <fabien@symfony.com>
26+
*
27+
* @final since Symfony 4.4
2628
*/
2729
class DoctrineDataCollector extends DataCollector
2830
{

src/Symfony/Bridge/Twig/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ CHANGELOG
1111
* deprecated accepting STDIN implicitly when using the `lint:twig` command, use `lint:twig -` (append a dash) instead to make it explicit.
1212
* added `--show-deprecations` option to the `lint:twig` command
1313
* added support for Bootstrap4 switches, use `switch-custom` as `label_attr` in a `CheckboxType`
14+
* Marked the `TwigDataCollector` class as `@final`.
1415

1516
4.3.0
1617
-----

src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
* TwigDataCollector.
2626
*
2727
* @author Fabien Potencier <fabien@symfony.com>
28+
*
29+
* @final since Symfony 4.4
2830
*/
2931
class TwigDataCollector extends DataCollector implements LateDataCollectorInterface
3032
{

src/Symfony/Bundle/FrameworkBundle/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
-----

src/Symfony/Bundle/FrameworkBundle/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
}

src/Symfony/Bundle/FrameworkBundle/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
{

src/Symfony/Bundle/SecurityBundle/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CHANGELOG
66

77
* Added new `argon2id` encoder, undeprecated the `bcrypt` and `argon2i` ones (using `auto` is still recommended by default.)
88
* Deprecated the usage of "query_string" without a "search_dn" and a "search_password" config key in Ldap factories.
9+
* Marked the `SecurityDataCollector` class as `@final`.
910

1011
4.3.0
1112
-----

src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434

3535
/**
3636
* @author Fabien Potencier <fabien@symfony.com>
37+
*
38+
* @final since Symfony 4.4
3739
*/
3840
class SecurityDataCollector extends DataCollector implements LateDataCollectorInterface
3941
{

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