Skip to content

Commit 5e95ad5

Browse files
authored
chore!: support Laravel 11 (#118)
1 parent 764f4df commit 5e95ad5

15 files changed

+126
-186
lines changed

.github/workflows/run-tests.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,30 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
php:
16-
- 7.4
17-
- 7.3
16+
- 8.3
17+
- 8.2
18+
- 8.1
1819
laravel:
19-
- 8.*
20-
- 7.*
20+
- 11.*
21+
- 10.*
2122
deps:
2223
- lowest
2324
- latest
2425
include:
26+
- {php: '8.3', laravel: '11.*'}
27+
- {php: '8.2', laravel: '11.*'}
28+
29+
- {php: '8.3', laravel: '10.*'}
2530
- {php: '8.2', laravel: '10.*'}
2631
- {php: '8.1', laravel: '10.*'}
27-
28-
- {php: '8.2', laravel: '9.*'}
29-
- {php: '8.1', laravel: '9.*'}
30-
- {php: '8.0', laravel: '9.*'}
31-
32-
- {php: '8.1', laravel: '8.*'}
33-
- {php: '8.0', laravel: '8.*'}
3432
exclude:
35-
- {php: '8.2', deps: 'lowest'}
36-
- {php: '8.1', deps: 'lowest'}
37-
- {php: '8.0', deps: 'lowest'}
33+
- {php: '8.1', laravel: '11.*'}
3834
name: PHP ${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.deps }}
3935
steps:
4036
- name: Checkout code
41-
uses: actions/checkout@v1
37+
uses: actions/checkout@v4
4238
- name: Cache dependencies
43-
uses: actions/cache@v1
39+
uses: actions/cache@v4
4440
with:
4541
path: ~/.composer/cache/files
4642
key: >-
@@ -64,4 +60,4 @@ jobs:
6460
run: composer update --prefer-dist --no-interaction
6561

6662
- name: Execute tests
67-
run: vendor/bin/phpunit
63+
run: vendor/bin/phpunit --no-coverage

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
## [4.0.0] - 2024-03-22
10+
### Added
11+
- Support for Laravel 11
12+
913
## [3.18.2] - 2023-12-28
1014
### Refactored
1115
- Check-Ins: check-in using slug

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
}
2222
],
2323
"require": {
24-
"php": "^7.2|^8.0",
24+
"php": "^8.1",
2525
"honeybadger-io/honeybadger-php": "^2.18.0",
2626
"sixlive/dotenv-editor": "^1.1|^2.0",
27-
"illuminate/console": "^7.0|^8.0|^9.0|^10.0",
28-
"illuminate/support": "^7.0|^8.0|^9.0|^10.0",
27+
"illuminate/console": "^10.0|^11.0",
28+
"illuminate/support": "^10.0|^11.0",
2929
"monolog/monolog": "^2.0|^3.2",
3030
"ext-json": "*"
3131
},
3232
"require-dev": {
3333
"larapack/dd": "^1.0",
3434
"mockery/mockery": "^1.4",
35-
"orchestra/testbench": "^5.0|^6.0|^7.0|^8.0",
36-
"phpunit/phpunit": "^8.4|^9.3"
35+
"orchestra/testbench": "^8.0|^9.0",
36+
"phpunit/phpunit": "^10.5|^11.0"
3737
},
3838
"autoload": {
3939
"psr-4": {

config/honeybadger.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
* Define your checkins here and synchronize them to Honeybadger with the
139139
* honeybadger:checkins:sync artisan command.
140140
* The recommended approach is to run this command as part of your deploy process.
141-
* Learn more about checkins at https://docs.honeybadger.io/api/reporting-check-ins/
141+
* Learn more about checkins at https://docs.honeybadger.io/api/reporting-check-ins/.
142142
*/
143-
'checkins' => [],
143+
'checkins' => [],
144144
];

phpunit.xml.dist

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3-
<coverage>
4-
<include>
5-
<directory suffix=".php">src/</directory>
6-
</include>
7-
<report>
8-
<clover outputFile="build/logs/clover.xml"/>
9-
<html outputDirectory="build/coverage"/>
10-
<text outputFile="build/coverage.txt"/>
11-
</report>
12-
</coverage>
13-
<testsuites>
14-
<testsuite name="Honeybadger Test Suite">
15-
<directory>tests</directory>
16-
</testsuite>
17-
</testsuites>
18-
<logging>
19-
<junit outputFile="build/report.junit.xml"/>
20-
</logging>
21-
<php>
22-
<env name="APP_KEY" value="base64:hwRkvdrUmW5PoNBh+H0KgUqmSOivZbFd5gW7IPHztmY="/>
23-
</php>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3+
<coverage>
4+
<report>
5+
<clover outputFile="build/logs/clover.xml"/>
6+
<html outputDirectory="build/coverage"/>
7+
<text outputFile="build/coverage.txt"/>
8+
</report>
9+
</coverage>
10+
<testsuites>
11+
<testsuite name="Honeybadger Test Suite">
12+
<directory>tests</directory>
13+
</testsuite>
14+
</testsuites>
15+
<logging>
16+
<junit outputFile="build/report.junit.xml"/>
17+
</logging>
18+
<php>
19+
<env name="APP_KEY" value="base64:hwRkvdrUmW5PoNBh+H0KgUqmSOivZbFd5gW7IPHztmY="/>
20+
</php>
21+
<source>
22+
<include>
23+
<directory suffix=".php">src/</directory>
24+
</include>
25+
</source>
2426
</phpunit>

src/Breadcrumbs/MailBreadcrumb.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ protected function getMetadata($event): array
1717
'queue' => $event->data['queue'] ?? null,
1818
'replyTo' => $this->extractAddresses($event->message->getReplyTo()),
1919
'to' => $this->extractAddresses($event->message->getTo()),
20-
'cc' => $this->extractAddresses(($event->message->getCc() ?? [])),
21-
'bcc' => $this->extractAddresses(($event->message->getBcc() ?? [])),
20+
'cc' => $this->extractAddresses($event->message->getCc() ?? []),
21+
'bcc' => $this->extractAddresses($event->message->getBcc() ?? []),
2222
'subject' => $event->message->getSubject(),
2323
];
2424
}

src/Commands/HoneybadgerDeployCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private function resolveParams(): array
7171
$config = Config::get('honeybadger');
7272

7373
return [
74-
'api_key' => $this->option('apiKey') ?? $config['api_key'],
74+
'api_key' => $this->option('apiKey') ?? $config['api_key'],
7575
'deploy' => array_merge([
7676
'revision' => $config['version'] ?? $this->gitHash(),
7777
'environment' => $config['environment_name'],

src/HoneybadgerLaravel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class HoneybadgerLaravel extends Honeybadger
1414
{
15-
const VERSION = '3.18.2';
15+
const VERSION = '4.0.0';
1616

1717
// Don't forget to sync changes to this with the config file defaults
1818
const DEFAULT_BREADCRUMBS = [

src/HoneybadgerLogDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function __invoke(array $config): Logger
1414
return tap(new Logger($config['name'] ?? 'honeybadger'), function ($logger) {
1515
$logHandler = App::makeWith(LogHandler::class, [
1616
App::make(Reporter::class),
17-
$config['level'] ?? 'error'
17+
$config['level'] ?? 'error',
1818
]);
1919
$logger->pushHandler($logHandler);
2020
});

0 commit comments

Comments
 (0)