Skip to content

Commit 36b0f70

Browse files
Merge pull request #5 from veneliniliev/laravel-8-revert
Laravel 8 support in v2 / PHP 8.1 explode warning fix
2 parents fff66e2 + cb7f1c8 commit 36b0f70

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
strategy:
77
matrix:
88
php-version: ['8.0', '8.1']
9-
laravel-version: ['^9']
9+
laravel-version: ['^8', '^9']
1010
steps:
1111
- name: Setup PHP
1212
uses: shivammathur/setup-php@v2

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
],
2020
"require": {
2121
"php": "^8.0.2",
22-
"illuminate/contracts": "^9.0",
23-
"illuminate/http": "^9.0",
24-
"illuminate/support": "^9.0"
22+
"illuminate/contracts": "^8.0|^9.0",
23+
"illuminate/http": "^8.0|^9.0",
24+
"illuminate/support": "^8.0|^9.0"
2525
},
2626
"require-dev": {
27-
"orchestra/testbench": "^7.0",
27+
"orchestra/testbench": "^6.0|^7.0",
2828
"phpunit/phpunit": "^9.0"
2929
},
3030
"autoload": {

src/Middleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function handle($request, Closure $next)
2626

2727
private function parseHttpLocale(Request $request): string
2828
{
29-
$list = explode(',', $request->server('HTTP_ACCEPT_LANGUAGE'));
29+
$list = explode(',', $request->server('HTTP_ACCEPT_LANGUAGE', ''));
3030

3131
$locales = Collection::make($list)
3232
->map(function ($locale) {

0 commit comments

Comments
 (0)