diff --git a/CHANGELOG.md b/CHANGELOG.md index f223ded2..89226aa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,11 @@ -# v4.6.1 (Not released yet) +# v4.7.0 (Not released yet) Chore - Removed `ramsey/uuid` from composer.json since laravel already includes it. +Fixed +- Expressions given as $value in `Schema\Grammar::formatDefaultValue` will now go through `getValue` to match upstream (No behavioral change). + # v4.6.0 Fixed diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 00000000..86dab450 --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,6 @@ +parameters: + ignoreErrors: + - + message: "#^Cannot cast mixed to string\\.$#" + count: 1 + path: src/Schema/Grammar.php diff --git a/phpstan.neon b/phpstan.neon index c63e78f7..b0c23965 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,3 +1,5 @@ +includes: + - phpstan-baseline.neon parameters: level: max checkMissingIterableValueType: false diff --git a/src/Schema/Grammar.php b/src/Schema/Grammar.php index eb8e4ba2..26ef69e7 100644 --- a/src/Schema/Grammar.php +++ b/src/Schema/Grammar.php @@ -508,7 +508,7 @@ protected function modifyDefault(Blueprint $blueprint, Fluent $column) protected function formatDefaultValue(Fluent $column, string $type, mixed $value): string { if ($value instanceof Expression) { - return (string)$value; + return (string) $this->getValue($value); } // Match type without length or subtype.