Skip to content

Commit

Permalink
Merge pull request #40 from ARCANEDEV/develop
Browse files Browse the repository at this point in the history
Adding Laravel 8 support
  • Loading branch information
arcanedev-maroc authored Sep 15, 2020
2 parents b9a4a6d + ded27df commit f14b09e
Show file tree
Hide file tree
Showing 37 changed files with 95 additions and 111 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.2, 7.3, 7.4]
php: [7.3, 7.4]
dependency-version: [prefer-lowest, prefer-stable]

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

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v2

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

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

- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
Expand Down
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: 600
runs: 6
runs: 4
php_code_sniffer:
enabled: true
config:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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

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

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

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

[badge_license]: https://img.shields.io/packagist/l/arcanedev/laravel-lang.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-5.x%20to%207.x-orange.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-5.x%20to%208.x-orange.svg?style=flat-square
[badge_build]: https://img.shields.io/github/workflow/status/ARCANEDEV/LaravelLang/run-tests?style=flat-square
[badge_coverage]: https://img.shields.io/scrutinizer/coverage/g/ARCANEDEV/LaravelLang.svg?style=flat-square
[badge_quality]: https://img.shields.io/scrutinizer/g/ARCANEDEV/LaravelLang.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 @@ Translations manager and checker for Laravel based on [caouecs/Laravel-lang](htt
* Easy setup & configuration.
* Missing translations Checker.
* Translations Publisher.
* Laravel `5.x` to `7.x` are supported.
* Laravel `5.x` to `8.x` are supported.
* Well documented & IDE Friendly.
* Well tested with maximum code quality.
* Made with :heart: & :coffee:.
Expand Down
52 changes: 29 additions & 23 deletions _docs/1-Installation-and-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,35 @@

## Version Compatibility

| LaravelLang | Laravel |
|:---------------------------------------|:-------------------------------------------------------------------------------------------------------------------|
| ![LaravelLang v8.x][laravel_lang_8_x] | ![Laravel v7.x][laravel_7_x] |
| ![LaravelLang v7.x][laravel_lang_7_x] | ![Laravel v6.x][laravel_6_x] |
| ![LaravelLang v6.x][laravel_lang_6_x] | ![Laravel v5.8][laravel_5_8] |
| ![LaravelLang v5.x][laravel_lang_5_x] | ![Laravel v5.7][laravel_5_7] |
| ![LaravelLang v4.x][laravel_lang_4_x] | ![Laravel v5.6][laravel_5_6] |
| ![LaravelLang v3.x][laravel_lang_3_x] | ![Laravel v5.5][laravel_5_5] |
| ![LaravelLang v2.x][laravel_lang_2_x] | ![Laravel v5.4][laravel_5_4] |
| ![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] |

[laravel_7_x]: https://img.shields.io/badge/v7.x-supported-brightgreen.svg?style=flat-square "Laravel v7.x"
[laravel_6_x]: https://img.shields.io/badge/v6.x-supported-brightgreen.svg?style=flat-square "Laravel v6.x"
[laravel_5_8]: https://img.shields.io/badge/v5.8-supported-brightgreen.svg?style=flat-square "Laravel v5.8"
[laravel_5_7]: https://img.shields.io/badge/v5.7-supported-brightgreen.svg?style=flat-square "Laravel v5.7"
[laravel_5_6]: https://img.shields.io/badge/v5.6-supported-brightgreen.svg?style=flat-square "Laravel v5.6"
[laravel_5_5]: https://img.shields.io/badge/v5.5-supported-brightgreen.svg?style=flat-square "Laravel v5.5"
[laravel_5_4]: https://img.shields.io/badge/v5.4-supported-brightgreen.svg?style=flat-square "Laravel v5.4"
[laravel_5_3]: https://img.shields.io/badge/v5.3-supported-brightgreen.svg?style=flat-square "Laravel v5.3"
[laravel_5_2]: https://img.shields.io/badge/v5.2-supported-brightgreen.svg?style=flat-square "Laravel v5.2"
[laravel_5_1]: https://img.shields.io/badge/v5.1-supported-brightgreen.svg?style=flat-square "Laravel v5.1"
[laravel_5_0]: https://img.shields.io/badge/v5.0-supported-brightgreen.svg?style=flat-square "Laravel v5.0"

| Laravel | LaravelLang |
|:-----------------------------|:--------------------------------------|
| ![Laravel v8.x][laravel_8_x] | ![LaravelLang v9.x][laravel_lang_9_x] |
| ![Laravel v7.x][laravel_7_x] | ![LaravelLang v8.x][laravel_lang_8_x] |
| ![Laravel v6.x][laravel_6_x] | ![LaravelLang v7.x][laravel_lang_7_x] |
| ![Laravel v5.8][laravel_5_8] | ![LaravelLang v6.x][laravel_lang_6_x] |
| ![Laravel v5.7][laravel_5_7] | ![LaravelLang v5.x][laravel_lang_5_x] |
| ![Laravel v5.6][laravel_5_6] | ![LaravelLang v4.x][laravel_lang_4_x] |
| ![Laravel v5.5][laravel_5_5] | ![LaravelLang v3.x][laravel_lang_3_x] |
| ![Laravel v5.4][laravel_5_4] | ![LaravelLang v2.x][laravel_lang_2_x] |
| ![Laravel v5.3][laravel_5_3] | ![LaravelLang v1.x][laravel_lang_1_x] |
| ![Laravel v5.2][laravel_5_2] | ![LaravelLang v1.x][laravel_lang_1_x] |
| ![Laravel v5.1][laravel_5_1] | ![LaravelLang v1.x][laravel_lang_1_x] |
| ![Laravel v5.0][laravel_5_0] | ![LaravelLang v1.x][laravel_lang_1_x] |

[laravel_8_x]: https://img.shields.io/badge/version-8.x-blue.svg?style=flat-square "Laravel v8.x"
[laravel_7_x]: https://img.shields.io/badge/version-7.x-blue.svg?style=flat-square "Laravel v7.x"
[laravel_6_x]: https://img.shields.io/badge/version-6.x-blue.svg?style=flat-square "Laravel v6.x"
[laravel_5_8]: https://img.shields.io/badge/version-5.8-blue.svg?style=flat-square "Laravel v5.8"
[laravel_5_7]: https://img.shields.io/badge/version-5.7-blue.svg?style=flat-square "Laravel v5.7"
[laravel_5_6]: https://img.shields.io/badge/version-5.6-blue.svg?style=flat-square "Laravel v5.6"
[laravel_5_5]: https://img.shields.io/badge/version-5.5-blue.svg?style=flat-square "Laravel v5.5"
[laravel_5_4]: https://img.shields.io/badge/version-5.4-blue.svg?style=flat-square "Laravel v5.4"
[laravel_5_3]: https://img.shields.io/badge/version-5.3-blue.svg?style=flat-square "Laravel v5.3"
[laravel_5_2]: https://img.shields.io/badge/version-5.2-blue.svg?style=flat-square "Laravel v5.2"
[laravel_5_1]: https://img.shields.io/badge/version-5.1-blue.svg?style=flat-square "Laravel v5.1"
[laravel_5_0]: https://img.shields.io/badge/version-5.0-blue.svg?style=flat-square "Laravel v5.0"

[laravel_lang_9_x]: https://img.shields.io/badge/version-9.x-blue.svg?style=flat-square "LaravelLang v9.x"
[laravel_lang_8_x]: https://img.shields.io/badge/version-8.x-blue.svg?style=flat-square "LaravelLang v8.x"
[laravel_lang_7_x]: https://img.shields.io/badge/version-7.x-blue.svg?style=flat-square "LaravelLang v7.x"
[laravel_lang_6_x]: https://img.shields.io/badge/version-6.x-blue.svg?style=flat-square "LaravelLang v6.x"
Expand Down
7 changes: 5 additions & 2 deletions _docs/2-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ return [
| -----------------------------------------------------------------
*/

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

/* -----------------------------------------------------------------
| Supported locales
Expand Down
25 changes: 18 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
"type": "library",
"license": "MIT",
"require": {
"php": "^7.2.5",
"arcanedev/support": "^7.1.2",
"caouecs/laravel-lang": "^7.0.1"
"php": "^7.3",
"arcanedev/support": "^8.0",
"laravel-lang/lang": "^7.0.1"
},
"require-dev": {
"orchestra/testbench": "^5.0",
"phpunit/phpunit": "^8.5",
"mockery/mockery": "^1.3.1"
"orchestra/testbench": "^6.0",
"phpunit/phpunit": "^9.3"
},
"autoload": {
"psr-4": {
Expand All @@ -35,13 +34,25 @@
"Arcanedev\\LaravelLang\\Tests\\": "tests/"
}
},
"scripts": {
"test": "phpunit",
"coverage": "phpunit --coverage-html build/coverage/html"
},
"extra": {
"branch-alias": {
"dev-develop": "9.x-dev"
},
"laravel": {
"providers": [
"Arcanedev\\LaravelLang\\LaravelLangServiceProvider",
"Arcanedev\\LaravelLang\\Providers\\DeferredServicesProvider",
"Arcanedev\\LaravelLang\\Providers\\TranslationServiceProvider"
]
}
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
6 changes: 3 additions & 3 deletions config/laravel-lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
| -----------------------------------------------------------------
*/

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

/* -----------------------------------------------------------------
Expand Down
35 changes: 15 additions & 20 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="./vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
<directory suffix=".php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="coverage-text" target="build/logs/coverage.txt"/>
<log type="coverage-html" target="build/logs/coverage"/>
</logging>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<clover outputFile="build/coverage/clover.xml"/>
<html outputDirectory="build/coverage/html" />
<text outputFile="build/coverage/coverage.txt" showOnlySummary="true"/>
</report>
</coverage>
</phpunit>
3 changes: 1 addition & 2 deletions src/Commands/AbstractCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
use Arcanedev\Support\Console\Command as BaseCommand;

/**
* Class Command
* Class AbstractCommand
*
* @package Arcanedev\LaravelLang\Bases
* @author ARCANEDEV <[email protected]>
*/
abstract class AbstractCommand extends BaseCommand
Expand Down
1 change: 0 additions & 1 deletion src/Commands/CheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Class CheckCommand
*
* @package Arcanedev\LaravelLang\Commands
* @author ARCANEDEV <[email protected]>
*/
class CheckCommand extends AbstractCommand
Expand Down
1 change: 0 additions & 1 deletion src/Commands/PublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Class PublishCommand
*
* @package Arcanedev\LaravelLang\Commands
* @author ARCANEDEV <[email protected]>
*/
class PublishCommand extends AbstractCommand
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/Entities/Locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Interface Locale
*
* @package Arcanedev\LaravelLang\Contracts\Entities
* @author ARCANEDEV <[email protected]>
*/
interface Locale
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/TransChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Interface TransChecker
*
* @package Arcanedev\LaravelLang\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface TransChecker
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/TransManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Interface TransManager
*
* @package Arcanedev\LaravelLang\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface TransManager
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/TransPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Interface TransPublisher
*
* @package Arcanedev\LaravelLang\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface TransPublisher
Expand Down
1 change: 0 additions & 1 deletion src/Entities/Locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Class Locale
*
* @package Arcanedev\LaravelLang\Entities
* @author ARCANEDEV <[email protected]>
*/
class Locale implements LocaleContract
Expand Down
1 change: 0 additions & 1 deletion src/Entities/LocaleCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Class LocaleCollection
*
* @package Arcanedev\LaravelLang\Entities
* @author ARCANEDEV <[email protected]>
*/
class LocaleCollection extends Collection
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/LangPublishException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Class LangPublishException
*
* @package Arcanedev\LaravelLang\Exceptions
* @author ARCANEDEV <[email protected]>
*/
class LangPublishException extends LaravelLangException {}
5 changes: 3 additions & 2 deletions src/Exceptions/LaravelLangException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

namespace Arcanedev\LaravelLang\Exceptions;

use Exception;

/**
* Class LaravelLangException
*
* @package Arcanedev\LaravelLang\Exceptions
* @author ARCANEDEV <[email protected]>
*/
class LaravelLangException extends \Exception {}
class LaravelLangException extends Exception {}
1 change: 0 additions & 1 deletion src/FileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Class FileLoader
*
* @package Arcanedev\LaravelLang
* @author ARCANEDEV <[email protected]>
*/
class FileLoader extends IlluminateFileLoader
Expand Down
3 changes: 1 addition & 2 deletions src/LaravelLang.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Class LaravelLang
*
* @package Arcanedev\LaravelLang
* @author ARCANEDEV <[email protected]>
*/
class LaravelLang
Expand All @@ -17,5 +16,5 @@ class LaravelLang
| -----------------------------------------------------------------
*/

const VERSION = '8.2.0';
const VERSION = '9.0.0';
}
1 change: 0 additions & 1 deletion src/LaravelLangServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Class LaravelLangServiceProvider
*
* @package Arcanedev\LaravelLang
* @author ARCANEDEV <[email protected]>
*/
class LaravelLangServiceProvider extends ServiceProvider
Expand Down
Loading

0 comments on commit f14b09e

Please sign in to comment.