Skip to content

Commit f0e5715

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 ecfff16 commit f0e5715

File tree

6 files changed

+6
-12
lines changed

6 files changed

+6
-12
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@
4848
"phpstan/phpstan-phpunit": "^1.0",
4949
"phpstan/phpstan-symfony": "^1.1",
5050
"phpunit/phpunit": "^9.5",
51-
"psalm/plugin-phpunit": "^0.18.4",
51+
"psalm/plugin-phpunit": "^0.19.2",
5252
"symfony/config": "^4.4|^5.0|^6.0",
5353
"symfony/http-client": "^5.3",
5454
"symfony/http-kernel": "^4.4|^5.3|^6.0",
5555
"symfony/options-resolver": "^4.4|^5.3|^6.0",
5656
"symfony/proxy-manager-bridge": "^4.4|^5.3|^6.0",
5757
"symfony/yaml": "^4.4|^5.3|^6.0",
58-
"vimeo/psalm": "^5.0"
58+
"vimeo/psalm": "6.4.0"
5959
},
6060
"suggest": {
6161
"symfony/config": "Needed to use otel-sdk-bundle",

psalm.xml.dist

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,4 @@
1818
<plugins>
1919
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
2020
</plugins>
21-
<issueHandlers>
22-
<UndefinedDocblockClass>
23-
<errorLevel type="suppress">
24-
<file name="src/OtelSdkBundle/DependencyInjection/OtelSdkExtension.php" />
25-
<referencedClass name="Symfony\Component\DependencyInjection\ContainerBuilder" />
26-
</errorLevel>
27-
</UndefinedDocblockClass>
28-
</issueHandlers>
2921
</psalm>

src/OtelBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "symfony-bundle",
66
"license": "Apache-2.0",
77
"require": {
8-
"php": "^7.4 || ^8.0",
8+
"php": "^8.1",
99
"composer-runtime-api": "^2.0",
1010
"open-telemetry/api": "^1",
1111
"open-telemetry/context": "^1",

src/OtelSdkBundle/Factory/GenericFactoryTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ private function parameterCallback(ReflectionParameter $parameter, string $optio
228228

229229
private static function camelToSnakeCase(string $value): string
230230
{
231+
/** @psalm-suppress PossiblyNullArgument */
231232
return strtolower(
232233
ltrim(
233234
preg_replace(

src/OtelSdkBundle/Util/ServiceHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class ServiceHelper
1212
*/
1313
public static function classToId(string $class): string
1414
{
15+
/** @psalm-suppress PossiblyNullArgument */
1516
return str_replace(
1617
'\_',
1718
'.',

tests/Unit/OtelSdkBundle/Util/ServiceHelperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function testFloatToString()
2828
ServiceHelper::floatToString(0.5)
2929
);
3030
$this->assertSame(
31-
'2.1234567890124',
31+
PHP_VERSION_ID < 80400 ? '2.1234567890124' : '2.1234567890123',
3232
ServiceHelper::floatToString(2.12345678901234567890)
3333
);
3434
}

0 commit comments

Comments
 (0)