feature #30780 Fix some exception previous type hints (fabpot)

This PR was merged into the 4.3-dev branch.

Discussion
----------

Fix some exception previous type hints

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

follow-up for #30729

Commits
-------

f92efeb429 fixed some exception previous type hints
This commit is contained in:
Fabien Potencier 2019-03-30 08:46:07 +01:00
commit 760bbd595b
2 changed files with 4 additions and 4 deletions

View File

@ -24,10 +24,10 @@ class FileLoaderLoadException extends \Exception
* @param string $resource The resource that could not be imported
* @param string $sourceResource The original resource importing the new resource
* @param int $code The error code
* @param \Exception $previous A previous exception
* @param \Throwable $previous A previous exception
* @param string $type The type of resource
*/
public function __construct(string $resource, string $sourceResource = null, int $code = null, \Exception $previous = null, string $type = null)
public function __construct(string $resource, string $sourceResource = null, int $code = null, \Throwable $previous = null, string $type = null)
{
$message = '';
if ($previous) {

View File

@ -24,9 +24,9 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce
* @param string $message Exception message to throw
* @param array $alternatives List of similar defined names
* @param int $code Exception code
* @param \Exception $previous Previous exception used for the exception chaining
* @param \Throwable $previous Previous exception used for the exception chaining
*/
public function __construct(string $message, array $alternatives = [], int $code = 0, \Exception $previous = null)
public function __construct(string $message, array $alternatives = [], int $code = 0, \Throwable $previous = null)
{
parent::__construct($message, $code, $previous);