Skip to content

Commit ded27df

Browse files
Adding Laravel 8 support
1 parent b9a4a6d commit ded27df

37 files changed

+95
-111
lines changed

.github/workflows/run-tests.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ jobs:
99
strategy:
1010
fail-fast: true
1111
matrix:
12-
php: [7.2, 7.3, 7.4]
12+
php: [7.3, 7.4]
1313
dependency-version: [prefer-lowest, prefer-stable]
1414

1515
name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v1
19+
uses: actions/checkout@v2
2020

2121
- name: Cache dependencies
22-
uses: actions/cache@v1
22+
uses: actions/cache@v2
2323
with:
2424
path: ~/.composer/cache/files
25-
key: dependencies-laravel-6.x-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
25+
key: dependencies-laravel-8-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
2626

2727
- name: Setup PHP
2828
uses: shivammathur/setup-php@v2
2929
with:
3030
php-version: ${{ matrix.php }}
3131
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
32-
coverage: xdebug
32+
coverage: pcov
3333

3434
- name: Install dependencies
3535
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest

.scrutinizer.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ checks:
2222
tools:
2323
external_code_coverage:
2424
timeout: 600
25-
runs: 6
25+
runs: 4
2626
php_code_sniffer:
2727
enabled: true
2828
config:

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
*By [ARCANEDEV©](http://www.arcanedev.net/)*
1414

15-
Translations manager and checker for Laravel based on [caouecs/Laravel-lang](https://github.com/caouecs/Laravel-lang) translations.
15+
Translations manager and checker for Laravel based on [laravel-Lang/lang](https://github.com/Laravel-Lang/lang) translations.
1616

1717
Feel free to check out the [releases](https://github.com/ARCANEDEV/LaravelLang/releases), [license](LICENSE.md), and [contribution guidelines](CONTRIBUTING.md).
1818

@@ -21,7 +21,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/LaravelLang/r
2121
* Easy setup & configuration.
2222
* Missing translations Checker.
2323
* Translations Publisher.
24-
* Laravel `5.x` to `7.x` are supported.
24+
* Laravel `5.x` to `8.x` are supported.
2525
* Well documented & IDE Friendly.
2626
* Well tested with maximum code quality.
2727
* Made with :heart: & :coffee:.
@@ -50,7 +50,7 @@ If you discover any security related issues, please email arcanedev.maroc@gmail.
5050
- [All Contributors][link-contributors]
5151

5252
[badge_license]: https://img.shields.io/packagist/l/arcanedev/laravel-lang.svg?style=flat-square
53-
[badge_laravel]: https://img.shields.io/badge/Laravel-5.x%20to%207.x-orange.svg?style=flat-square
53+
[badge_laravel]: https://img.shields.io/badge/Laravel-5.x%20to%208.x-orange.svg?style=flat-square
5454
[badge_build]: https://img.shields.io/github/workflow/status/ARCANEDEV/LaravelLang/run-tests?style=flat-square
5555
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/LaravelLang.svg?style=flat-square
5656
[badge_quality]: https://img.shields.io/scrutinizer/g/ARCANEDEV/LaravelLang.svg?style=flat-square

_docs/0-Home.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Translations manager and checker for Laravel based on [caouecs/Laravel-lang](htt
77
* Easy setup & configuration.
88
* Missing translations Checker.
99
* Translations Publisher.
10-
* Laravel `5.x` to `7.x` are supported.
10+
* Laravel `5.x` to `8.x` are supported.
1111
* Well documented & IDE Friendly.
1212
* Well tested with maximum code quality.
1313
* Made with :heart: & :coffee:.

_docs/1-Installation-and-Setup.md

+29-23
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,35 @@
88

99
## Version Compatibility
1010

11-
| LaravelLang | Laravel |
12-
|:---------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
13-
| ![LaravelLang v8.x][laravel_lang_8_x] | ![Laravel v7.x][laravel_7_x] |
14-
| ![LaravelLang v7.x][laravel_lang_7_x] | ![Laravel v6.x][laravel_6_x] |
15-
| ![LaravelLang v6.x][laravel_lang_6_x] | ![Laravel v5.8][laravel_5_8] |
16-
| ![LaravelLang v5.x][laravel_lang_5_x] | ![Laravel v5.7][laravel_5_7] |
17-
| ![LaravelLang v4.x][laravel_lang_4_x] | ![Laravel v5.6][laravel_5_6] |
18-
| ![LaravelLang v3.x][laravel_lang_3_x] | ![Laravel v5.5][laravel_5_5] |
19-
| ![LaravelLang v2.x][laravel_lang_2_x] | ![Laravel v5.4][laravel_5_4] |
20-
| ![LaravelLang v1.x][laravel_lang_1_x] | ![Laravel v5.0][laravel_5_0] ![Laravel v5.1][laravel_5_1] ![Laravel v5.2][laravel_5_2] ![Laravel v5.3][laravel_5_3] |
21-
22-
[laravel_7_x]: https://img.shields.io/badge/v7.x-supported-brightgreen.svg?style=flat-square "Laravel v7.x"
23-
[laravel_6_x]: https://img.shields.io/badge/v6.x-supported-brightgreen.svg?style=flat-square "Laravel v6.x"
24-
[laravel_5_8]: https://img.shields.io/badge/v5.8-supported-brightgreen.svg?style=flat-square "Laravel v5.8"
25-
[laravel_5_7]: https://img.shields.io/badge/v5.7-supported-brightgreen.svg?style=flat-square "Laravel v5.7"
26-
[laravel_5_6]: https://img.shields.io/badge/v5.6-supported-brightgreen.svg?style=flat-square "Laravel v5.6"
27-
[laravel_5_5]: https://img.shields.io/badge/v5.5-supported-brightgreen.svg?style=flat-square "Laravel v5.5"
28-
[laravel_5_4]: https://img.shields.io/badge/v5.4-supported-brightgreen.svg?style=flat-square "Laravel v5.4"
29-
[laravel_5_3]: https://img.shields.io/badge/v5.3-supported-brightgreen.svg?style=flat-square "Laravel v5.3"
30-
[laravel_5_2]: https://img.shields.io/badge/v5.2-supported-brightgreen.svg?style=flat-square "Laravel v5.2"
31-
[laravel_5_1]: https://img.shields.io/badge/v5.1-supported-brightgreen.svg?style=flat-square "Laravel v5.1"
32-
[laravel_5_0]: https://img.shields.io/badge/v5.0-supported-brightgreen.svg?style=flat-square "Laravel v5.0"
33-
11+
| Laravel | LaravelLang |
12+
|:-----------------------------|:--------------------------------------|
13+
| ![Laravel v8.x][laravel_8_x] | ![LaravelLang v9.x][laravel_lang_9_x] |
14+
| ![Laravel v7.x][laravel_7_x] | ![LaravelLang v8.x][laravel_lang_8_x] |
15+
| ![Laravel v6.x][laravel_6_x] | ![LaravelLang v7.x][laravel_lang_7_x] |
16+
| ![Laravel v5.8][laravel_5_8] | ![LaravelLang v6.x][laravel_lang_6_x] |
17+
| ![Laravel v5.7][laravel_5_7] | ![LaravelLang v5.x][laravel_lang_5_x] |
18+
| ![Laravel v5.6][laravel_5_6] | ![LaravelLang v4.x][laravel_lang_4_x] |
19+
| ![Laravel v5.5][laravel_5_5] | ![LaravelLang v3.x][laravel_lang_3_x] |
20+
| ![Laravel v5.4][laravel_5_4] | ![LaravelLang v2.x][laravel_lang_2_x] |
21+
| ![Laravel v5.3][laravel_5_3] | ![LaravelLang v1.x][laravel_lang_1_x] |
22+
| ![Laravel v5.2][laravel_5_2] | ![LaravelLang v1.x][laravel_lang_1_x] |
23+
| ![Laravel v5.1][laravel_5_1] | ![LaravelLang v1.x][laravel_lang_1_x] |
24+
| ![Laravel v5.0][laravel_5_0] | ![LaravelLang v1.x][laravel_lang_1_x] |
25+
26+
[laravel_8_x]: https://img.shields.io/badge/version-8.x-blue.svg?style=flat-square "Laravel v8.x"
27+
[laravel_7_x]: https://img.shields.io/badge/version-7.x-blue.svg?style=flat-square "Laravel v7.x"
28+
[laravel_6_x]: https://img.shields.io/badge/version-6.x-blue.svg?style=flat-square "Laravel v6.x"
29+
[laravel_5_8]: https://img.shields.io/badge/version-5.8-blue.svg?style=flat-square "Laravel v5.8"
30+
[laravel_5_7]: https://img.shields.io/badge/version-5.7-blue.svg?style=flat-square "Laravel v5.7"
31+
[laravel_5_6]: https://img.shields.io/badge/version-5.6-blue.svg?style=flat-square "Laravel v5.6"
32+
[laravel_5_5]: https://img.shields.io/badge/version-5.5-blue.svg?style=flat-square "Laravel v5.5"
33+
[laravel_5_4]: https://img.shields.io/badge/version-5.4-blue.svg?style=flat-square "Laravel v5.4"
34+
[laravel_5_3]: https://img.shields.io/badge/version-5.3-blue.svg?style=flat-square "Laravel v5.3"
35+
[laravel_5_2]: https://img.shields.io/badge/version-5.2-blue.svg?style=flat-square "Laravel v5.2"
36+
[laravel_5_1]: https://img.shields.io/badge/version-5.1-blue.svg?style=flat-square "Laravel v5.1"
37+
[laravel_5_0]: https://img.shields.io/badge/version-5.0-blue.svg?style=flat-square "Laravel v5.0"
38+
39+
[laravel_lang_9_x]: https://img.shields.io/badge/version-9.x-blue.svg?style=flat-square "LaravelLang v9.x"
3440
[laravel_lang_8_x]: https://img.shields.io/badge/version-8.x-blue.svg?style=flat-square "LaravelLang v8.x"
3541
[laravel_lang_7_x]: https://img.shields.io/badge/version-7.x-blue.svg?style=flat-square "LaravelLang v7.x"
3642
[laravel_lang_6_x]: https://img.shields.io/badge/version-6.x-blue.svg?style=flat-square "LaravelLang v6.x"

_docs/2-Configuration.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ return [
1919
| -----------------------------------------------------------------
2020
*/
2121

22-
/** @link https://github.com/caouecs/Laravel-lang */
23-
'vendor' => base_path('vendor/caouecs/laravel-lang/src'),
22+
/** @link https://github.com/Laravel-Lang/lang */
23+
'vendor' => [
24+
'php' => base_path('vendor/laravel-lang/lang/src'),
25+
'json' => base_path('vendor/laravel-lang/lang/json'),
26+
],
2427

2528
/* -----------------------------------------------------------------
2629
| Supported locales

composer.json

+18-7
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@
1616
"type": "library",
1717
"license": "MIT",
1818
"require": {
19-
"php": "^7.2.5",
20-
"arcanedev/support": "^7.1.2",
21-
"caouecs/laravel-lang": "^7.0.1"
19+
"php": "^7.3",
20+
"arcanedev/support": "^8.0",
21+
"laravel-lang/lang": "^7.0.1"
2222
},
2323
"require-dev": {
24-
"orchestra/testbench": "^5.0",
25-
"phpunit/phpunit": "^8.5",
26-
"mockery/mockery": "^1.3.1"
24+
"orchestra/testbench": "^6.0",
25+
"phpunit/phpunit": "^9.3"
2726
},
2827
"autoload": {
2928
"psr-4": {
@@ -35,13 +34,25 @@
3534
"Arcanedev\\LaravelLang\\Tests\\": "tests/"
3635
}
3736
},
37+
"scripts": {
38+
"test": "phpunit",
39+
"coverage": "phpunit --coverage-html build/coverage/html"
40+
},
3841
"extra": {
42+
"branch-alias": {
43+
"dev-develop": "9.x-dev"
44+
},
3945
"laravel": {
4046
"providers": [
4147
"Arcanedev\\LaravelLang\\LaravelLangServiceProvider",
4248
"Arcanedev\\LaravelLang\\Providers\\DeferredServicesProvider",
4349
"Arcanedev\\LaravelLang\\Providers\\TranslationServiceProvider"
4450
]
4551
}
46-
}
52+
},
53+
"config": {
54+
"sort-packages": true
55+
},
56+
"minimum-stability": "dev",
57+
"prefer-stable": true
4758
}

config/laravel-lang.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
| -----------------------------------------------------------------
88
*/
99

10-
/** @link https://github.com/caouecs/Laravel-lang */
10+
/** @link https://github.com/Laravel-Lang/lang */
1111
'vendor' => [
12-
'php' => base_path('vendor/caouecs/laravel-lang/src'),
13-
'json' => base_path('vendor/caouecs/laravel-lang/json'),
12+
'php' => base_path('vendor/laravel-lang/lang/src'),
13+
'json' => base_path('vendor/laravel-lang/lang/json'),
1414
],
1515

1616
/* -----------------------------------------------------------------

phpunit.xml.dist

+15-20
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
4+
bootstrap="./vendor/autoload.php"
55
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false"
11-
>
6+
>
127
<testsuites>
138
<testsuite name="Package Test Suite">
14-
<directory suffix=".php">./tests/</directory>
9+
<directory suffix=".php">./tests</directory>
1510
</testsuite>
1611
</testsuites>
17-
<filter>
18-
<whitelist>
19-
<directory suffix=".php">./src/</directory>
20-
</whitelist>
21-
</filter>
22-
<logging>
23-
<log type="coverage-clover" target="build/logs/clover.xml"/>
24-
<log type="coverage-text" target="build/logs/coverage.txt"/>
25-
<log type="coverage-html" target="build/logs/coverage"/>
26-
</logging>
12+
<coverage processUncoveredFiles="true">
13+
<include>
14+
<directory suffix=".php">./src</directory>
15+
</include>
16+
<report>
17+
<clover outputFile="build/coverage/clover.xml"/>
18+
<html outputDirectory="build/coverage/html" />
19+
<text outputFile="build/coverage/coverage.txt" showOnlySummary="true"/>
20+
</report>
21+
</coverage>
2722
</phpunit>

src/Commands/AbstractCommand.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
use Arcanedev\Support\Console\Command as BaseCommand;
99

1010
/**
11-
* Class Command
11+
* Class AbstractCommand
1212
*
13-
* @package Arcanedev\LaravelLang\Bases
1413
* @author ARCANEDEV <[email protected]>
1514
*/
1615
abstract class AbstractCommand extends BaseCommand

src/Commands/CheckCommand.php

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/**
1010
* Class CheckCommand
1111
*
12-
* @package Arcanedev\LaravelLang\Commands
1312
* @author ARCANEDEV <[email protected]>
1413
*/
1514
class CheckCommand extends AbstractCommand

src/Commands/PublishCommand.php

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/**
1010
* Class PublishCommand
1111
*
12-
* @package Arcanedev\LaravelLang\Commands
1312
* @author ARCANEDEV <[email protected]>
1413
*/
1514
class PublishCommand extends AbstractCommand

src/Contracts/Entities/Locale.php

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
/**
88
* Interface Locale
99
*
10-
* @package Arcanedev\LaravelLang\Contracts\Entities
1110
* @author ARCANEDEV <[email protected]>
1211
*/
1312
interface Locale

src/Contracts/TransChecker.php

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
/**
88
* Interface TransChecker
99
*
10-
* @package Arcanedev\LaravelLang\Contracts
1110
* @author ARCANEDEV <[email protected]>
1211
*/
1312
interface TransChecker

src/Contracts/TransManager.php

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/**
1010
* Interface TransManager
1111
*
12-
* @package Arcanedev\LaravelLang\Contracts
1312
* @author ARCANEDEV <[email protected]>
1413
*/
1514
interface TransManager

src/Contracts/TransPublisher.php

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
/**
88
* Interface TransPublisher
99
*
10-
* @package Arcanedev\LaravelLang\Contracts
1110
* @author ARCANEDEV <[email protected]>
1211
*/
1312
interface TransPublisher

src/Entities/Locale.php

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
/**
1111
* Class Locale
1212
*
13-
* @package Arcanedev\LaravelLang\Entities
1413
* @author ARCANEDEV <[email protected]>
1514
*/
1615
class Locale implements LocaleContract

src/Entities/LocaleCollection.php

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
/**
1111
* Class LocaleCollection
1212
*
13-
* @package Arcanedev\LaravelLang\Entities
1413
* @author ARCANEDEV <[email protected]>
1514
*/
1615
class LocaleCollection extends Collection

src/Exceptions/LangPublishException.php

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
/**
88
* Class LangPublishException
99
*
10-
* @package Arcanedev\LaravelLang\Exceptions
1110
* @author ARCANEDEV <[email protected]>
1211
*/
1312
class LangPublishException extends LaravelLangException {}

src/Exceptions/LaravelLangException.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44

55
namespace Arcanedev\LaravelLang\Exceptions;
66

7+
use Exception;
8+
79
/**
810
* Class LaravelLangException
911
*
10-
* @package Arcanedev\LaravelLang\Exceptions
1112
* @author ARCANEDEV <[email protected]>
1213
*/
13-
class LaravelLangException extends \Exception {}
14+
class LaravelLangException extends Exception {}

src/FileLoader.php

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
/**
1111
* Class FileLoader
1212
*
13-
* @package Arcanedev\LaravelLang
1413
* @author ARCANEDEV <[email protected]>
1514
*/
1615
class FileLoader extends IlluminateFileLoader

src/LaravelLang.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
/**
88
* Class LaravelLang
99
*
10-
* @package Arcanedev\LaravelLang
1110
* @author ARCANEDEV <[email protected]>
1211
*/
1312
class LaravelLang
@@ -17,5 +16,5 @@ class LaravelLang
1716
| -----------------------------------------------------------------
1817
*/
1918

20-
const VERSION = '8.2.0';
19+
const VERSION = '9.0.0';
2120
}

src/LaravelLangServiceProvider.php

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/**
1010
* Class LaravelLangServiceProvider
1111
*
12-
* @package Arcanedev\LaravelLang
1312
* @author ARCANEDEV <[email protected]>
1413
*/
1514
class LaravelLangServiceProvider extends ServiceProvider

0 commit comments

Comments
 (0)