Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.7] Detect connection errors also #22905

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"filp/whoops": "^2.1.4",
"mockery/mockery": "~1.0",
"moontoast/math": "^1.1",
"orchestra/testbench-core": "3.6.*",
"orchestra/testbench-core": "3.7.*",
"pda/pheanstalk": "~3.0",
"phpunit/phpunit": "~6.0",
"predis/predis": "^1.1.1",
Expand All @@ -102,7 +102,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"suggest": {
Expand Down
16 changes: 8 additions & 8 deletions src/Illuminate/Auth/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
],
"require": {
"php": "^7.1.3",
"illuminate/contracts": "5.6.*",
"illuminate/http": "5.6.*",
"illuminate/queue": "5.6.*",
"illuminate/support": "5.6.*"
"illuminate/contracts": "5.7.*",
"illuminate/http": "5.7.*",
"illuminate/queue": "5.7.*",
"illuminate/support": "5.7.*"
},
"autoload": {
"psr-4": {
Expand All @@ -27,13 +27,13 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"suggest": {
"illuminate/console": "Required to use the auth:clear-resets command (5.6.*).",
"illuminate/queue": "Required to fire login / logout events (5.6.*).",
"illuminate/session": "Required to use the session based guard (5.6.*)."
"illuminate/console": "Required to use the auth:clear-resets command (5.7.*).",
"illuminate/queue": "Required to fire login / logout events (5.7.*).",
"illuminate/session": "Required to use the session based guard (5.7.*)."
},
"config": {
"sort-packages": true
Expand Down
10 changes: 5 additions & 5 deletions src/Illuminate/Broadcasting/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"require": {
"php": "^7.1.3",
"psr/log": "~1.0",
"illuminate/bus": "5.6.*",
"illuminate/contracts": "5.6.*",
"illuminate/queue": "5.6.*",
"illuminate/support": "5.6.*"
"illuminate/bus": "5.7.*",
"illuminate/contracts": "5.7.*",
"illuminate/queue": "5.7.*",
"illuminate/support": "5.7.*"
},
"autoload": {
"psr-4": {
Expand All @@ -28,7 +28,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"suggest": {
Expand Down
8 changes: 4 additions & 4 deletions src/Illuminate/Bus/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
],
"require": {
"php": "^7.1.3",
"illuminate/contracts": "5.6.*",
"illuminate/pipeline": "5.6.*",
"illuminate/support": "5.6.*"
"illuminate/contracts": "5.7.*",
"illuminate/pipeline": "5.7.*",
"illuminate/support": "5.7.*"
},
"autoload": {
"psr-4": {
Expand All @@ -26,7 +26,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"config": {
Expand Down
12 changes: 6 additions & 6 deletions src/Illuminate/Cache/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
],
"require": {
"php": "^7.1.3",
"illuminate/contracts": "5.6.*",
"illuminate/support": "5.6.*"
"illuminate/contracts": "5.7.*",
"illuminate/support": "5.7.*"
},
"autoload": {
"psr-4": {
Expand All @@ -25,13 +25,13 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"suggest": {
"illuminate/database": "Required to use the database cache driver (5.6.*).",
"illuminate/filesystem": "Required to use the file cache driver (5.6.*).",
"illuminate/redis": "Required to use the redis cache driver (5.6.*)."
"illuminate/database": "Required to use the database cache driver (5.7.*).",
"illuminate/filesystem": "Required to use the file cache driver (5.7.*).",
"illuminate/redis": "Required to use the redis cache driver (5.7.*)."
},
"config": {
"sort-packages": true
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Config/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
],
"require": {
"php": "^7.1.3",
"illuminate/contracts": "5.6.*",
"illuminate/support": "5.6.*"
"illuminate/contracts": "5.7.*",
"illuminate/support": "5.7.*"
},
"autoload": {
"psr-4": {
Expand All @@ -25,7 +25,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"config": {
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Console/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
],
"require": {
"php": "^7.1.3",
"illuminate/contracts": "5.6.*",
"illuminate/support": "5.6.*",
"illuminate/contracts": "5.7.*",
"illuminate/support": "5.7.*",
"symfony/console": "~4.0"
},
"autoload": {
Expand All @@ -26,7 +26,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"suggest": {
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Container/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^7.1.3",
"illuminate/contracts": "5.6.*",
"illuminate/contracts": "5.7.*",
"psr/container": "~1.0"
},
"autoload": {
Expand All @@ -25,7 +25,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Contracts/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"config": {
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Cookie/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
],
"require": {
"php": "^7.1.3",
"illuminate/contracts": "5.6.*",
"illuminate/support": "5.6.*",
"illuminate/contracts": "5.7.*",
"illuminate/support": "5.7.*",
"symfony/http-foundation": "~4.0",
"symfony/http-kernel": "~4.0"
},
Expand All @@ -27,7 +27,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Concerns/ManagesTransactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ protected function createSavepoint()
/**
* Handle an exception from a transaction beginning.
*
* @param \Exception $e
* @param \Throwable $e
* @return void
*
* @throws \Exception
Expand Down
5 changes: 3 additions & 2 deletions src/Illuminate/Database/Connectors/Connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use PDO;
use Exception;
use Throwable;
use Doctrine\DBAL\Driver\PDOConnection;
use Illuminate\Database\DetectsLostConnections;

Expand Down Expand Up @@ -82,7 +83,7 @@ protected function isPersistentConnection($options)
/**
* Handle an exception that occurred during connect execution.
*
* @param \Exception $e
* @param \Throwable $e
* @param string $dsn
* @param string $username
* @param string $password
Expand All @@ -91,7 +92,7 @@ protected function isPersistentConnection($options)
*
* @throws \Exception
*/
protected function tryAgainIfCausedByLostConnection(Exception $e, $dsn, $username, $password, $options)
protected function tryAgainIfCausedByLostConnection(Throwable $e, $dsn, $username, $password, $options)
{
if ($this->causedByLostConnection($e)) {
return $this->createPdoConnection($dsn, $username, $password, $options);
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Database/DetectsLostConnections.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

namespace Illuminate\Database;

use Exception;
use Throwable;
use Illuminate\Support\Str;

trait DetectsLostConnections
{
/**
* Determine if the given exception was caused by a lost connection.
*
* @param \Exception $e
* @param \Throwable $e
* @return bool
*/
protected function causedByLostConnection(Exception $e)
protected function causedByLostConnection(Throwable $e)
{
$message = $e->getMessage();

Expand Down
16 changes: 8 additions & 8 deletions src/Illuminate/Database/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
],
"require": {
"php": "^7.1.3",
"illuminate/container": "5.6.*",
"illuminate/contracts": "5.6.*",
"illuminate/support": "5.6.*"
"illuminate/container": "5.7.*",
"illuminate/contracts": "5.7.*",
"illuminate/support": "5.7.*"
},
"autoload": {
"psr-4": {
Expand All @@ -27,16 +27,16 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"suggest": {
"doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.6).",
"fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).",
"illuminate/console": "Required to use the database commands (5.6.*).",
"illuminate/events": "Required to use the observers with Eloquent (5.6.*).",
"illuminate/filesystem": "Required to use the migrations (5.6.*).",
"illuminate/pagination": "Required to paginate the result set (5.6.*)."
"illuminate/console": "Required to use the database commands (5.7.*).",
"illuminate/events": "Required to use the observers with Eloquent (5.7.*).",
"illuminate/filesystem": "Required to use the migrations (5.7.*).",
"illuminate/pagination": "Required to paginate the result set (5.7.*)."
},
"config": {
"sort-packages": true
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Encryption/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"php": "^7.1.3",
"ext-mbstring": "*",
"ext-openssl": "*",
"illuminate/contracts": "5.6.*",
"illuminate/support": "5.6.*"
"illuminate/contracts": "5.7.*",
"illuminate/support": "5.7.*"
},
"autoload": {
"psr-4": {
Expand All @@ -27,7 +27,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"config": {
Expand Down
8 changes: 4 additions & 4 deletions src/Illuminate/Events/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
],
"require": {
"php": "^7.1.3",
"illuminate/container": "5.6.*",
"illuminate/contracts": "5.6.*",
"illuminate/support": "5.6.*"
"illuminate/container": "5.7.*",
"illuminate/contracts": "5.7.*",
"illuminate/support": "5.7.*"
},
"autoload": {
"psr-4": {
Expand All @@ -26,7 +26,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"config": {
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Filesystem/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
],
"require": {
"php": "^7.1.3",
"illuminate/contracts": "5.6.*",
"illuminate/support": "5.6.*",
"illuminate/contracts": "5.7.*",
"illuminate/support": "5.7.*",
"symfony/finder": "~4.0"
},
"autoload": {
Expand All @@ -26,7 +26,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"suggest": {
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*
* @var string
*/
const VERSION = '5.6-dev';
const VERSION = '5.7-dev';

/**
* The base path for the Laravel installation.
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Hashing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
],
"require": {
"php": "^7.1.3",
"illuminate/contracts": "5.6.*",
"illuminate/support": "5.6.*"
"illuminate/contracts": "5.7.*",
"illuminate/support": "5.7.*"
},
"autoload": {
"psr-4": {
Expand All @@ -25,7 +25,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.6-dev"
"dev-master": "5.7-dev"
}
},
"config": {
Expand Down
Loading