Skip to content

Commit ff8fddd

Browse files
Merge pull request #143 from ARCANEDEV/update-laravel_6.0_support
Adding Laravel 6.0 support
2 parents 185532f + 9a14b1e commit ff8fddd

8 files changed

Lines changed: 16 additions & 14 deletions

File tree

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ checks:
2222
tools:
2323
external_code_coverage:
2424
timeout: 1200
25-
runs: 4
25+
runs: 2
2626
php_code_sniffer:
2727
enabled: true
2828
config:

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ language: php
33
sudo: false
44

55
php:
6-
- 7.1.3
7-
- 7.1
86
- 7.2
97
- 7.3
108
- nightly

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Localization [![Packagist License][badge_license]](LICENSE.md) [![For Laravel 5][badge_laravel]][link-github-repo]
1+
# Localization [![Packagist License][badge_license]](LICENSE.md) [![For Laravel 5/6][badge_laravel]][link-github-repo]
22

33
[![Travis Status][badge_build]][link-travis]
44
[![Coverage Status][badge_coverage]][link-scrutinizer]
@@ -21,7 +21,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/Localization/
2121
### Features
2222

2323
* Easy setup & configuration.
24-
* Laravel `5.0` to `5.8` are supported.
24+
* Laravel `5.x` & `6.0` are supported.
2525
* SEO-Friendly (Search engine optimization).
2626
* New extended Router to manage your localized routes.
2727
* Translated Eloquent Models.
@@ -52,7 +52,7 @@ If you discover any security related issues, please email arcanedev.maroc@gmail.
5252
- [All Contributors][link-contributors]
5353

5454
[badge_license]: http://img.shields.io/packagist/l/arcanedev/localization.svg?style=flat-square
55-
[badge_laravel]: https://img.shields.io/badge/For-Laravel%205.x-orange.svg?style=flat-square
55+
[badge_laravel]: https://img.shields.io/badge/For-Laravel%205.x%20to%206.0-orange.svg?style=flat-square
5656
[badge_build]: http://img.shields.io/travis/ARCANEDEV/Localization.svg?style=flat-square
5757
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/Localization.svg?style=flat-square
5858
[badge_quality]: https://img.shields.io/scrutinizer/g/ARCANEDEV/Localization.svg?style=flat-square

_docs/0-Home.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Feel free to check out the [Releases](https://github.com/ARCANEDEV/Localization/
77
### Features
88

99
* Easy setup & configuration.
10-
* Laravel `5.0` to `5.8` are supported.
10+
* Laravel `5.x` & `6.0` are supported.
1111
* SEO-Friendly (Search engine optimization).
1212
* New extended Router to manage your localized routes.
1313
* Locales selector menu (Publishable & Customizable).

_docs/1-Installation-and-Setup.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ PHP extensions:
2929
| ![Localization v3.x][localization_3_x] | ![Laravel v5.6][laravel_5_6] |
3030
| ![Localization v4.x][localization_4_x] | ![Laravel v5.7][laravel_5_7] |
3131
| ![Localization v5.x][localization_5_x] | ![Laravel v5.8][laravel_5_8] |
32+
| ![Localization v6.x][localization_6_x] | ![Laravel v6.0][laravel_6_0] |
3233

3334
[laravel_5_0]: https://img.shields.io/badge/v5.0-supported-brightgreen.svg?style=flat-square "Laravel v5.0"
3435
[laravel_5_1]: https://img.shields.io/badge/v5.1-supported-brightgreen.svg?style=flat-square "Laravel v5.1"
@@ -39,13 +40,15 @@ PHP extensions:
3940
[laravel_5_6]: https://img.shields.io/badge/v5.6-supported-brightgreen.svg?style=flat-square "Laravel v5.6"
4041
[laravel_5_7]: https://img.shields.io/badge/v5.7-supported-brightgreen.svg?style=flat-square "Laravel v5.7"
4142
[laravel_5_8]: https://img.shields.io/badge/v5.8-supported-brightgreen.svg?style=flat-square "Laravel v5.8"
43+
[laravel_6_0]: https://img.shields.io/badge/v6.0-supported-brightgreen.svg?style=flat-square "Laravel v6.0"
4244

4345
[localization_0_x]: https://img.shields.io/badge/version-0.*-blue.svg?style=flat-square "Localization v0.*"
4446
[localization_1_x]: https://img.shields.io/badge/version-1.*-blue.svg?style=flat-square "Localization v1.*"
4547
[localization_2_x]: https://img.shields.io/badge/version-2.*-blue.svg?style=flat-square "Localization v2.*"
4648
[localization_3_x]: https://img.shields.io/badge/version-3.*-blue.svg?style=flat-square "Localization v3.*"
4749
[localization_4_x]: https://img.shields.io/badge/version-4.*-blue.svg?style=flat-square "Localization v4.*"
4850
[localization_5_x]: https://img.shields.io/badge/version-5.*-blue.svg?style=flat-square "Localization v5.*"
51+
[localization_6_x]: https://img.shields.io/badge/version-6.*-blue.svg?style=flat-square "Localization v6.*"
4952

5053
## Composer
5154

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
"type": "library",
1515
"license": "MIT",
1616
"require": {
17-
"php": ">=7.1.3",
17+
"php": ">=7.2.0",
1818
"ext-json": "*",
19-
"arcanedev/support": "~4.5.0"
19+
"arcanedev/support": "~5.0.0"
2020
},
2121
"require-dev": {
22-
"orchestra/testbench": "~3.8.0",
22+
"orchestra/testbench": "~4.0.0",
2323
"mockery/mockery": "~1.0",
24-
"phpunit/phpcov": "~5.0|~6.0",
25-
"phpunit/phpunit": "~7.0|~8.0"
24+
"phpunit/phpcov": "~6.0",
25+
"phpunit/phpunit": "~8.0"
2626
},
2727
"autoload": {
2828
"psr-4": {

src/Utilities/RouteTranslator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ private function translate($key, $locale = null)
237237
if (is_null($locale))
238238
$locale = $this->translator->getLocale();
239239

240-
$translation = $this->translator->trans($key, [], $locale);
240+
$translation = $this->translator->get($key, [], $locale);
241241

242242
// @codeCoverageIgnoreStart
243243
if ( ! is_string($translation))

tests/Entities/LocaleTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use Arcanedev\Localization\Entities\Locale;
44
use Arcanedev\Localization\Tests\TestCase;
5+
use Illuminate\Support\Arr;
56

67
/**
78
* Class LocaleTest
@@ -118,7 +119,7 @@ private function makeLocale($key)
118119
*/
119120
private function getLocale($key)
120121
{
121-
return array_get([
122+
return Arr::get([
122123
'ar' => [
123124
'name' => 'Arabic',
124125
'script' => 'Arab',

0 commit comments

Comments
 (0)