Skip to content

Commit 7729223

Browse files
committed
Laravel 6.0 support
1 parent 792e624 commit 7729223

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
],
1616
"require": {
1717
"php": ">=5.4.0",
18-
"illuminate/console": "5.*",
19-
"illuminate/support": "5.*",
18+
"illuminate/console": "5.*|6.*",
19+
"illuminate/support": "5.*|6.*",
2020
"symfony/finder": "*"
2121
},
2222
"autoload": {
@@ -26,7 +26,7 @@
2626
},
2727
"extra": {
2828
"component": "package",
29-
"frameworks": ["Laravel 5.7"],
29+
"frameworks": ["Laravel 5.7", "Laravel 5.8", "Laravel 6.0"],
3030
"laravel": {
3131
"providers": [
3232
"HighSolutions\\TranslationManager\\ManagerServiceProvider",

readme.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Add the following line to the `require` section of your Laravel webapp's `compos
1212

1313
```javascript
1414
"require": {
15-
"highsolutions/laravel-translation-manager": "0.4.x"
15+
"highsolutions/laravel-translation-manager": "^1.0"
1616
}
1717
```
1818

@@ -308,6 +308,9 @@ Do not use this inside of non-clickable elements (title attribute, alt attribute
308308
Changelog
309309
---------
310310

311+
1.0.0
312+
* Support Laravel 6.0
313+
311314
0.6.0
312315
* No STRICT_MODE needed anymore
313316

src/Manager.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Illuminate\Support\Facades\DB;
99
use Illuminate\Support\Facades\File;
1010
use Symfony\Component\Finder\Finder;
11+
use Illuminate\Support\Arr;
1112

1213
class Manager
1314
{
@@ -66,7 +67,7 @@ public function importTranslations($replace = false)
6667
if (!$translations || !is_array($translations))
6768
continue;
6869

69-
foreach(array_dot($translations) as $key => $value) {
70+
foreach(Array::dot($translations) as $key => $value) {
7071
if(is_array($value)) // process only string values
7172
continue;
7273

@@ -193,7 +194,7 @@ protected function makeTree($translations)
193194
{
194195
$array = array();
195196
foreach($translations as $translation) {
196-
array_set(
197+
Array::set(
197198
$array[$translation->locale][$translation->group],
198199
$translation->key,
199200
$translation->value

0 commit comments

Comments
 (0)