File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed
Tests/Unit/Consumption/Extension Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 88use Doctrine \Persistence \ManagerRegistry ;
99use Interop \Queue \ConnectionFactory ;
1010use Interop \Queue \Context ;
11- use ReflectionMethod ;
1211
1312class ManagerRegistryConnectionFactory implements ConnectionFactory
1413{
@@ -64,7 +63,7 @@ private function establishConnection(): Connection
6463 $ connection = $ this ->registry ->getConnection ($ this ->config ['connection_name ' ]);
6564 if (
6665 method_exists ($ connection , 'connect ' )
67- && (new ReflectionMethod ($ connection , 'connect ' ))->isPublic ()
66+ && (new \ ReflectionMethod ($ connection , 'connect ' ))->isPublic ()
6867 ) {
6968 // DBAL < 4
7069 $ connection ->connect ();
Original file line number Diff line number Diff line change 66use Doctrine \Persistence \ManagerRegistry ;
77use Enqueue \Consumption \Context \MessageReceived ;
88use Enqueue \Consumption \MessageReceivedExtensionInterface ;
9- use ReflectionMethod ;
109
1110class DoctrinePingConnectionExtension implements MessageReceivedExtensionInterface
1211{
@@ -39,7 +38,7 @@ public function onMessageReceived(MessageReceived $context): void
3938 $ connection ->close ();
4039 if (
4140 method_exists ($ connection , 'connect ' )
42- && (new ReflectionMethod ($ connection , 'connect ' ))->isPublic ()
41+ && (new \ ReflectionMethod ($ connection , 'connect ' ))->isPublic ()
4342 ) {
4443 // DBAL < 4
4544 $ connection ->connect ();
Original file line number Diff line number Diff line change 1414use Interop \Queue \Processor ;
1515use PHPUnit \Framework \MockObject \MockObject ;
1616use PHPUnit \Framework \TestCase ;
17- use ReflectionMethod ;
1817
1918class DoctrinePingConnectionExtensionTest extends TestCase
2019{
@@ -44,7 +43,7 @@ public function testShouldNotReconnectIfConnectionIsOK()
4443 ;
4544 if (
4645 method_exists (Connection::class, 'connect ' )
47- && (new ReflectionMethod (Connection::class, 'connect ' ))->isPublic ()
46+ && (new \ ReflectionMethod (Connection::class, 'connect ' ))->isPublic ()
4847 ) {
4948 // DBAL < 4
5049 $ connection ->expects ($ this ->never ())
@@ -93,7 +92,7 @@ public function testShouldDoesReconnectIfConnectionFailed()
9392 ;
9493 if (
9594 method_exists (Connection::class, 'connect ' )
96- && (new ReflectionMethod (Connection::class, 'connect ' ))->isPublic ()
95+ && (new \ ReflectionMethod (Connection::class, 'connect ' ))->isPublic ()
9796 ) {
9897 // DBAL < 4
9998 $ connection ->expects ($ this ->once ())
You can’t perform that action at this time.
0 commit comments