Skip to content

Commit c80a40c

Browse files
committed
- Testing laravel 12 support
1 parent 8855ffa commit c80a40c

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ jobs:
1616
fail-fast: true
1717
matrix:
1818
os: [ ubuntu-latest ]
19-
php: [ 8.3, 8.2, 8.1 ]
20-
laravel: [ 11.*, ^10.40, ^9.14 ]
19+
php: [ 8.4, 8.3, 8.2, 8.1 ]
20+
laravel: [ 12.*, 11.*, ^10.40, ^9.14 ]
2121
stability: [ prefer-lowest, prefer-stable ]
2222
include:
23+
- laravel: 12.*
24+
testbench: 10.*
25+
carbon: ^3.8.4
2326
- laravel: 11.*
2427
testbench: 9.*
2528
carbon: ^2.63
@@ -30,6 +33,8 @@ jobs:
3033
testbench: 7.*
3134
carbon: ^2.63
3235
exclude:
36+
- laravel: 12.*
37+
php: 8.1
3338
- laravel: 11.*
3439
php: 8.1
3540

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
],
1818
"require": {
1919
"php": "^8.1",
20-
"illuminate/support": "^9.14 || ^10.40 || ^11.0"
20+
"illuminate/support": "^9.14 || ^10.40 || ^11.0 || ^12.0"
2121
},
2222
"require-dev": {
2323
"laravel/pint": "^1.14",
24-
"orchestra/testbench": "^7.0 || ^8.0 || ^9.0",
25-
"phpunit/phpunit": "^9.5 || ^10.5"
24+
"orchestra/testbench": "^7.0 || ^8.0 || ^9.0 || ^10.0",
25+
"phpunit/phpunit": "^9.5 || ^10.5 || ^11.5.3"
2626
},
2727
"autoload": {
2828
"psr-4": {

src/SchemaServiceProvider.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ protected function registerBuilderMacros()
3737

3838
Builder::macro('getTableComment', function (string $table, bool $fail_on_missing = false) {
3939
/** @var $this Builder */
40-
$table_info = $this->getTables();
40+
if (method_exists($this, 'getCurrentSchemaName')) {
41+
$table_info = $this->getTables($this->getCurrentSchemaName());
42+
} else {
43+
/** @var $this Builder */
44+
$table_info = $this->getTables();
45+
}
4146

4247
foreach ($table_info as $info) {
4348
if ($info['name'] == $table) {

0 commit comments

Comments
 (0)