Skip to content

Commit 7b9356f

Browse files
Fixed Laravel 12 compatibility
1 parent fd3297a commit 7b9356f

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Or manually update `require-dev` block of `composer.json` and run `composer upda
3131
| Service | Versions |
3232
|:----------|:-----------------------------------|
3333
| PHP | ^8.0 |
34-
| Laravel | ^8.0, ^9.0, ^10.0, ^11.0 |
34+
| Laravel | ^8.0, ^9.0, ^10.0, ^11.0, ^12.0 |
3535
| Databases | MySQL 5.7+, PostgreSQL 9.5+, MSSQL |
3636

3737
| 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
4040
| 9 ||||||||||
4141
| 10 ||||||||||
4242
| 11 | ✖️ | ✖️ | ✖️ |||||||
43+
| 12 | ✖️ | ✖️ | ✖️ |||||||
4344

4445

4546
## Usage

tests/Connectors/MySqlConnection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ class MySqlConnection extends BaseConnection
1111
{
1212
protected function grammar(): Grammar
1313
{
14-
return new MySqlGrammar();
14+
return new MySqlGrammar(
15+
$this->databaseConnection()
16+
);
1517
}
1618

1719
protected function connector(): ConnectorInterface

tests/Connectors/PostgresConnection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ protected function dropSessions(string $name): string
2828

2929
protected function grammar(): Grammar
3030
{
31-
return new PostgresGrammar();
31+
return new PostgresGrammar(
32+
$this->databaseConnection()
33+
);
3234
}
3335

3436
protected function connector(): ConnectorInterface

tests/Connectors/SqlServerConnection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ class SqlServerConnection extends BaseConnection
1111
{
1212
protected function grammar(): Grammar
1313
{
14-
return new SqlServerGrammar();
14+
return new SqlServerGrammar(
15+
$this->databaseConnection()
16+
);
1517
}
1618

1719
protected function connector(): ConnectorInterface

0 commit comments

Comments
 (0)