Skip to content

Instantly share code, notes, and snippets.

@yoyosan
Last active December 28, 2018 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoyosan/4a730785d08512f56a54c5f74334803f to your computer and use it in GitHub Desktop.
Save yoyosan/4a730785d08512f56a54c5f74334803f to your computer and use it in GitHub Desktop.
Remove `Exception` type hint from laravel 4.2 Whoops lib, for PHP 7.1
diff --git a/vendor/filp/whoops/src/Whoops/Exception/Inspector.php b/vendor/filp/whoops/src/Whoops/Exception/Inspector.php
index 06aeec31b..c2873f2e5 100644
--- a/vendor/filp/whoops/src/Whoops/Exception/Inspector.php
+++ b/vendor/filp/whoops/src/Whoops/Exception/Inspector.php
@@ -28,7 +28,7 @@ class Inspector
/**
* @param Exception $exception The exception to inspect
*/
- public function __construct(Exception $exception)
+ public function __construct($exception)
{
$this->exception = $exception;
}
diff --git a/vendor/filp/whoops/src/Whoops/Handler/Handler.php b/vendor/filp/whoops/src/Whoops/Handler/Handler.php
index d7e78f15c..8b2dca98c 100644
--- a/vendor/filp/whoops/src/Whoops/Handler/Handler.php
+++ b/vendor/filp/whoops/src/Whoops/Handler/Handler.php
@@ -74,7 +74,7 @@ abstract class Handler implements HandlerInterface
/**
* @param Exception $exception
*/
- public function setException(Exception $exception)
+ public function setException($exception)
{
$this->exception = $exception;
}
diff --git a/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php b/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php
index f50bc303c..f45183b32 100644
--- a/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php
+++ b/vendor/filp/whoops/src/Whoops/Handler/HandlerInterface.php
@@ -27,7 +27,7 @@ interface HandlerInterface
* @param Exception $exception
* @return void
*/
- public function setException(Exception $exception);
+ public function setException($exception);
/**
* @param Inspector $inspector
diff --git a/vendor/filp/whoops/src/Whoops/Run.php b/vendor/filp/whoops/src/Whoops/Run.php
index e23d60671..e64c9029a 100644
--- a/vendor/filp/whoops/src/Whoops/Run.php
+++ b/vendor/filp/whoops/src/Whoops/Run.php
@@ -95,7 +95,7 @@ class Run
* @param Exception $exception
* @return Inspector
*/
- protected function getInspector(Exception $exception)
+ protected function getInspector($exception)
{
return new Inspector($exception);
}
@@ -230,7 +230,7 @@ class Run
* @param Exception $exception
* @return string Output generated by handlers
*/
- public function handleException(Exception $exception)
+ public function handleException($exception)
{
// Walk the registered handlers in the reverse order
// they were registered, and pass off the exception
diff --git a/vendor/laravel/framework/src/Illuminate/Exception/ExceptionDisplayerInterface.php b/vendor/laravel/framework/src/Illuminate/Exception/ExceptionDisplayerInterface.php
index a9760626a..f5f5b2f1d 100755
--- a/vendor/laravel/framework/src/Illuminate/Exception/ExceptionDisplayerInterface.php
+++ b/vendor/laravel/framework/src/Illuminate/Exception/ExceptionDisplayerInterface.php
@@ -9,6 +9,6 @@ interface ExceptionDisplayerInterface {
*
* @param \Exception $exception
*/
- public function display(Exception $exception);
+ public function display($exception);
}
diff --git a/vendor/laravel/framework/src/Illuminate/Exception/WhoopsDisplayer.php b/vendor/laravel/framework/src/Illuminate/Exception/WhoopsDisplayer.php
index ec4291212..cea9e2d53 100755
--- a/vendor/laravel/framework/src/Illuminate/Exception/WhoopsDisplayer.php
+++ b/vendor/laravel/framework/src/Illuminate/Exception/WhoopsDisplayer.php
@@ -40,7 +40,7 @@ class WhoopsDisplayer implements ExceptionDisplayerInterface {
* @param \Exception $exception
* @return \Symfony\Component\HttpFoundation\Response
*/
- public function display(Exception $exception)
+ public function display($exception)
{
$status = $exception instanceof HttpExceptionInterface ? $exception->getStatusCode() : 500;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment