Skip to content

Commit 686e9b7

Browse files
feature #34332 Allow \Throwable $previous everywhere (fancyweb)
This PR was merged into the 4.4 branch. Discussion ---------- Allow \Throwable $previous everywhere | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- 59e044d Allow \Throwable $previous everywhere
2 parents d1d4bc8 + 59e044d commit 686e9b7

21 files changed

+24
-24
lines changed

src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ protected function stream(string $view, array $parameters = [], StreamedResponse
288288
*
289289
* @final
290290
*/
291-
protected function createNotFoundException(string $message = 'Not Found', \Exception $previous = null): NotFoundHttpException
291+
protected function createNotFoundException(string $message = 'Not Found', \Throwable $previous = null): NotFoundHttpException
292292
{
293293
return new NotFoundHttpException($message, $previous);
294294
}
@@ -304,7 +304,7 @@ protected function createNotFoundException(string $message = 'Not Found', \Excep
304304
*
305305
* @final
306306
*/
307-
protected function createAccessDeniedException(string $message = 'Access Denied.', \Exception $previous = null): AccessDeniedException
307+
protected function createAccessDeniedException(string $message = 'Access Denied.', \Throwable $previous = null): AccessDeniedException
308308
{
309309
if (!class_exists(AccessDeniedException::class)) {
310310
throw new \LogicException('You can not use the "createAccessDeniedException" method if the Security component is not available. Try running "composer require symfony/security-bundle".');

src/Symfony/Component/Config/Exception/FileLoaderImportCircularReferenceException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
class FileLoaderImportCircularReferenceException extends LoaderLoadException
2020
{
21-
public function __construct(array $resources, int $code = null, \Exception $previous = null)
21+
public function __construct(array $resources, int $code = null, \Throwable $previous = null)
2222
{
2323
$message = sprintf('Circular reference detected in "%s" ("%s" > "%s").', $this->varToString($resources[0]), implode('" > "', $resources), $resources[0]);
2424

src/Symfony/Component/Config/Exception/FileLocatorFileNotFoundException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class FileLocatorFileNotFoundException extends \InvalidArgumentException
2020
{
2121
private $paths;
2222

23-
public function __construct(string $message = '', int $code = 0, \Exception $previous = null, array $paths = [])
23+
public function __construct(string $message = '', int $code = 0, \Throwable $previous = null, array $paths = [])
2424
{
2525
parent::__construct($message, $code, $previous);
2626

src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class AutowiringFailedException extends RuntimeException
1919
private $serviceId;
2020
private $messageCallback;
2121

22-
public function __construct(string $serviceId, $message = '', int $code = 0, \Exception $previous = null)
22+
public function __construct(string $serviceId, $message = '', int $code = 0, \Throwable $previous = null)
2323
{
2424
$this->serviceId = $serviceId;
2525

src/Symfony/Component/DependencyInjection/Exception/EnvParameterException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
class EnvParameterException extends InvalidArgumentException
2020
{
21-
public function __construct(array $envs, \Exception $previous = null, string $message = 'Incompatible use of dynamic environment variables "%s" found in parameters.')
21+
public function __construct(array $envs, \Throwable $previous = null, string $message = 'Incompatible use of dynamic environment variables "%s" found in parameters.')
2222
{
2323
parent::__construct(sprintf($message, implode('", "', $envs)), 0, $previous);
2424
}

src/Symfony/Component/DependencyInjection/Exception/ParameterCircularReferenceException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ParameterCircularReferenceException extends RuntimeException
2020
{
2121
private $parameters;
2222

23-
public function __construct(array $parameters, \Exception $previous = null)
23+
public function __construct(array $parameters, \Throwable $previous = null)
2424
{
2525
parent::__construct(sprintf('Circular reference detected for parameter "%s" ("%s" > "%s").', $parameters[0], implode('" > "', $parameters), $parameters[0]), 0, $previous);
2626

src/Symfony/Component/DependencyInjection/Exception/ParameterNotFoundException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ class ParameterNotFoundException extends InvalidArgumentException implements Not
3030
* @param string $key The requested parameter key
3131
* @param string $sourceId The service id that references the non-existent parameter
3232
* @param string $sourceKey The parameter key that references the non-existent parameter
33-
* @param \Exception $previous The previous exception
33+
* @param \Throwable $previous The previous exception
3434
* @param string[] $alternatives Some parameter name alternatives
3535
* @param string|null $nonNestedAlternative The alternative parameter name when the user expected dot notation for nested parameters
3636
*/
37-
public function __construct(string $key, string $sourceId = null, string $sourceKey = null, \Exception $previous = null, array $alternatives = [], string $nonNestedAlternative = null)
37+
public function __construct(string $key, string $sourceId = null, string $sourceKey = null, \Throwable $previous = null, array $alternatives = [], string $nonNestedAlternative = null)
3838
{
3939
$this->key = $key;
4040
$this->sourceId = $sourceId;

src/Symfony/Component/DependencyInjection/Exception/ServiceCircularReferenceException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ServiceCircularReferenceException extends RuntimeException
2121
private $serviceId;
2222
private $path;
2323

24-
public function __construct(string $serviceId, array $path, \Exception $previous = null)
24+
public function __construct(string $serviceId, array $path, \Throwable $previous = null)
2525
{
2626
parent::__construct(sprintf('Circular reference detected for service "%s", path: "%s".', $serviceId, implode(' -> ', $path)), 0, $previous);
2727

src/Symfony/Component/DependencyInjection/Exception/ServiceNotFoundException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ServiceNotFoundException extends InvalidArgumentException implements NotFo
2424
private $sourceId;
2525
private $alternatives;
2626

27-
public function __construct(string $id, string $sourceId = null, \Exception $previous = null, array $alternatives = [], string $msg = null)
27+
public function __construct(string $id, string $sourceId = null, \Throwable $previous = null, array $alternatives = [], string $msg = null)
2828
{
2929
if (null !== $msg) {
3030
// no-op

src/Symfony/Component/Dotenv/Exception/FormatException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class FormatException extends \LogicException implements ExceptionInterfac
2020
{
2121
private $context;
2222

23-
public function __construct(string $message, FormatExceptionContext $context, int $code = 0, \Exception $previous = null)
23+
public function __construct(string $message, FormatExceptionContext $context, int $code = 0, \Throwable $previous = null)
2424
{
2525
$this->context = $context;
2626

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