Skip to content

Commit 4a47a58

Browse files
authored
Merge branch 'master' into feature/fail-at-lower-level
2 parents 85b3146 + da511c2 commit 4a47a58

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ Changed
1111
- Exception previously thrown in `Query/Builder` for `sharedLock`, `lockForUpdate`, `insertGetId` was moved to `Query/Grammar`.
1212
- Query/Builder::lock will now throw `BadMethodCallException` if called. Was ignored in previous versions.
1313

14+
# v4.7.0 (Not released yet)
15+
16+
Chore
17+
- Removed `ramsey/uuid` from composer.json since laravel already includes it.
18+
19+
Fixed
20+
- Expressions given as $value in `Schema\Grammar::formatDefaultValue` will now go through `getValue` to match upstream (No behavioral change).
21+
1422
# v4.6.0
1523

1624
Fixed

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"laravel/framework": "~9.42",
1515
"google/cloud-spanner": "^1.47",
1616
"grpc/grpc": "^1.42",
17-
"ramsey/uuid": "~4",
1817
"symfony/cache": "~6",
1918
"symfony/lock": "~6"
2019
},
@@ -40,6 +39,10 @@
4039
]
4140
}
4241
},
42+
"scripts": {
43+
"analyze": "phpstan analyse --configuration phpstan.neon --memory-limit=-1",
44+
"test": "phpunit"
45+
},
4346
"suggest": {
4447
"ext-sysvmsg": "Can use SemaphoreLock for session handling. Will use FileLock if not present.",
4548
"ext-sysvsem": "Can use SemaphoreLock for session handling. Will use FileLock if not present.",

phpstan-baseline.neon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: "#^Cannot cast mixed to string\\.$#"
5+
count: 1
6+
path: src/Schema/Grammar.php

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
includes:
2+
- phpstan-baseline.neon
13
parameters:
24
level: max
35
checkMissingIterableValueType: false

src/Schema/Grammar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ protected function modifyDefault(Blueprint $blueprint, Fluent $column)
508508
protected function formatDefaultValue(Fluent $column, string $type, mixed $value): string
509509
{
510510
if ($value instanceof Expression) {
511-
return (string)$value;
511+
return (string) $this->getValue($value);
512512
}
513513

514514
// Match type without length or subtype.

0 commit comments

Comments
 (0)