Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 9 support #182

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ composer.lock
.DS_Store
tests/temp/database.sqlite
.idea
.phpunit.result.cache
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
language: php

php:
- 7.2
- 7.3
- 8.0

before_script:
- travis_retry composer self-update
Expand Down
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "waavi/translation",
"description": "A Translation package for Laravel 5 with database and cache support",
"description": "A Translation package for Laravel 9 with database and cache support",
"keywords": [
"waavi",
"laravel-translator",
Expand All @@ -18,13 +18,14 @@
}
],
"require": {
"laravel/framework": "~6.0|~7.0",
"php": "^8.0",
"laravel/framework": "^9.0",
"doctrine/dbal": "^2.5"
},
"require-dev": {
"phpunit/phpunit" : "~8.3",
"orchestra/testbench": "~4.0",
"mockery/mockery": "^1.2.3"
"phpunit/phpunit" : "^9.1",
"orchestra/testbench": "^7.0",
"mockery/mockery": "^1.3"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions src/Cache/SimpleRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ public function get($locale, $group, $namespace)
* @param string $group
* @param string $namespace
* @param mixed $content
* @param integer $minutes
* @param integer $seconds
* @return void
*/
public function put($locale, $group, $namespace, $content, $minutes)
public function put($locale, $group, $namespace, $content, $seconds)
{
$key = $this->getKey($locale, $group, $namespace);
$this->store->put($key, $content, $minutes);
$this->store->put($key, $content, $seconds);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Cache/SimpleRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function test_has_with_no_entry()
*/
public function test_has_returns_true_if_entry()
{
$this->repo->put('en', 'namespace', 'group', 'key', 'value');
$this->repo->put('en', 'namespace', 'group', ['key' => 'value'], 60);
$this->assertTrue($this->repo->has('en', 'namespace', 'group'));
}

Expand Down