Skip to content

Commit

Permalink
Updating the package
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Sep 10, 2020
1 parent 8d3b1ed commit 43338e6
Show file tree
Hide file tree
Showing 56 changed files with 49 additions and 93 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:

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-7.x-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
key: dependencies-laravel-7-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feel free to check out the [releases](https://github.com/ARCANEDEV/Localization/
### Features

* Easy setup & configuration.
* Laravel `5.x | 6.x | 7.x` are supported.
* Laravel `5.x` to `7.x` 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/Laravel-5.x|6.x|7.x-orange.svg?style=flat-square
[badge_laravel]: https://img.shields.io/badge/Laravel-5.x%20to%207.x-orange.svg?style=flat-square
[badge_build]: https://img.shields.io/github/workflow/status/ARCANEDEV/Localization/run-tests?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.x` & `6.0` are supported.
* Laravel `5.x` to `7.x` are supported.
* SEO-Friendly (Search engine optimization).
* New extended Router to manage your localized routes.
* Locales selector menu (Publishable & Customizable).
Expand Down
47 changes: 25 additions & 22 deletions _docs/1-Installation-and-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,31 @@

## Version Compatibility

| Localization | Laravel |
|:---------------------------------------|:--------------------------------------------------------------------------------------------------------------------|
| ![Localization v7.x][localization_7_x] | ![Laravel v7.*][laravel_7_x] |
| ![Localization v6.x][localization_6_x] | ![Laravel v6.*][laravel_6_x] |
| ![Localization v5.x][localization_5_x] | ![Laravel v5.8][laravel_5_8] |
| ![Localization v4.x][localization_4_x] | ![Laravel v5.7][laravel_5_7] |
| ![Localization v3.x][localization_3_x] | ![Laravel v5.6][laravel_5_6] |
| ![Localization v2.x][localization_2_x] | ![Laravel v5.5][laravel_5_5] |
| ![Localization v1.x][localization_1_x] | ![Laravel v5.4][laravel_5_4] |
| ![Localization v0.x][localization_0_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.*"
[laravel_6_x]: https://img.shields.io/badge/v6.x-supported-brightgreen.svg?style=flat-square "Laravel v6.*"
[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 | Localization |
|:-----------------------------|:---------------------------------------|
| ![Laravel v7.*][laravel_7_x] | ![Localization v7.x][localization_7_x] |
| ![Laravel v6.*][laravel_6_x] | ![Localization v6.x][localization_6_x] |
| ![Laravel v5.8][laravel_5_8] | ![Localization v5.x][localization_5_x] |
| ![Laravel v5.7][laravel_5_7] | ![Localization v4.x][localization_4_x] |
| ![Laravel v5.6][laravel_5_6] | ![Localization v3.x][localization_3_x] |
| ![Laravel v5.5][laravel_5_5] | ![Localization v2.x][localization_2_x] |
| ![Laravel v5.4][laravel_5_4] | ![Localization v1.x][localization_1_x] |
| ![Laravel v5.3][laravel_5_3] | ![Localization v0.x][localization_0_x] |
| ![Laravel v5.2][laravel_5_2] | ![Localization v0.x][localization_0_x] |
| ![Laravel v5.1][laravel_5_1] | ![Localization v0.x][localization_0_x] |
| ![Laravel v5.0][laravel_5_0] | ![Localization v0.x][localization_0_x] |

[laravel_7_x]: https://img.shields.io/badge/version-7.x-blue.svg?style=flat-square "Laravel v7.*"
[laravel_6_x]: https://img.shields.io/badge/version-6.x-blue.svg?style=flat-square "Laravel v6.*"
[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"

[localization_7_x]: https://img.shields.io/badge/version-7.*-blue.svg?style=flat-square "Localization v7.*"
[localization_6_x]: https://img.shields.io/badge/version-6.*-blue.svg?style=flat-square "Localization v6.*"
Expand Down
17 changes: 12 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.2.5",
"ext-json": "*",
"php": "^7.2.5",
"ext-json": "*",
"arcanedev/support": "^7.0"
},
"require-dev": {
"ext-intl": "*",
"ext-intl": "*",
"orchestra/testbench": "^5.0",
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^8.5|^9.0"
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^8.5|^9.0"
},
"autoload": {
"psr-4": {
Expand All @@ -35,6 +35,10 @@
"Arcanedev\\Localization\\Tests\\": "tests/"
}
},
"scripts": {
"test": "phpunit",
"coverage": "phpunit --coverage-html build/coverage/html"
},
"extra": {
"laravel": {
"providers": [
Expand All @@ -46,6 +50,9 @@
"suggest": {
"ext-intl": "Use Intl extension for 'Locale' class (an identifier used to get language)."
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
1 change: 0 additions & 1 deletion src/Contracts/LocalesManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Interface LocalesManager
*
* @package Arcanedev\Localization\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface LocalesManager
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/Localization.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Interface Localization
*
* @package Arcanedev\Localization\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface Localization
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/Negotiator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Interface Negotiator
*
* @package Arcanedev\Localization\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface Negotiator
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/RouteBindable.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Interface RouteBindable
*
* @package Arcanedev\Localization\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface RouteBindable
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/RouteTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Interface RouteTranslator
*
* @package Arcanedev\Localization\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface RouteTranslator
Expand Down
1 change: 0 additions & 1 deletion src/Contracts/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Interface Url
*
* @package Arcanedev\Localization\Contracts
* @author ARCANEDEV <[email protected]>
*/
interface Url
Expand Down
1 change: 0 additions & 1 deletion src/Entities/Locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/**
* Class Locale
*
* @package Arcanedev\Localization\Entities
* @author ARCANEDEV <[email protected]>
*/
class Locale implements Arrayable, Jsonable, JsonSerializable
Expand Down
1 change: 0 additions & 1 deletion src/Entities/LocaleCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Class LocaleCollection
*
* @package Arcanedev\Localization\Entities
* @author ARCANEDEV <[email protected]>
*/
class LocaleCollection extends Collection
Expand Down
1 change: 0 additions & 1 deletion src/Entities/SupportedLocaleCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Class SupportedLocaleCollection
*
* @package Arcanedev\Localization\Entities
* @author ARCANEDEV <[email protected]>
*/
class SupportedLocaleCollection extends Collection
Expand Down
1 change: 0 additions & 1 deletion src/Events/TranslationHasBeenSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Class TranslationHasBeenSet
*
* @package Arcanedev\Localization\Events
* @author ARCANEDEV <[email protected]>
*/
class TranslationHasBeenSet
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/InvalidTranslationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Class InvalidTranslationException
*
* @package Arcanedev\Localization\Exceptions
* @author ARCANEDEV <[email protected]>
*/
class InvalidTranslationException extends LocalizationException {}
1 change: 0 additions & 1 deletion src/Exceptions/LocalizationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Class LocalizationException
*
* @package Arcanedev\Localization\Exceptions
* @author ARCANEDEV <[email protected]>
*/
abstract class LocalizationException extends Exception {}
1 change: 0 additions & 1 deletion src/Exceptions/UndefinedSupportedLocalesException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Class UndefinedSupportedLocalesException
*
* @package Arcanedev\Localization\Exceptions
* @author ARCANEDEV <[email protected]>
*/
class UndefinedSupportedLocalesException extends LocalizationException
Expand Down
1 change: 0 additions & 1 deletion src/Exceptions/UnsupportedLocaleException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Class UnsupportedLocaleException
*
* @package Arcanedev\Localization\Exceptions
* @author ARCANEDEV <[email protected]>
*/
class UnsupportedLocaleException extends LocalizationException {}
1 change: 0 additions & 1 deletion src/Exceptions/UntranslatableAttributeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/**
* Class UntranslatableAttributeException
*
* @package Arcanedev\Localization\Exceptions
* @author ARCANEDEV <[email protected]>
*/
class UntranslatableAttributeException extends LocalizationException
Expand Down
1 change: 0 additions & 1 deletion src/Localization.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
/**
* Class Localization
*
* @package Arcanedev\Localization
* @author ARCANEDEV <[email protected]>
*/
class Localization implements LocalizationContract
Expand Down
1 change: 0 additions & 1 deletion src/LocalizationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Class LocalizationServiceProvider
*
* @package Arcanedev\Localization
* @author ARCANEDEV <[email protected]>
*/
class LocalizationServiceProvider extends PackageServiceProvider
Expand Down
1 change: 0 additions & 1 deletion src/Middleware/LocaleCookieRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Class LocaleCookieRedirect
*
* @package Arcanedev\Localization\Middleware
* @author ARCANEDEV <[email protected]>
*/
class LocaleCookieRedirect extends Middleware
Expand Down
1 change: 0 additions & 1 deletion src/Middleware/LocaleSessionRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Class LocaleSessionRedirect
*
* @package Arcanedev\Localization\Middleware
* @author ARCANEDEV <[email protected]>
*/
class LocaleSessionRedirect extends Middleware
Expand Down
1 change: 0 additions & 1 deletion src/Middleware/LocalizationRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Class LocalizationRedirect
*
* @package Arcanedev\Localization\Middleware
* @author ARCANEDEV <[email protected]>
*/
class LocalizationRedirect extends Middleware
Expand Down
1 change: 0 additions & 1 deletion src/Middleware/LocalizationRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Class LocalizationRoutes
*
* @package Arcanedev\Localization\Middleware
* @author ARCANEDEV <[email protected]>
*/
class LocalizationRoutes extends Middleware
Expand Down
1 change: 0 additions & 1 deletion src/Middleware/Middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/**
* Class Middleware
*
* @package Arcanedev\Localization\Bases
* @author ARCANEDEV <[email protected]>
*/
abstract class Middleware
Expand Down
1 change: 0 additions & 1 deletion src/Middleware/TranslationRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/**
* Class TranslationRedirect
*
* @package Arcanedev\Localization\Middleware
* @author ARCANEDEV <[email protected]>
*/
class TranslationRedirect extends Middleware
Expand Down
11 changes: 4 additions & 7 deletions src/Providers/DeferredServicesProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

namespace Arcanedev\Localization\Providers;

use Arcanedev\Localization\Contracts\{
LocalesManager as LocalesManagerContract,
Localization as LocalizationContract,
Negotiator as NegotiatorContract,
RouteTranslator as RouteTranslatorContract
};
use Arcanedev\Localization\Contracts\LocalesManager as LocalesManagerContract;
use Arcanedev\Localization\Contracts\Localization as LocalizationContract;
use Arcanedev\Localization\Contracts\Negotiator as NegotiatorContract;
use Arcanedev\Localization\Contracts\RouteTranslator as RouteTranslatorContract;
use Arcanedev\Localization\Localization;
use Arcanedev\Localization\Utilities\{LocalesManager, Negotiator, RouteTranslator};
use Arcanedev\Support\Providers\ServiceProvider;
Expand All @@ -18,7 +16,6 @@
/**
* Class DeferredServicesProvider
*
* @package Arcanedev\Localization\Providers
* @author ARCANEDEV <[email protected]>
*/
class DeferredServicesProvider extends ServiceProvider implements DeferrableProvider
Expand Down
1 change: 0 additions & 1 deletion src/Providers/RoutingServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
/**
* Class RoutingServiceProvider
*
* @package Arcanedev\Localization\Providers
* @author ARCANEDEV <[email protected]>
*/
class RoutingServiceProvider extends ServiceProvider
Expand Down
1 change: 0 additions & 1 deletion src/Routing/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
/**
* Class Router
*
* @package Arcanedev\Localization\Routing
* @author ARCANEDEV <[email protected]>
*
* @mixin \Illuminate\Routing\Router
Expand Down
1 change: 0 additions & 1 deletion src/Traits/HasTranslations.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/**
* Trait HasTranslations
*
* @package Arcanedev\Localization\Traits
* @author ARCANEDEV <[email protected]>
*
* @property array attributes
Expand Down
4 changes: 1 addition & 3 deletions src/Utilities/LocalesManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
namespace Arcanedev\Localization\Utilities;

use Arcanedev\Localization\Contracts\LocalesManager as LocalesManagerContract;
use Arcanedev\Localization\Entities\Locale;
use Arcanedev\Localization\Entities\LocaleCollection;
use Arcanedev\Localization\Entities\{Locale, LocaleCollection};
use Arcanedev\Localization\Exceptions\UndefinedSupportedLocalesException;
use Arcanedev\Localization\Exceptions\UnsupportedLocaleException;
use Illuminate\Contracts\Foundation\Application as ApplicationContract;

/**
* Class LocalesManager
*
* @package Arcanedev\Localization
* @author ARCANEDEV <[email protected]>
*/
class LocalesManager implements LocalesManagerContract
Expand Down
1 change: 0 additions & 1 deletion src/Utilities/Negotiator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/**
* Class Negotiator
*
* @package Arcanedev\Localization\Utilities
* @author ARCANEDEV <[email protected]>
*
* Negotiates language with the user's browser through the Accept-Language HTTP header or the user's host address.
Expand Down
Loading

0 comments on commit 43338e6

Please sign in to comment.