Skip to content

Commit

Permalink
Update grammar assersions based on changes in laravel/framework#51373
Browse files Browse the repository at this point in the history
The queries themselves were not changed, however, the statements are now
generated as separate array items, rather than as a single query.

Pinned minimum framework version to `^11.15` and lifted package to PHP
`^8.2`, seeing as we need these as minimums to satisfy these changes
here.
  • Loading branch information
michaeldyrynda committed Jul 14, 2024
1 parent efb9dd3 commit 0424270
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.3, 8.2, 8.1]
laravel: ['^10.0', '^11.0']
exclude:
- laravel: '^11.0'
php: 8.1
php: [8.3, 8.2]
laravel: ['^11.15']

name: P${{ matrix.php }} - L${{ matrix.laravel }}

Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
}
],
"require": {
"php": "^8.1",
"illuminate/container": "^10.0 || ^11.0",
"illuminate/contracts": "^10.0 || ^11.0",
"illuminate/database": "^10.0 || ^11.0",
"illuminate/events": "^10.0 || ^11.0",
"illuminate/support": "^10.0 || ^11.0",
"php": "^8.2",
"illuminate/container": "^11.15",
"illuminate/contracts": "^11.15",
"illuminate/database": "^11.15",
"illuminate/events": "^11.15",
"illuminate/support": "^11.15",
"ramsey/uuid": "^4.7",
"spatie/laravel-package-tools": "^1.16"
},
Expand Down
5 changes: 4 additions & 1 deletion tests/Feature/DatabaseMySqlSchemaGrammarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public function testAddingUuid()
$connection = m::mock(Connection::class);

$this->assertEquals(
['alter table `users` add `foo` char(36) not null, add `bar` binary(16) not null'],
[
'alter table `users` add `foo` char(36) not null',
'alter table `users` add `bar` binary(16) not null',
],
$blueprint->toSql($connection, new MySqlGrammar)
);
}
Expand Down
5 changes: 4 additions & 1 deletion tests/Feature/DatabasePostgresSchemaGrammarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public function testAddingUuid()
$connection = m::mock(Connection::class);

$this->assertEquals(
['alter table "users" add column "foo" uuid not null, add column "bar" bytea not null'],
[
'alter table "users" add column "foo" uuid not null',
'alter table "users" add column "bar" bytea not null',
],
$blueprint->toSql($connection, new PostgresGrammar)
);
}
Expand Down
1 change: 1 addition & 0 deletions tests/Feature/DatabaseSQLiteSchemaGrammarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public function testAddingUuid()
});

$connection = m::mock(Connection::class);
$connection->expects('getServerVersion')->once();

$this->assertEquals(
['alter table "users" add column "foo" varchar not null', 'alter table "users" add column "bar" blob(256) not null'],
Expand Down

0 comments on commit 0424270

Please sign in to comment.