@@ -844,13 +844,17 @@ public function testCheckCallsRejectFunctionImmediateWithoutLeavingDanglingPromi
844844 $ builder = new HappyEyeBallsConnectionBuilder ($ loop , $ connector , $ resolver , $ uri , $ host , $ parts );
845845
846846 $ ref = new \ReflectionProperty ($ builder , 'connectQueue ' );
847- $ ref ->setAccessible (true );
847+ if (\PHP_VERSION_ID < 80100 ) {
848+ $ ref ->setAccessible (true );
849+ }
848850 $ ref ->setValue ($ builder , array ('::1 ' ));
849851
850852 $ builder ->check ($ this ->expectCallableNever (), function () { });
851853
852854 $ ref = new \ReflectionProperty ($ builder , 'connectionPromises ' );
853- $ ref ->setAccessible (true );
855+ if (\PHP_VERSION_ID < 80100 ) {
856+ $ ref ->setAccessible (true );
857+ }
854858 $ promises = $ ref ->getValue ($ builder );
855859
856860 $ this ->assertEquals (array (), $ promises );
@@ -876,7 +880,9 @@ public function testCleanUpCancelsAllPendingConnectionAttempts()
876880 $ builder = new HappyEyeBallsConnectionBuilder ($ loop , $ connector , $ resolver , $ uri , $ host , $ parts );
877881
878882 $ ref = new \ReflectionProperty ($ builder , 'connectQueue ' );
879- $ ref ->setAccessible (true );
883+ if (\PHP_VERSION_ID < 80100 ) {
884+ $ ref ->setAccessible (true );
885+ }
880886 $ ref ->setValue ($ builder , array ('::1 ' , '::1 ' ));
881887
882888 $ builder ->check ($ this ->expectCallableNever (), function () { });
@@ -904,7 +910,9 @@ public function testCleanUpCancelsAllPendingConnectionAttemptsWithoutStartingNew
904910 $ builder = new HappyEyeBallsConnectionBuilder ($ loop , $ connector , $ resolver , $ uri , $ host , $ parts );
905911
906912 $ ref = new \ReflectionProperty ($ builder , 'connectQueue ' );
907- $ ref ->setAccessible (true );
913+ if (\PHP_VERSION_ID < 80100 ) {
914+ $ ref ->setAccessible (true );
915+ }
908916 $ ref ->setValue ($ builder , array ('::1 ' , '::1 ' ));
909917
910918 $ builder ->check ($ this ->expectCallableNever (), function () { });
@@ -927,7 +935,9 @@ public function testMixIpsIntoConnectQueueSometimesAssignsInOriginalOrder()
927935 $ builder ->mixIpsIntoConnectQueue (array ('::1 ' , '::2 ' ));
928936
929937 $ ref = new \ReflectionProperty ($ builder , 'connectQueue ' );
930- $ ref ->setAccessible (true );
938+ if (\PHP_VERSION_ID < 80100 ) {
939+ $ ref ->setAccessible (true );
940+ }
931941 $ value = $ ref ->getValue ($ builder );
932942
933943 if ($ value === array ('::1 ' , '::2 ' )) {
@@ -953,7 +963,9 @@ public function testMixIpsIntoConnectQueueSometimesAssignsInReverseOrder()
953963 $ builder ->mixIpsIntoConnectQueue (array ('::1 ' , '::2 ' ));
954964
955965 $ ref = new \ReflectionProperty ($ builder , 'connectQueue ' );
956- $ ref ->setAccessible (true );
966+ if (\PHP_VERSION_ID < 80100 ) {
967+ $ ref ->setAccessible (true );
968+ }
957969 $ value = $ ref ->getValue ($ builder );
958970
959971 if ($ value === array ('::2 ' , '::1 ' )) {
0 commit comments