Skip to content

Commit e18a1c8

Browse files
chore: adopt new grammar class constructor
laravel/framework#51821
1 parent cf79e09 commit e18a1c8

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,12 @@ jobs:
1313
fail-fast: true
1414
matrix:
1515
os: [ubuntu-latest]
16-
php: [8.4, 8.3, 8.2, 8.1]
17-
laravel: [12.*, 11.*, 10.*]
16+
php: [8.4, 8.3, 8.2]
17+
laravel: [12.*]
1818
stability: [prefer-lowest, prefer-stable]
1919
include:
2020
- laravel: 12.*
2121
testbench: 10.*
22-
- laravel: 11.*
23-
testbench: 9.*
24-
- laravel: 10.*
25-
testbench: 8.*
26-
exclude:
27-
- laravel: 12.*
28-
php: 8.1
29-
- laravel: 11.*
30-
php: 8.1
3122

3223
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
3324

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.1",
20-
"esign/laravel-database-trigger": "^1.3.0",
21-
"illuminate/database": "^10.0|^11.0|^12.0",
22-
"illuminate/support": "^10.0|^11.0|^12.0"
19+
"php": "^8.2",
20+
"esign/laravel-database-trigger": "^1.5.0",
21+
"illuminate/database": "^12.0",
22+
"illuminate/support": "^12.0"
2323
},
2424
"require-dev": {
2525
"friendsofphp/php-cs-fixer": "^3.5",
26-
"orchestra/testbench": "^8.0|^9.0|^10.0",
26+
"orchestra/testbench": "^10.0",
2727
"phpstan/phpstan": "^1.10",
28-
"phpunit/phpunit": "^10.1|^11.0"
28+
"phpunit/phpunit": "^11.0"
2929
},
3030
"autoload": {
3131
"psr-4": {

src/Commands/AuditTriggerMakeCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,16 @@ public function handle(): void
4040
->event(TriggerEvent::from($triggerEvent))
4141
->timing(TriggerTiming::from($triggerTiming))
4242
->statement(function () use ($triggerEvent, $auditableType, $auditableId, $columnsToBeTracked) {
43+
/** @var \Illuminate\Database\DatabaseManager */
44+
$databaseManager = $this->laravel->make('db');
4345
$auditTriggerStatement = new AuditTriggerStatement(
4446
TriggerEvent::from($triggerEvent),
4547
$auditableType,
4648
$auditableId,
4749
$columnsToBeTracked,
4850
);
4951

50-
return (new MySqlGrammar())->compileAuditTriggerStatement($auditTriggerStatement);
52+
return (new MySqlGrammar($databaseManager->connection()))->compileAuditTriggerStatement($auditTriggerStatement);
5153
});
5254

5355
$this->writeMigration($trigger);

0 commit comments

Comments
 (0)