diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml
index 0a16a52..14efe50 100644
--- a/.github/workflows/phpunit.yml
+++ b/.github/workflows/phpunit.yml
@@ -1,6 +1,6 @@
name: phpunit
-on: [ push, pull_request ]
+on: [ push ]
jobs:
build:
@@ -10,7 +10,7 @@ jobs:
fail-fast: true
matrix:
php: [ "8.0", "8.1", "8.2", "8.3", "8.4" ]
- laravel: [ "8.0", "9.0", "10.0", "11.0" ]
+ laravel: [ "8.0", "9.0", "10.0", "11.0", "12.0" ]
psql: [ "9", "10", "11", "12", "13", "14", "15", "16", "17" ]
exclude:
- laravel: "8.0"
@@ -42,6 +42,21 @@ jobs:
- laravel: "11.0"
psql: "11"
+
+ - laravel: "12.0"
+ php: "8.0"
+
+ - laravel: "12.0"
+ php: "8.1"
+
+ - laravel: "12.0"
+ psql: "9"
+
+ - laravel: "12.0"
+ psql: "10"
+
+ - laravel: "12.0"
+ psql: "11"
name: php ${{ matrix.php }}, lr ${{ matrix.laravel }}, pg ${{ matrix.psql }}
diff --git a/README.md b/README.md
index 0b61b1d..1ce4222 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@ Or manually update `require-dev` block of `composer.json` and run `composer upda
| Service | Versions |
|:----------|:-----------------------------------|
| PHP | ^8.0 |
-| Laravel | ^8.0, ^9.0, ^10.0, ^11.0 |
+| Laravel | ^8.0, ^9.0, ^10.0, ^11.0, ^12.0 |
| Databases | MySQL 5.7+, PostgreSQL 9.5+, MSSQL |
| Laravel \ PostgreSQL | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
@@ -40,6 +40,7 @@ Or manually update `require-dev` block of `composer.json` and run `composer upda
| 9 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| 10 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| 11 | ✖️ | ✖️ | ✖️ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
+| 12 | ✖️ | ✖️ | ✖️ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
## Usage
diff --git a/composer.json b/composer.json
index 21eeecd..74444fb 100644
--- a/composer.json
+++ b/composer.json
@@ -37,19 +37,22 @@
"require": {
"php": "^8.0",
"ext-pdo": "*",
- "doctrine/dbal": "^3.0 || ^4.0",
"dragon-code/contracts": "^2.15",
"dragon-code/support": "^6.0",
- "illuminate/contracts": "^8.0 || ^9.0 || ^10.0 || ^11.0",
- "illuminate/database": "^8.0 || ^9.0 || ^10.0 || ^11.0",
- "illuminate/support": "^8.0 || ^9.0 || ^10.0 || ^11.0"
+ "illuminate/contracts": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0",
+ "illuminate/database": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0",
+ "illuminate/support": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0"
},
"require-dev": {
"ext-pdo_mysql": "*",
"ext-pdo_pgsql": "*",
+ "doctrine/dbal": "^3.0 || ^4.0",
"mockery/mockery": "^1.0",
- "orchestra/testbench": "^6.0 || ^7.0 || ^8.0 || ^9.0",
- "phpunit/phpunit": "^9.6 || ^10.0"
+ "orchestra/testbench": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0",
+ "phpunit/phpunit": "^9.6 || ^10.0 || ^11.0"
+ },
+ "suggest": {
+ "doctrine/dbal": "[For Laravel 8-10] Required to rename columns and drop SQLite columns (^3.5.1)."
},
"minimum-stability": "stable",
"prefer-stable": true,
@@ -80,4 +83,4 @@
]
}
}
-}
\ No newline at end of file
+}
diff --git a/phpunit.xml b/phpunit.xml
index 6317452..68760ac 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -18,20 +18,15 @@
./src
-
-
-
-
-
-
-
-
-
-
./tests
+
+
+
+
+
diff --git a/src/Console/Migrate.php b/src/Console/Migrate.php
index da6a82f..e031607 100644
--- a/src/Console/Migrate.php
+++ b/src/Console/Migrate.php
@@ -1,5 +1,7 @@
builder($this->source(), $table)
->orderBy($column)
->chunk(1000, function (Collection $items) use ($table) {
- $items = Arr::resolve($items);
-
- $this->builder($this->target(), $table)->insert($items);
+ $this->builder($this->target(), $table)->insert(
+ Arr::resolve($items)
+ );
});
$this->migrated[] = $table;
diff --git a/src/Constants/Drivers.php b/src/Constants/Drivers.php
index 14d5110..f7c470b 100644
--- a/src/Constants/Drivers.php
+++ b/src/Constants/Drivers.php
@@ -1,5 +1,7 @@
schema(), 'getCurrentSchemaName')
+ ? $this->schema()->getCurrentSchemaName()
+ : null;
+
$tables = method_exists($this->schema(), 'getAllTables')
? $this->schema()->getAllTables()
- : $this->schema()->getTables();
+ : $this->schema()->getTables($schema);
$key = $this->tableNameColumn();
diff --git a/src/Database/Manager.php b/src/Database/Manager.php
index 9a034bc..9663afe 100644
--- a/src/Database/Manager.php
+++ b/src/Database/Manager.php
@@ -1,5 +1,7 @@
getCurrentSchemaName()
+ : null;
+
return method_exists($builder, 'getAllTables')
? $builder->getAllTables()
- : $builder->getTables();
+ : $builder->getTables($schema);
}
}
diff --git a/tests/Concerns/Migration.php b/tests/Concerns/Migration.php
index dd53faa..3e19301 100644
--- a/tests/Concerns/Migration.php
+++ b/tests/Concerns/Migration.php
@@ -1,5 +1,7 @@
databaseConnection()
+ );
}
protected function connector(): ConnectorInterface
diff --git a/tests/Connectors/PostgresConnection.php b/tests/Connectors/PostgresConnection.php
index 2cc5134..85be809 100644
--- a/tests/Connectors/PostgresConnection.php
+++ b/tests/Connectors/PostgresConnection.php
@@ -1,5 +1,7 @@
databaseConnection()
+ );
}
protected function connector(): ConnectorInterface
diff --git a/tests/Connectors/SqlServerConnection.php b/tests/Connectors/SqlServerConnection.php
index dc0129e..0f85603 100644
--- a/tests/Connectors/SqlServerConnection.php
+++ b/tests/Connectors/SqlServerConnection.php
@@ -1,5 +1,7 @@
databaseConnection()
+ );
}
protected function connector(): ConnectorInterface
diff --git a/tests/Providers/TestServiceProvider.php b/tests/Providers/TestServiceProvider.php
index 83500a7..20445d9 100644
--- a/tests/Providers/TestServiceProvider.php
+++ b/tests/Providers/TestServiceProvider.php
@@ -1,5 +1,7 @@