File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bridge \Doctrine \Messenger ;
13
13
14
- use Doctrine \DBAL \DBALException ;
15
- use Doctrine \DBAL \Exception ;
14
+ use Doctrine \DBAL \Exception as DBALException ;
16
15
use Doctrine \ORM \EntityManagerInterface ;
17
16
use Symfony \Component \Messenger \Envelope ;
18
17
use Symfony \Component \Messenger \Middleware \StackInterface ;
@@ -40,7 +39,7 @@ private function pingConnection(EntityManagerInterface $entityManager)
40
39
41
40
try {
42
41
$ connection ->executeQuery ($ connection ->getDatabasePlatform ()->getDummySelectSQL ());
43
- } catch (DBALException | Exception $ e ) {
42
+ } catch (DBALException $ e ) {
44
43
$ connection ->close ();
45
44
$ connection ->connect ();
46
45
}
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Bridge \Doctrine \Tests \Messenger ;
13
13
14
14
use Doctrine \DBAL \Connection ;
15
- use Doctrine \DBAL \DBALException ;
16
- use Doctrine \DBAL \Exception ;
15
+ use Doctrine \DBAL \Exception as DBALException ;
17
16
use Doctrine \ORM \EntityManagerInterface ;
18
17
use Doctrine \Persistence \ManagerRegistry ;
19
18
use Symfony \Bridge \Doctrine \Messenger \DoctrinePingConnectionMiddleware ;
@@ -50,7 +49,7 @@ public function testMiddlewarePingOk()
50
49
{
51
50
$ this ->connection ->expects ($ this ->once ())
52
51
->method ('getDatabasePlatform ' )
53
- ->will ($ this ->throwException (class_exists (Exception::class) ? new Exception () : new DBALException ()));
52
+ ->will ($ this ->throwException (new DBALException ()));
54
53
55
54
$ this ->connection ->expects ($ this ->once ())
56
55
->method ('close ' )
@@ -69,7 +68,7 @@ public function testMiddlewarePingResetEntityManager()
69
68
{
70
69
$ this ->connection ->expects ($ this ->once ())
71
70
->method ('getDatabasePlatform ' )
72
- ->will ($ this ->throwException (class_exists (Exception::class) ? new Exception () : new DBALException ()));
71
+ ->will ($ this ->throwException (new DBALException ()));
73
72
74
73
$ this ->entityManager ->expects ($ this ->once ())
75
74
->method ('isOpen ' )
Original file line number Diff line number Diff line change 47
47
"doctrine/annotations" : " ^1.10.4" ,
48
48
"doctrine/collections" : " ~1.0" ,
49
49
"doctrine/data-fixtures" : " ^1.1" ,
50
- "doctrine/dbal" : " ^2.10 |^3.0" ,
50
+ "doctrine/dbal" : " ^2.13 |^3.0" ,
51
51
"doctrine/orm" : " ^2.7.3"
52
52
},
53
53
"conflict" : {
54
- "doctrine/dbal" : " <2.10 " ,
54
+ "doctrine/dbal" : " <2.13 " ,
55
55
"doctrine/orm" : " <2.7.3" ,
56
56
"phpunit/phpunit" : " <5.4.3" ,
57
57
"symfony/dependency-injection" : " <4.4" ,
You can’t perform that action at this time.
0 commit comments