Skip to content

Commit b1c53c3

Browse files
authored
Drop support for Laravel 5.6, 5.7, 5.8 and 6.x (codezero-be#16)
1 parent 5ec4770 commit b1c53c3

File tree

5 files changed

+18
-38
lines changed

5 files changed

+18
-38
lines changed

Diff for: .github/workflows/run-tests.yml

-15
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,6 @@ jobs:
1515
- laravel: 10.*
1616
php: 8.0
1717
include:
18-
- laravel: 5.6.*
19-
php: 7.1
20-
testbench: 3.6.*
21-
- laravel: 5.7.*
22-
php: 7.2
23-
testbench: 3.7.*
24-
- laravel: 5.8.*
25-
php: 7.2
26-
testbench: 3.8.*
27-
- laravel: 6.*
28-
php: 7.2
29-
testbench: 4.*
30-
- laravel: 6.*
31-
php: 8.0
32-
testbench: 4.*
3318
- laravel: 7.*
3419
php: 7.2
3520
testbench: 5.*

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Automatically detect and set an app locale that matches your visitor's preferenc
1919

2020
## ✅ Requirements
2121

22-
- PHP >= 7.1
23-
- Laravel >= 5.6
22+
- PHP >= 7.2.5
23+
- Laravel >= 7.0
2424

2525
## ⬆️ Upgrade
2626

@@ -54,7 +54,7 @@ protected $middlewareGroups = [
5454
];
5555
```
5656

57-
In Laravel 6.x and higher, you also need to add the middleware to the `$middlewarePriority` array in `app/Http/Kernel.php`
57+
You also need to add the middleware to the `$middlewarePriority` array in `app/Http/Kernel.php`
5858
to trigger it in the correct order:
5959

6060
```php

Diff for: UPGRADE.md

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
## Upgrading To 2.0 From 1.x
44

5+
### Minimum Requirements Updated
6+
7+
We dropped support for Laravel 5.6, 5.7, 5.8 and 6.x.
8+
9+
- The minimum PHP version required is now 7.2.5
10+
- The minimum Laravel version required is now 7.0
11+
12+
### Names of Config Options Updated
13+
514
Every config option that contained a `-` (dash) in its name has been updated and the dash is replaced by an `_` (underscore).
615
This is done mainly for consistency across other packages.
716

Diff for: composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
}
2222
],
2323
"require": {
24-
"php": "^7.1|^8.0",
24+
"php": "^7.2.5|^8.0",
2525
"codezero/browser-locale": "^3.0",
26-
"illuminate/support": "^5.6|^6.0|^7.0|^8.0|^9.0|^10.0"
26+
"illuminate/support": "^7.0|^8.0|^9.0|^10.0"
2727
},
2828
"require-dev": {
2929
"mockery/mockery": "^1.3.3",
30-
"orchestra/testbench": "^3.6|^4.0|^5.0|^6.0|^7.0|^8.0",
31-
"phpunit/phpunit": "^7.0|^8.0|^9.0"
30+
"orchestra/testbench": "^5.0|^6.0|^7.0|^8.0",
31+
"phpunit/phpunit": "^8.0|^9.0"
3232
},
3333
"scripts": {
3434
"test": "phpunit"

Diff for: tests/Feature/SetLocaleTest.php

+2-16
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ public function it_looks_for_a_locale_in_a_cookie()
293293
return App::getLocale();
294294
})->middleware(['web', SetLocale::class]);
295295

296-
$response = $this->getWithCookie('some/route', $cookie);
296+
$response = $this->withCookie($this->cookieName, $cookie)
297+
->get('some/route');
297298

298299
$response->assertSessionHas($this->sessionKey, 'nl');
299300
$response->assertCookie($this->cookieName, 'nl');
@@ -451,19 +452,4 @@ protected function setBrowserLocales($locales)
451452

452453
return $this;
453454
}
454-
455-
/**
456-
* Perform a GET request when the given cookie was previously set.
457-
*
458-
* @param string $url
459-
* @param string $cookie
460-
*
461-
* @return \Illuminate\Testing\TestResponse
462-
*/
463-
protected function getWithCookie($url, $cookie)
464-
{
465-
return version_compare(App::version(), '6.0.0') === -1
466-
? $this->call('GET', $url, [], [$this->cookieName => Crypt::encrypt($cookie, false)])
467-
: $this->withCookie($this->cookieName, $cookie)->get($url);
468-
}
469455
}

0 commit comments

Comments
 (0)