From efc0d2b69a05cc123c3033ee548f4628b62fb398 Mon Sep 17 00:00:00 2001 From: jordyvanderhaegen Date: Thu, 20 Feb 2025 22:23:31 +0100 Subject: [PATCH 1/5] chore: support laravel 12 --- .github/workflows/main.yml | 8 ++++++-- composer.json | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d3058c3..1e35498 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,9 +14,11 @@ jobs: matrix: os: [ubuntu-latest] php: [8.4, 8.3, 8.2, 8.1] - laravel: [11.*, 10.*, 9.*] + laravel: [12.*, 11.*, 10.*] stability: [prefer-lowest, prefer-stable] include: + - laravel: 12.* + testbench: 10.* - laravel: 11.* testbench: 9.* - laravel: 10.* @@ -24,6 +26,8 @@ jobs: - laravel: 9.* testbench: 7.* exclude: + - laravel: 12.* + php: 8.1 - laravel: 11.* php: 8.1 @@ -56,7 +60,7 @@ jobs: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.64" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: Execute tests run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index e8d1466..1eed5ea 100644 --- a/composer.json +++ b/composer.json @@ -19,13 +19,13 @@ ], "require": { "php": "^8.1", - "illuminate/support": "^9.0|^10.0|^11.0", - "illuminate/database": "^9.0|^10.0|^11.0" + "illuminate/support": "^10.0|^11.0|^12.0", + "illuminate/database": "^10.0|^11.0|^12.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.5", - "orchestra/testbench": "^7.0|^8.0|^9.0", - "phpunit/phpunit": "^9.0|^10.0" + "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0", + "phpunit/phpunit": "^10.1|11.0" }, "autoload": { "psr-4": { From 117e895571877190c7546d41fca2bbebd89d378e Mon Sep 17 00:00:00 2001 From: jordyvanderhaegen Date: Thu, 20 Feb 2025 22:26:09 +0100 Subject: [PATCH 2/5] ci: do not attempt to run tests on laravel 9 --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e35498..86c772f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,8 +23,6 @@ jobs: testbench: 9.* - laravel: 10.* testbench: 8.* - - laravel: 9.* - testbench: 7.* exclude: - laravel: 12.* php: 8.1 From 3c6b35a40bd6bba1d7a5199325f066c2db95c0ed Mon Sep 17 00:00:00 2001 From: jordyvanderhaegen Date: Thu, 20 Feb 2025 22:27:45 +0100 Subject: [PATCH 3/5] chore: use correct version constraint --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1eed5ea..21d2826 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.5", "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0", - "phpunit/phpunit": "^10.1|11.0" + "phpunit/phpunit": "^10.1|^11.0" }, "autoload": { "psr-4": { From 5507cf78b7fe8de0277845ca93bb0e42108c4524 Mon Sep 17 00:00:00 2001 From: jordyvanderhaegen Date: Fri, 21 Feb 2025 21:15:57 +0100 Subject: [PATCH 4/5] chore: remove unused testbench version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 21d2826..377dd32 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.5", - "orchestra/testbench": "^7.0|^8.0|^9.0|^10.0", + "orchestra/testbench": "^8.0|^9.0|^10.0", "phpunit/phpunit": "^10.1|^11.0" }, "autoload": { From 65a9c9bd3526e55f2efbe09e45a89e0f6118a8cb Mon Sep 17 00:00:00 2001 From: jordyvanderhaegen Date: Fri, 21 Feb 2025 21:34:58 +0100 Subject: [PATCH 5/5] chore: adopt new schema builder class constructor https://github.com/laravel/framework/pull/51821 --- .github/workflows/main.yml | 13 ++----------- composer.json | 10 +++++----- src/Facades/Schema.php | 2 +- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 86c772f..9a29002 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,21 +13,12 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] - php: [8.4, 8.3, 8.2, 8.1] - laravel: [12.*, 11.*, 10.*] + php: [8.4, 8.3, 8.2] + laravel: [12.*] stability: [prefer-lowest, prefer-stable] include: - laravel: 12.* testbench: 10.* - - laravel: 11.* - testbench: 9.* - - laravel: 10.* - testbench: 8.* - exclude: - - laravel: 12.* - php: 8.1 - - laravel: 11.* - php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index 377dd32..9bab35e 100644 --- a/composer.json +++ b/composer.json @@ -18,14 +18,14 @@ } ], "require": { - "php": "^8.1", - "illuminate/support": "^10.0|^11.0|^12.0", - "illuminate/database": "^10.0|^11.0|^12.0" + "php": "^8.2", + "illuminate/support": "^12.0", + "illuminate/database": "^12.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.5", - "orchestra/testbench": "^8.0|^9.0|^10.0", - "phpunit/phpunit": "^10.1|^11.0" + "orchestra/testbench": "^10.0", + "phpunit/phpunit": "^11.0" }, "autoload": { "psr-4": { diff --git a/src/Facades/Schema.php b/src/Facades/Schema.php index 4b4d011..0c9904d 100644 --- a/src/Facades/Schema.php +++ b/src/Facades/Schema.php @@ -21,7 +21,7 @@ public static function connection($name): Builder public static function getSchemaBuilder(Connection $connection): Builder { $getSchemaBuilderForGrammar = function (string $grammarClass, string $builderClass) use ($connection): Builder { - $connection->setSchemaGrammar($connection->withTablePrefix(new $grammarClass())); + $connection->setSchemaGrammar(new $grammarClass($connection)); return new $builderClass($connection); };