Skip to content

Commit 8a0dab4

Browse files
authored
Merge pull request #667 from rollbar/added/php8.5-support
Added PHP 8.5 Support
2 parents af3541b + e9d2907 commit 8a0dab4

35 files changed

+69
-21
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
matrix:
3737
# All the versions, OS, and dependency levels we want to support
3838
os: [ubuntu] # TODO: windows, macos
39-
php: [ '8.1', '8.2', '8.3', '8.4' ]
39+
php: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
4040
dependency: [ stable ]
4141
# Our code has paths for with- and without- XDebug, and we want to test
4242
# both of them.
@@ -73,22 +73,21 @@ jobs:
7373
key: ${{ matrix.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.dependency }}-
7474
restore-keys: ${{ matrix.os }}-composer-${{ matrix.dependency }}-
7575

76-
- name: Install dependencies PHP < 8.4
77-
if: matrix.php != '8.4'
76+
- name: Install dependencies PHP < 8.5
77+
if: matrix.php != '8.5'
7878
run: composer update --prefer-${{ matrix.dependency }} --prefer-dist --no-interaction
7979

80-
- name: Execute tests PHP < 8.4
81-
if: matrix.php != '8.4'
80+
- name: Execute tests PHP < 8.5
81+
if: matrix.php != '8.5'
8282
run: composer test
8383

84-
# This is a temporary workaround until vimeo/psalm is updated to support PHP 8.4.
85-
# See https://github.com/vimeo/psalm/issues/11107
86-
- name: Install dependencies PHP 8.4
87-
if: matrix.php == '8.4'
84+
# This is a temporary workaround until vimeo/psalm is updated to support PHP 8.5.
85+
- name: Install dependencies PHP 8.5
86+
if: matrix.php == '8.5'
8887
run: composer update --prefer-${{ matrix.dependency }} --prefer-dist --no-interaction --ignore-platform-reqs
8988

90-
- name: Execute tests PHP 8.4
91-
if: matrix.php == '8.4'
89+
- name: Execute tests PHP 8.5
90+
if: matrix.php == '8.5'
9291
run: |
9392
./vendor/bin/phpcs --standard=PSR2 ./src ./tests
9493
./vendor/bin/phpunit --coverage-clover build/logs/clover.xml

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"mockery/mockery": "^1.5.1",
4343
"squizlabs/php_codesniffer": "^3.7",
4444
"phpmd/phpmd" : "^2.13",
45-
"vimeo/psalm": "^5.9"
45+
"vimeo/psalm": "^6.13"
4646
},
4747

4848
"suggest": {

src/DataBuilder.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ protected function setServerExtras($config)
303303
*
304304
* @return void
305305
*/
306+
#[\Override]
306307
public function setCustom(array $config): void
307308
{
308309
$this->custom = $config['custom'] ?? \Rollbar\Defaults::get()->custom();
@@ -373,6 +374,7 @@ protected function setHost($config)
373374
*
374375
* @return Data
375376
*/
377+
#[\Override]
376378
public function makeData(string $level, Throwable|string|Stringable $toLog, array $context): Data
377379
{
378380
$env = $this->getEnvironment();
@@ -1013,6 +1015,7 @@ protected function getServerExtras()
10131015
*
10141016
* @return array|null
10151017
*/
1018+
#[\Override]
10161019
public function getCustom(): ?array
10171020
{
10181021
return $this->custom;
@@ -1103,6 +1106,7 @@ protected function resolveCustomContent(mixed $custom): array
11031106
*
11041107
* @return void
11051108
*/
1109+
#[\Override]
11061110
public function addCustom(string $key, mixed $data): void
11071111
{
11081112
if (!is_array($this->custom)) {
@@ -1119,6 +1123,7 @@ public function addCustom(string $key, mixed $data): void
11191123
*
11201124
* @return void
11211125
*/
1126+
#[\Override]
11221127
public function removeCustom(string $key): void
11231128
{
11241129
unset($this->custom[$key]);
@@ -1186,6 +1191,7 @@ private function getSourceLines($filename)
11861191
*
11871192
* @return ErrorWrapper
11881193
*/
1194+
#[\Override]
11891195
public function generateErrorWrapper(int $errno, string $errstr, ?string $errfile, ?int $errline): ErrorWrapper
11901196
{
11911197
return new ErrorWrapper(

src/Handlers/ErrorHandler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88

99
class ErrorHandler extends AbstractHandler
1010
{
11+
#[\Override]
1112
public function register()
1213
{
1314
$this->previousHandler = set_error_handler(array($this, 'handle'));
1415

1516
parent::register();
1617
}
1718

19+
#[\Override]
1820
public function handle(...$args)
1921
{
2022
parent::handle(...$args);

src/Handlers/ExceptionHandler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88

99
class ExceptionHandler extends AbstractHandler
1010
{
11+
#[\Override]
1112
public function register()
1213
{
1314
$this->previousHandler = set_exception_handler(array($this, 'handle'));
1415

1516
parent::register();
1617
}
17-
18+
19+
#[\Override]
1820
public function handle(...$args)
1921
{
2022
parent::handle(...$args);

src/Handlers/FatalHandler.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ class FatalHandler extends AbstractHandler
1515
{
1616

1717
private static $fatalErrors = array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR);
18-
18+
19+
#[\Override]
1920
public function register()
2021
{
2122
\register_shutdown_function(array($this, 'handle'));
2223

2324
parent::register();
2425
}
25-
26+
27+
#[\Override]
2628
public function handle(...$args)
2729
{
2830
parent::handle(...$args);

src/Payload/Body.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ public function setTelemetry(?array $telemetry): void
110110
*
111111
* @since 4.1.0 Includes the 'telemetry' key, if it is not empty.
112112
*/
113+
#[\Override]
113114
public function serialize()
114115
{
115116
$result = array();

src/Payload/Context.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function setPost(array $post): self
3535
return $this;
3636
}
3737

38+
#[\Override]
3839
public function serialize()
3940
{
4041
$result = array(

src/Payload/Data.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ public function setNotifier(Notifier $notifier): self
217217
return $this;
218218
}
219219

220+
#[\Override]
220221
public function serialize()
221222
{
222223
$result = array(

src/Payload/ExceptionInfo.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public function setDescription(?string $description): self
4949
return $this;
5050
}
5151

52+
#[\Override]
5253
public function serialize()
5354
{
5455
$result = array(

0 commit comments

Comments
 (0)