Skip to content

Commit a1ce98d

Browse files
author
Joel Klaverkamp
committed
PHP7ize Laravel 4.2
1 parent 07d7a3d commit a1ce98d

File tree

7 files changed

+7
-8
lines changed

7 files changed

+7
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"classpreloader/classpreloader": "~1.0.2",
1515
"d11wtq/boris": "~1.0",
1616
"ircmaxell/password-compat": "~1.0",
17-
"filp/whoops": "1.1.*",
17+
"filp/whoops": "2.*",
1818
"jeremeamia/superclosure": "~1.0.1",
1919
"monolog/monolog": "~1.6",
2020
"nesbot/carbon": "~1.0",

src/Illuminate/Exception/ExceptionDisplayerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ interface ExceptionDisplayerInterface {
99
*
1010
* @param \Exception $exception
1111
*/
12-
public function display(Exception $exception);
12+
public function display(\Throwable $exception);
1313

1414
}

src/Illuminate/Exception/Handler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ protected function hints(ReflectionFunction $reflection, $exception)
316316
* @param \Exception $e
317317
* @return string
318318
*/
319-
protected function formatException(\Exception $e)
319+
protected function formatException(\Throwable $e)
320320
{
321321
if ($this->debug)
322322
{

src/Illuminate/Exception/PlainDisplayer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class PlainDisplayer implements ExceptionDisplayerInterface {
1212
* @param \Exception $exception
1313
* @return \Symfony\Component\HttpFoundation\Response
1414
*/
15-
public function display(Exception $exception)
15+
public function display(\Throwable $exception)
1616
{
1717
$status = $exception instanceof HttpExceptionInterface ? $exception->getStatusCode() : 500;
1818

src/Illuminate/Exception/SymfonyDisplayer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(ExceptionHandler $symfony, $returnJson = false)
3939
* @param \Exception $exception
4040
* @return \Symfony\Component\HttpFoundation\Response
4141
*/
42-
public function display(Exception $exception)
42+
public function display(\Throwable $exception)
4343
{
4444
if ($this->returnJson)
4545
{

src/Illuminate/Exception/WhoopsDisplayer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(Run $whoops, $runningInConsole)
4040
* @param \Exception $exception
4141
* @return \Symfony\Component\HttpFoundation\Response
4242
*/
43-
public function display(Exception $exception)
43+
public function display(\Throwable $exception)
4444
{
4545
$status = $exception instanceof HttpExceptionInterface ? $exception->getStatusCode() : 500;
4646

tests/Database/DatabaseConnectorTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ public function testMySqlConnectCallsCreateConnectionWithProperArguments($dsn, $
2828
$connector->expects($this->once())->method('getOptions')->with($this->equalTo($config))->will($this->returnValue(array('options')));
2929
$connector->expects($this->once())->method('createConnection')->with($this->equalTo($dsn), $this->equalTo($config), $this->equalTo(array('options')))->will($this->returnValue($connection));
3030
$connection->shouldReceive('prepare')->once()->with('set names \'utf8\' collate \'utf8_unicode_ci\'')->andReturn($connection);
31-
$connection->shouldReceive('prepare')->once()->with('set session sql_mode=\'\'')->andReturn($connection);
32-
$connection->shouldReceive('execute')->times(2);
31+
$connection->shouldReceive('execute')->once();
3332
$connection->shouldReceive('exec')->zeroOrMoreTimes();
3433
$result = $connector->connect($config);
3534

0 commit comments

Comments
 (0)