Skip to content

Commit 3402ac9

Browse files
committed
Allow \Throwable $previous everywhere
1 parent e87e693 commit 3402ac9

6 files changed

+7
-7
lines changed

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

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
}

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

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;

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

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

0 commit comments

Comments
 (0)