From dfb0b572027e67c62db31990120ec4fb877e2e30 Mon Sep 17 00:00:00 2001 From: Qusai Farraj Date: Tue, 8 Mar 2022 16:19:50 -0600 Subject: [PATCH 1/6] add support for Laravel 9 --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index e403ef8..2dc4df7 100644 --- a/composer.json +++ b/composer.json @@ -18,13 +18,13 @@ } ], "require": { - "laravel/framework": "~6.0|~7.0", + "laravel/framework": "~6.0|~7.0|~8.0|~9.0", "doctrine/dbal": "^2.5" }, "require-dev": { - "phpunit/phpunit" : "~8.3", - "orchestra/testbench": "~4.0", - "mockery/mockery": "^1.2.3" + "phpunit/phpunit" : "~8.3|~9.1", + "orchestra/testbench": "~4.0|~6.0", + "mockery/mockery": "^1.2.3|~1.3" }, "autoload": { "psr-4": { From 4bff7b772b5c24c6be76d210a12e2cad2ac577b2 Mon Sep 17 00:00:00 2001 From: Qusai Farraj Date: Tue, 8 Mar 2022 17:02:02 -0600 Subject: [PATCH 2/6] ignore .phpunit.result.cache --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5b164a6..18fbf01 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ composer.lock .DS_Store tests/temp/database.sqlite .idea +.phpunit.result.cache \ No newline at end of file From 9cd28ea72c155a11fc2d07f3f1d802f6f5cd4a55 Mon Sep 17 00:00:00 2001 From: Qusai Farraj Date: Tue, 8 Mar 2022 17:03:45 -0600 Subject: [PATCH 3/6] update put() method on SimpleRepository to comply with Laravel 9 --- src/Cache/SimpleRepository.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cache/SimpleRepository.php b/src/Cache/SimpleRepository.php index 0f15f22..1a8f5d7 100644 --- a/src/Cache/SimpleRepository.php +++ b/src/Cache/SimpleRepository.php @@ -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); } /** From 72ff49f0ba96e74bc230118660693b424cb8f595 Mon Sep 17 00:00:00 2001 From: Qusai Farraj Date: Tue, 8 Mar 2022 17:04:03 -0600 Subject: [PATCH 4/6] update SimpleRepositoryTest to comply with Laravel 9 change --- tests/Cache/SimpleRepositoryTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Cache/SimpleRepositoryTest.php b/tests/Cache/SimpleRepositoryTest.php index e36ef2a..7405a22 100644 --- a/tests/Cache/SimpleRepositoryTest.php +++ b/tests/Cache/SimpleRepositoryTest.php @@ -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')); } From 876b3c0175c977fba42694ee96b1655425e4a884 Mon Sep 17 00:00:00 2001 From: Qusai Farraj Date: Tue, 8 Mar 2022 17:05:27 -0600 Subject: [PATCH 5/6] update compose.json to require the latest dependencies version for Laravel 9 --- composer.json | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 2dc4df7..71c6aea 100644 --- a/composer.json +++ b/composer.json @@ -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", @@ -18,13 +18,14 @@ } ], "require": { - "laravel/framework": "~6.0|~7.0|~8.0|~9.0", + "php": "^8.0", + "laravel/framework": "^9.0", "doctrine/dbal": "^2.5" }, "require-dev": { - "phpunit/phpunit" : "~8.3|~9.1", - "orchestra/testbench": "~4.0|~6.0", - "mockery/mockery": "^1.2.3|~1.3" + "phpunit/phpunit" : "^9.1", + "orchestra/testbench": "^7.0", + "mockery/mockery": "^1.3" }, "autoload": { "psr-4": { From 679bfcb6d388a530dc106a73836b2b9f623922e3 Mon Sep 17 00:00:00 2001 From: Qusai Farraj Date: Tue, 8 Mar 2022 17:09:02 -0600 Subject: [PATCH 6/6] update travis to support php 8.0 --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9c8fb22..2ec4da8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: php php: - - 7.2 - - 7.3 + - 8.0 before_script: - travis_retry composer self-update