Skip to content

Commit 0d0b3d4

Browse files
authored
Drop support for PHP 7.4 and 8.0, introduce support for PHP 8.4, fix semconv deprecations (#315)
* Fixed a bit of warnings and deprecations * Dropped support for PHP 7.4 and 8.0. Introduced support for PHP 8.4 * Set revision psalm to 6.4.0, more suppressions * Curl instrumentation fix * updated packages generating deprecated warnings
1 parent f8754d1 commit 0d0b3d4

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"readme": "./README.md",
88
"license": "Apache-2.0",
99
"require": {
10-
"php": ">=8.0",
10+
"php": ">=8.1",
1111
"ext-mongodb": "^1.13",
1212
"ext-json": "*",
1313
"mongodb/mongodb": "^1.15",
@@ -19,10 +19,10 @@
1919
"phan/phan": "^5.0",
2020
"phpstan/phpstan": "^1.1",
2121
"phpstan/phpstan-phpunit": "^1.0",
22-
"psalm/plugin-phpunit": "^0.18.4",
22+
"psalm/plugin-phpunit": "^0.19.2",
2323
"open-telemetry/sdk": "^1.0",
2424
"phpunit/phpunit": "^9.5",
25-
"vimeo/psalm": "^5.0"
25+
"vimeo/psalm": "6.4.0"
2626
},
2727
"autoload": {
2828
"psr-4": {

src/MongoDBInstrumentationSubscriber.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ public function commandStarted(CommandStartedEvent $event): void
6868
$collectionName = MongoDBCollectionExtractor::extract($command);
6969
$databaseName = $event->getDatabaseName();
7070
$commandName = $event->getCommandName();
71-
/** @phpstan-ignore-next-line */
72-
if (version_compare(phpversion('mongodb'), '1.20.0', '>=')) {
71+
72+
$version = phpversion('mongodb');
73+
if ($version !== false && version_compare($version, '1.20.0', '>=')) {
7374
$host = $event->getHost();
7475
$port = $event->getPort();
7576
} else {

0 commit comments

Comments
 (0)