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

add Laravel 11 support #21

Merged
merged 21 commits into from
Mar 18, 2024
Merged
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
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
atmonshi marked this conversation as resolved.
Show resolved Hide resolved

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'));
}
}