diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index 2869804..dadb56e 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -13,21 +13,20 @@ jobs:
matrix:
db: ['mysql', 'pgsql']
payload:
+ - { queue: 'github-actions-laravel9-php81', laravel: '10.*', php: '8.2', 'testbench': '8.*'}
+ - { queue: 'github-actions-laravel9-php81', laravel: '10.*', php: '8.1', 'testbench': '8.*'}
+ - { queue: 'github-actions-laravel9-php81', laravel: '9.*', php: '8.2', 'testbench': '7.*'}
- { queue: 'github-actions-laravel9-php81', laravel: '9.*', php: '8.1', 'testbench': '7.*'}
- { queue: 'github-actions-laravel9-php80', laravel: '9.*', php: '8.0', 'testbench': '7.*'}
- { queue: 'github-actions-laravel8-php81', laravel: '8.*', php: '8.1', 'testbench': '6.*'}
- { queue: 'github-actions-laravel8-php80', laravel: '8.*', php: '8.0', 'testbench': '6.*'}
- { queue: 'github-actions-laravel8-php74', laravel: '8.*', php: '7.4', 'testbench': '6.*'}
- - { queue: 'github-actions-laravel7-php80', laravel: '7.*', php: '8.0', 'testbench': '5.*' }
- - { queue: 'github-actions-laravel7-php74', laravel: '7.*', php: '7.4', 'testbench': '5.*' }
- - { queue: 'github-actions-laravel6-php80', laravel: '6.*', php: '8.0', 'testbench': '4.*' }
- - { queue: 'github-actions-laravel6-php74', laravel: '6.*', php: '7.4', 'testbench': '4.*' }
name: PHP ${{ matrix.payload.php }} - Laravel ${{ matrix.payload.laravel }} - DB ${{ matrix.db }}
steps:
- name: Checkout code
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4416671..1e8a30f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+## 3.4.0 - 2023-02-08
+
+**Changed**
+
+- Added support for Laravel 10
+- Dropped support for Laravel 6 and 7
+
## 3.3.2 - 2022-11-19
**Changed**
diff --git a/README.md b/README.md
index bb824a3..688a1b4 100644
--- a/README.md
+++ b/README.md
@@ -21,16 +21,9 @@ This package allows Google Cloud Tasks to be used as the queue driver.
- This package requires Laravel 6 or higher and supports MySQL 8 and PostgreSQL 14. Might support older database versions too, but package hasn't been tested for it.
+ This package requires Laravel 8 or higher and supports MySQL 8 and PostgreSQL 14. Might support older database versions too, but package hasn't been tested for it.
-Please check the table below for supported Laravel and PHP versions:
-
-|Laravel Version| PHP Version |
- |---|---|
-| 6.x | 7.4 or 8.0
-| 7.x | 7.4 or 8.0
-| 8.x | 7.4 or 8.0 or 8.1
-| 9.x | 8.0 or 8.1
+Please check the [Laravel support policy](https://laravel.com/docs/master/releases#support-policy) table for supported Laravel and PHP versions.
Installation
diff --git a/composer.json b/composer.json
index 76ee4cc..20ae1d3 100644
--- a/composer.json
+++ b/composer.json
@@ -11,10 +11,11 @@
"ext-json": "*",
"phpseclib/phpseclib": "~2.0",
"google/cloud-tasks": "^1.10",
+ "illuminate/support": "^8.0|^9.0|^10.0",
"thecodingmachine/safe": "^1.0|^2.0"
},
"require-dev": {
- "orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0",
+ "orchestra/testbench": "^6.0 || ^7.0 || ^8.0",
"nunomaduro/larastan": "^1.0 || ^2.0",
"thecodingmachine/phpstan-safe-rule": "^1.2",
"laravel/legacy-factories": "^1.3"
@@ -37,7 +38,13 @@
]
}
},
+ "minimum-stability": "dev",
+ "prefer-stable": true,
"scripts": {
+ "l10": [
+ "composer require laravel/framework:10.* orchestra/testbench:8.* --no-interaction --no-update",
+ "composer update --prefer-stable --prefer-dist --no-interaction --no-suggest"
+ ],
"l9": [
"composer require laravel/framework:9.* orchestra/testbench:7.* --no-interaction --no-update",
"composer update --prefer-stable --prefer-dist --no-interaction --no-suggest"
diff --git a/phpunit.xml b/phpunit.xml
index 4f23d86..75239c9 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -1,27 +1,19 @@
-
-
-
- ./tests
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ ./tests
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/TaskHandlerTest.php b/tests/TaskHandlerTest.php
index 36a2d13..74edc17 100644
--- a/tests/TaskHandlerTest.php
+++ b/tests/TaskHandlerTest.php
@@ -76,7 +76,6 @@ public function it_returns_responses_for_invalid_json($debug)
// Assert
if ($debug) {
$response->assertJsonValidationErrors('task');
- $this->assertEquals('The json must be a valid JSON string.', $response->json('errors.json.0'));
} else {
$response->assertNotFound();
}
@@ -84,11 +83,11 @@ public function it_returns_responses_for_invalid_json($debug)
/**
* @test
- * @testWith ["{\"invalid\": \"data\"}", "The task.data field is required."]
- * ["{\"data\": \"\"}", "The task.data field is required."]
- * ["{\"data\": \"test\"}", "The task.data must be an array."]
+ * @testWith ["{\"invalid\": \"data\"}"]
+ * ["{\"data\": \"\"}"]
+ * ["{\"data\": \"test\"}"]
*/
- public function it_returns_responses_for_invalid_payloads(string $payload, string $expectedMessage)
+ public function it_returns_responses_for_invalid_payloads(string $payload)
{
// Arrange
@@ -107,7 +106,6 @@ public function it_returns_responses_for_invalid_payloads(string $payload, strin
// Assert
$response->assertJsonValidationErrors('task.data');
- $this->assertEquals($expectedMessage, $response->json(['errors', 'task.data', 0]));
}
/**
diff --git a/tests/TestCase.php b/tests/TestCase.php
index 0d994be..0c17bb7 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -109,7 +109,8 @@ protected function getEnvironmentSetUp($app)
$disableDashboardPrefix = 'when_dashboard_is_disabled';
- if (substr($this->getName(), 0, strlen($disableDashboardPrefix)) === $disableDashboardPrefix) {
+ $testName = method_exists($this, 'name') ? $this->name() : $this->getName();
+ if (substr($testName, 0, strlen($disableDashboardPrefix)) === $disableDashboardPrefix) {
$app['config']->set('cloud-tasks.dashboard.enabled', false);
} else {
$app['config']->set('cloud-tasks.dashboard.enabled', true);