@@ -134,7 +134,10 @@ public function testPrerequisitesSatisfied(): void
134
134
AmbientContextForTests::testConfig ()->mysqlDb
135
135
);
136
136
self ::assertNotNull ($ mySQLi );
137
- self ::assertTrue ($ mySQLi ->ping ());
137
+ // Method mysqli::ping() is deprecated since PHP 8.4
138
+ if (PHP_VERSION_ID < 80400 ) {
139
+ self ::assertTrue ($ mySQLi ->ping ());
140
+ }
138
141
}
139
142
140
143
public function testIsAutoInstrumentationEnabled (): void
@@ -351,7 +354,11 @@ public static function appCodeForTestAutoInstrumentation(MixedMap $appCodeArgs):
351
354
$ mySQLiApiFacade = new ApiFacade ($ isOOPApi );
352
355
$ mySQLi = $ mySQLiApiFacade ->connect ($ host , $ port , $ user , $ password , $ connectDbName );
353
356
self ::assertNotNull ($ mySQLi );
354
- self ::assertTrue ($ mySQLi ->ping ());
357
+
358
+ // Method mysqli::ping() is deprecated since PHP 8.4
359
+ if (PHP_VERSION_ID < 80400 ) {
360
+ self ::assertTrue ($ mySQLi ->ping ());
361
+ }
355
362
356
363
if ($ connectDbName !== $ workDbName ) {
357
364
self ::assertTrue ($ mySQLi ->query (self ::CREATE_DATABASE_IF_NOT_EXISTS_SQL_PREFIX . $ workDbName ));
@@ -447,7 +454,11 @@ private function implTestAutoInstrumentation(MixedMap $testArgs): void
447
454
$ expectedSpans = [];
448
455
if ($ isInstrumentationEnabled ) {
449
456
$ expectedSpans [] = $ expectationsBuilder ->fromNames ('mysqli ' , '__construct ' , 'mysqli_connect ' );
450
- $ expectedSpans [] = $ expectationsBuilder ->fromNames ('mysqli ' , 'ping ' );
457
+
458
+ // Method mysqli::ping() is deprecated since PHP 8.4
459
+ if (PHP_VERSION_ID < 80400 ) {
460
+ $ expectedSpans [] = $ expectationsBuilder ->fromNames ('mysqli ' , 'ping ' );
461
+ }
451
462
452
463
if ($ connectDbName !== $ workDbName ) {
453
464
$ expectedSpans [] = $ expectationsBuilder ->fromStatement (self ::CREATE_DATABASE_IF_NOT_EXISTS_SQL_PREFIX . $ workDbName );
0 commit comments