Skip to content

Commit

Permalink
Merge pull request #143 from ARCANEDEV/update-laravel_6.0_support
Browse files Browse the repository at this point in the history
Adding Laravel 6.0 support
  • Loading branch information
arcanedev-maroc authored Sep 4, 2019
2 parents 185532f + 9a14b1e commit ff8fddd
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ checks:
tools:
external_code_coverage:
timeout: 1200
runs: 4
runs: 2
php_code_sniffer:
enabled: true
config:
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ language: php
sudo: false

php:
- 7.1.3
- 7.1
- 7.2
- 7.3
- nightly
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Localization [![Packagist License][badge_license]](LICENSE.md) [![For Laravel 5][badge_laravel]][link-github-repo]
# Localization [![Packagist License][badge_license]](LICENSE.md) [![For Laravel 5/6][badge_laravel]][link-github-repo]

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

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

[badge_license]: http://img.shields.io/packagist/l/arcanedev/localization.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/For-Laravel%205.x-orange.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/For-Laravel%205.x%20to%206.0-orange.svg?style=flat-square
[badge_build]: http://img.shields.io/travis/ARCANEDEV/Localization.svg?style=flat-square
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/Localization.svg?style=flat-square
[badge_quality]: https://img.shields.io/scrutinizer/g/ARCANEDEV/Localization.svg?style=flat-square
Expand Down
2 changes: 1 addition & 1 deletion _docs/0-Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feel free to check out the [Releases](https://github.com/ARCANEDEV/Localization/
### Features

* Easy setup & configuration.
* Laravel `5.0` to `5.8` are supported.
* Laravel `5.x` & `6.0` are supported.
* SEO-Friendly (Search engine optimization).
* New extended Router to manage your localized routes.
* Locales selector menu (Publishable & Customizable).
Expand Down
3 changes: 3 additions & 0 deletions _docs/1-Installation-and-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ PHP extensions:
| ![Localization v3.x][localization_3_x] | ![Laravel v5.6][laravel_5_6] |
| ![Localization v4.x][localization_4_x] | ![Laravel v5.7][laravel_5_7] |
| ![Localization v5.x][localization_5_x] | ![Laravel v5.8][laravel_5_8] |
| ![Localization v6.x][localization_6_x] | ![Laravel v6.0][laravel_6_0] |

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

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

## Composer

Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"type": "library",
"license": "MIT",
"require": {
"php": ">=7.1.3",
"php": ">=7.2.0",
"ext-json": "*",
"arcanedev/support": "~4.5.0"
"arcanedev/support": "~5.0.0"
},
"require-dev": {
"orchestra/testbench": "~3.8.0",
"orchestra/testbench": "~4.0.0",
"mockery/mockery": "~1.0",
"phpunit/phpcov": "~5.0|~6.0",
"phpunit/phpunit": "~7.0|~8.0"
"phpunit/phpcov": "~6.0",
"phpunit/phpunit": "~8.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/RouteTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private function translate($key, $locale = null)
if (is_null($locale))
$locale = $this->translator->getLocale();

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

// @codeCoverageIgnoreStart
if ( ! is_string($translation))
Expand Down
3 changes: 2 additions & 1 deletion tests/Entities/LocaleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use Arcanedev\Localization\Entities\Locale;
use Arcanedev\Localization\Tests\TestCase;
use Illuminate\Support\Arr;

/**
* Class LocaleTest
Expand Down Expand Up @@ -118,7 +119,7 @@ private function makeLocale($key)
*/
private function getLocale($key)
{
return array_get([
return Arr::get([
'ar' => [
'name' => 'Arabic',
'script' => 'Arab',
Expand Down

0 comments on commit ff8fddd

Please sign in to comment.