Skip to content

Commit

Permalink
Merge pull request #21 from atmonshi/laravel-11
Browse files Browse the repository at this point in the history
add Laravel 11 support
  • Loading branch information
rupadana authored Mar 18, 2024
2 parents 2715bb4 + d457728 commit bea267a
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 14 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.2, 8.1]
laravel: [10.*]
laravel: [10.*, 11.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
carbon: ^2.63
- laravel: 11.*
testbench: 9.*
carbon: ^3.0
exclude:
- laravel: 11.*
php: 8.1

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ phpunit.xml
phpstan.neon
testbench.yaml
vendor
.phpunit.cache/test-results
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@
],
"require": {
"php": "^8.1",
"laravel/framework": "^10.10",
"laravel/sanctum": "^3.2",
"laravel/framework": "^10.10|^11.0",
"laravel/sanctum": "^3.2|^4.0",
"filament/filament": "^3.2",
"spatie/laravel-package-tools": "^1.14.0",
"illuminate/contracts": "^10.0",
"illuminate/contracts": "^10.0|^11.0",
"spatie/laravel-query-builder": "^5.3"
},
"require-dev": {
"nunomaduro/collision": "^7.9|^8.0",
"orchestra/testbench": "^8.0|^9.0",
"laravel/pint": "^1.0",
"nunomaduro/collision": "^7.9",
"orchestra/testbench": "^8.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-arch": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"phpunit/phpunit": "^10.0.17"
"phpunit/phpunit": "^10.0.17|^10.5"
},
"autoload": {
"psr-4": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
};
5 changes: 1 addition & 4 deletions tests/WithPanelPrefix/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,8 @@ public function getEnvironmentSetUp($app)
});
}

protected function defineDatabaseMigrations()
protected function defineDatabaseMigrations(): void
{
$this->loadLaravelMigrations();

// Migrations for test fixtures
$this->loadMigrationsFrom(realpath(__DIR__ . '/../Fixtures/Database/Migrations'));
}
}
3 changes: 0 additions & 3 deletions tests/WithoutPanelPrefix/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ public function getEnvironmentSetUp($app)

protected function defineDatabaseMigrations()
{
$this->loadLaravelMigrations();

// Migrations for test fixtures
$this->loadMigrationsFrom(realpath(__DIR__ . '/../Fixtures/Database/Migrations'));
}
}

0 comments on commit bea267a

Please sign in to comment.