Skip to content

Commit 75a665b

Browse files
authored
Add support for Laravel 10 (#6)
1 parent ed7c706 commit 75a665b

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

.github/workflows/run-tests.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ jobs:
99
fail-fast: true
1010
matrix:
1111
php: [ 8.0, 8.1 ]
12-
laravel: [ 8.*, 9.* ]
12+
laravel: [ 8.*, 9.*, 10.* ]
1313
dependency-version: [ prefer-stable ]
14+
exclude:
15+
- laravel: 10.*
16+
php: 8.0
1417
include:
1518
- laravel: 5.6.*
1619
php: 7.1
@@ -40,6 +43,8 @@ jobs:
4043
testbench: 6.*
4144
- laravel: 9.*
4245
testbench: 7.*
46+
- laravel: 10.*
47+
testbench: 8.*
4348

4449
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
4550

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ I know you can get punished for this, but you are one of the hopes of those inno
1616
---
1717

1818
[![GitHub release](https://img.shields.io/github/release/codezero-be/laravel-localizer.svg?style=flat-square)](https://github.com/codezero-be/laravel-localizer/releases)
19-
[![Laravel](https://img.shields.io/badge/laravel-9-red?style=flat-square&logo=laravel&logoColor=white)](https://laravel.com)
19+
[![Laravel](https://img.shields.io/badge/laravel-10-red?style=flat-square&logo=laravel&logoColor=white)](https://laravel.com)
2020
[![License](https://img.shields.io/packagist/l/codezero/laravel-localizer.svg?style=flat-square)](LICENSE.md)
21-
[![Build Status](https://img.shields.io/github/workflow/status/codezero-be/laravel-localizer/Tests/master?style=flat-square&logo=github&logoColor=white&label=tests)](https://github.com/codezero-be/laravel-localizer/actions)
21+
[![Build Status](https://img.shields.io/github/actions/workflow/status/codezero-be/laravel-localizer/run-tests.yml?style=flat-square&logo=github&logoColor=white&label=tests)](https://github.com/codezero-be/laravel-localized-routes/actions)
2222
[![Code Coverage](https://img.shields.io/codacy/coverage/ad6fcea152b449d380a187a375d0f7d7/master?style=flat-square)](https://app.codacy.com/gh/codezero-be/laravel-localizer)
2323
[![Code Quality](https://img.shields.io/codacy/grade/ad6fcea152b449d380a187a375d0f7d7/master?style=flat-square)](https://app.codacy.com/gh/codezero-be/laravel-localizer)
2424
[![Total Downloads](https://img.shields.io/packagist/dt/codezero/laravel-localizer.svg?style=flat-square)](https://packagist.org/packages/codezero/laravel-localizer)

composer.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
"require": {
2424
"php": "^7.1|^8.0",
2525
"codezero/browser-locale": "^3.0",
26-
"illuminate/support": "^5.6|^6.0|^7.0|^8.0|^9.0"
26+
"illuminate/support": "^5.6|^6.0|^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",
30+
"orchestra/testbench": "^3.6|^4.0|^5.0|^6.0|^7.0|^8.0",
3131
"phpunit/phpunit": "^7.0|^8.0|^9.0"
3232
},
3333
"scripts": {
@@ -53,7 +53,10 @@
5353
"config": {
5454
"preferred-install": "dist",
5555
"sort-packages": true,
56-
"optimize-autoloader": true
56+
"optimize-autoloader": true,
57+
"allow-plugins": {
58+
"kylekatarnls/update-helper": true
59+
}
5760
},
5861
"minimum-stability": "dev",
5962
"prefer-stable": true

tests/Feature/SetLocaleTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ protected function setBrowserLocales($locales)
236236
*/
237237
protected function getWithCookie($url, $cookie)
238238
{
239-
return App::version() < 6
239+
return version_compare(App::version(), '6.0.0') === -1
240240
? $this->call('GET', $url, [], [$this->cookieName => Crypt::encrypt($cookie, false)])
241241
: $this->withCookie($this->cookieName, $cookie)->get($url);
242242
}

0 commit comments

Comments
 (0)