Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ "8.4", "8.3", "8.2", "8.1" ]
php: [ "8.5", "8.4", "8.3", "8.2", "8.1" ]
packages:
# All versions below only support PHP ^8.1 (Laravel requirement)
- { laravel: ^10.0, testbench: ^8.0, phpunit: 9.6.* }
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ "8.4", "8.3", "8.2", "8.1", "8.0", "7.4", "7.3", "7.2" ]
php: [ "8.5", "8.4", "8.3", "8.2", "8.1", "8.0", "7.4", "7.3", "7.2" ]
packages:
# All versions below should be test on PHP ^7.1 (Sentry SDK requirement) and PHP < 8.0 (PHPUnit requirement)
- { laravel: ^6.0, testbench: 4.7.*, phpunit: 8.4.* }
Expand Down Expand Up @@ -136,6 +136,13 @@ jobs:
- php: "8.4"
packages: { laravel: ^8.0, testbench: ^6.0, phpunit: 9.3.* }

- php: "8.5"
packages: { laravel: ^6.0, testbench: 4.7.*, phpunit: 8.4.* }
- php: "8.5"
packages: { laravel: ^7.0, testbench: 5.1.*, phpunit: 8.4.* }
- php: "8.5"
packages: { laravel: ^8.0, testbench: ^6.0, phpunit: 9.3.* }

name: phpunit (PHP:${{ matrix.php }}, Laravel:${{ matrix.packages.laravel }})

steps:
Expand Down
12 changes: 10 additions & 2 deletions test/Sentry/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ protected function getCurrentSentryScope(): Scope
$hub = $this->getSentryHubFromContainer();

$method = new ReflectionMethod($hub, 'getScope');
$method->setAccessible(true);
if (\PHP_VERSION_ID < 80100)
{
// This method is no-op starting from PHP 8.1; see also https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectionsetaccessible
$method->setAccessible(true);
}

return $method->invoke($hub);
}
Expand All @@ -136,7 +140,11 @@ protected function getCurrentSentryBreadcrumbs(): array
$scope = $this->getCurrentSentryScope();

$property = new ReflectionProperty($scope, 'breadcrumbs');
$property->setAccessible(true);
if (\PHP_VERSION_ID < 80100)
{
// This method is no-op starting from PHP 8.1; see also https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_reflectionsetaccessible
$property->setAccessible(true);
}

return $property->getValue($scope);
}
Expand Down
Loading