Skip to content

Commit 1add99d

Browse files
committed
Fix \E_STRICT deprecation
1 parent 21ab633 commit 1add99d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/DependencyInjection/Fixtures/php/error_types.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/** @var ContainerBuilder $container */
88
$container->loadFromExtension('sentry', [
99
'options' => [
10-
'error_types' => \E_ALL & ~(\E_NOTICE | \E_STRICT | \E_DEPRECATED),
10+
// 2048 is \E_STRICT which has been deprecated in PHP 8.4 so we should not reference it directly to prevent deprecation notices
11+
'error_types' => \E_ALL & ~(\E_NOTICE | 2048 | \E_DEPRECATED),
1112
],
1213
]);

tests/DependencyInjection/SentryExtensionTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ public function testErrorTypesOptionIsParsedFromStringToIntegerValue(): void
288288
$container = $this->createContainerFromFixture('error_types');
289289
$optionsDefinition = $container->getDefinition('sentry.client.options');
290290

291-
$this->assertSame(\E_ALL & ~(\E_NOTICE | \E_STRICT | \E_DEPRECATED), $optionsDefinition->getArgument(0)['error_types']);
291+
// 2048 is \E_STRICT which has been deprecated in PHP 8.4 so we should not reference it directly to prevent deprecation notices
292+
$this->assertSame(\E_ALL & ~(\E_NOTICE | 2048 | \E_DEPRECATED), $optionsDefinition->getArgument(0)['error_types']);
292293
}
293294

294295
/**

0 commit comments

Comments
 (0)