Skip to content

Commit

Permalink
Merge pull request #107 from alexhouse/feature/laravel-5.5
Browse files Browse the repository at this point in the history
Update requirements for Laravel 5.5
  • Loading branch information
sildraug committed Sep 1, 2017
2 parents 00e2d4b + 78f5fb3 commit 9378b81
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 19 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
}
],
"require": {
"laravel/framework": "~5.4",
"laravel/framework": "~5.5",
"doctrine/dbal": "^2.5"
},
"require-dev": {
"phpunit/phpunit" : "~5.0",
"orchestra/testbench": "~3.4",
"mockery/mockery": "^0.9.4"
"phpunit/phpunit" : "~6.0",
"orchestra/testbench": "~3.5",
"mockery/mockery": "^0.9.9"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 6 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ WAAVI is a web development studio based in Madrid, Spain. You can learn more abo
4.x | 1.0.x
5.0.x | 2.0.x
5.1.x|5.3.x | 2.1.x
5.4.x | 2.2.x and higher
5.4.x | 2.2.x
5.5.x | 2.3.x and higher

## Features overview

Expand All @@ -51,12 +52,13 @@ WAAVI is a web development studio based in Madrid, Spain. You can learn more abo

Require through composer

composer require waavi/translation 2.2.x

composer require waavi/translation 2.3.x

Or manually edit your composer.json file:

"require": {
"waavi/translation": "2.2.x"
"waavi/translation": "2.3.x"
}

Once installed, in your project's config/app.php file replace the following entry from the providers array:
Expand Down Expand Up @@ -292,7 +294,7 @@ The provided methods are:
Method | Description
:---------|:--------
update($id, $text); | Update an unlocked entry
updateAndLock($id, $text); | Update and lock an entry (locked or not)
updateAndLock($id, $text); | Update and lock an entry (locked or not)
allByLocale($locale, $perPage = 0); | Get all by locale
untranslated($locale, $perPage = 0, $text = null); | Get all untranslated entries. If $text is set, entries will be filtered by partial matches to translation value.
pendingReview($locale, $perPage = 0); | List all entries pending review
Expand Down
14 changes: 12 additions & 2 deletions src/Loaders/CacheLoader.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php namespace Waavi\Translation\Loaders;

use Illuminate\Translation\LoaderInterface;
use Waavi\Translation\Cache\CacheRepositoryInterface as Cache;

class CacheLoader extends Loader implements LoaderInterface
class CacheLoader extends Loader
{
/**
* The default locale.
Expand Down Expand Up @@ -80,6 +79,17 @@ public function addNamespace($namespace, $hint)
$this->fallback->addNamespace($namespace, $hint);
}

/**
* Add a new JSON path to the loader.
*
* @param string $path
* @return void
*/
public function addJsonPath($path)
{
//
}

/**
* Get an array of all the registered namespaces.
*
Expand Down
14 changes: 12 additions & 2 deletions src/Loaders/DatabaseLoader.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php namespace Waavi\Translation\Loaders;

use Illuminate\Translation\LoaderInterface;
use Waavi\Translation\Repositories\TranslationRepository;

class DatabaseLoader extends Loader implements LoaderInterface
class DatabaseLoader extends Loader
{
/**
* The default locale.
Expand Down Expand Up @@ -59,6 +58,17 @@ public function addNamespace($namespace, $hint)
$this->hints[$namespace] = $hint;
}

/**
* Add a new JSON path to the loader.
*
* @param string $path
* @return void
*/
public function addJsonPath($path)
{
//
}

/**
* Get an array of all the registered namespaces.
*
Expand Down
14 changes: 12 additions & 2 deletions src/Loaders/FileLoader.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php namespace Waavi\Translation\Loaders;

use Illuminate\Translation\FileLoader as LaravelFileLoader;
use Illuminate\Translation\LoaderInterface;

class FileLoader extends Loader implements LoaderInterface
class FileLoader extends Loader
{
/**
* The default locale.
Expand Down Expand Up @@ -58,6 +57,17 @@ public function addNamespace($namespace, $hint)
$this->laravelFileLoader->addNamespace($namespace, $hint);
}

/**
* Add a new JSON path to the loader.
*
* @param string $path
* @return void
*/
public function addJsonPath($path)
{
$this->laravelFileLoader->addJsonPath($path);
}

/**
* Get an array of all the registered namespaces.
*
Expand Down
11 changes: 9 additions & 2 deletions src/Loaders/Loader.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php namespace Waavi\Translation\Loaders;

use Illuminate\Config\Repository as Config;
use Illuminate\Translation\LoaderInterface;
use Illuminate\Contracts\Translation\Loader as LoaderContract;
use Waavi\Translation\Repositories\LanguageRepository;
use Waavi\Translation\Repositories\TranslationRepository;

abstract class Loader implements LoaderInterface
abstract class Loader implements LoaderContract
{
/**
* The default locale.
Expand Down Expand Up @@ -64,6 +64,13 @@ abstract public function loadSource($locale, $group, $namespace = null);
*/
abstract public function addNamespace($namespace, $hint);

/**
* Add a new JSON path to the loader.
*
* @param string $path
* @return void
**/
abstract public function addJsonPath($path);

/**
* Get an array of all the registered namespaces.
Expand Down
14 changes: 11 additions & 3 deletions src/Loaders/MixedLoader.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php namespace Waavi\Translation\Loaders;

use Illuminate\Translation\LoaderInterface;

class MixedLoader extends Loader implements LoaderInterface
class MixedLoader extends Loader
{
/**
* The default locale.
Expand Down Expand Up @@ -65,6 +63,16 @@ public function addNamespace($namespace, $hint)
$this->primaryLoader->addNamespace($namespace, $hint);
}

/**
* Add a new JSON path to the loader.
*
* @param string $path
* @return void
*/
public function addJsonPath($path)
{
//
}

/**
* Get an array of all the registered namespaces.
Expand Down

0 comments on commit 9378b81

Please sign in to comment.