Skip to content

Commit

Permalink
support laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
recca0120 committed Mar 12, 2024
1 parent eee23e1 commit 7c173fd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ jobs:
tools: composer:v2
coverage: none

- name: Install dependencies
uses: nick-invision/retry@v1
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress ${{ matrix.flags }}
- name: Install Composer dependencies
run: |
if [[ "${{ matrix.php }}" = "8.3" ]]; then sed -i -e 's/\("orchestra/testbench":[[:space:]]*\)".*"/\1"^9.0"/' composer.json; fi
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress ${{ matrix.flags }}
- name: Execute tests
continue-on-error: ${{ matrix.php > 8 }}
run: vendor/bin/phpunit --verbose
run: vendor/bin/phpunit
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
},
"require-dev": {
"mockery/mockery": "^0.9|^1.3",
"orchestra/testbench": "^5.19|^6.18|^7.0|^8.0",
"phpunit/phpunit": "^8.5|^9.1|^10.0"
"orchestra/testbench": "^5.19|^6.18|^7.0|^8.0|^9.0",
"phpunit/phpunit": "^8.5|^9.1|^10.0|^11.0"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 0 additions & 5 deletions tests/Console/ParallelCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
namespace Recca0120\LaravelParallel\Tests\Console;

use Illuminate\Foundation\Auth\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Http\Response;
use Recca0120\LaravelParallel\Console\ParallelCommand;
use Recca0120\LaravelParallel\ResponseIdentifier;
Expand All @@ -14,9 +12,6 @@

class ParallelCommandTest extends TestCase
{
use RefreshDatabase;
use WithFaker;

/**
* @var User
*/
Expand Down
3 changes: 3 additions & 0 deletions tests/Fixtures/SetupDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Recca0120\LaravelParallel\Tests\Fixtures;

use Illuminate\Database\Schema\Builder;
use Illuminate\Support\Facades\Hash;

trait SetupDatabase
Expand All @@ -18,8 +19,10 @@ protected function databaseSetUp($app)

$app['config']->set('auth.providers.users.model', User::class);

/** @var Builder $schema */
$schema = $app['db']->getSchemaBuilder();

$schema->dropIfExists('users');
$schema->create('users', function ($table) {
$table->increments('id');
$table->string('email')->unique();
Expand Down

0 comments on commit 7c173fd

Please sign in to comment.