diff --git a/src/Connection.php b/src/Connection.php index 1e871947..c069b01a 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -37,9 +37,9 @@ use Google\Cloud\Spanner\SpannerClient; use Google\Cloud\Spanner\Timestamp; use Google\Cloud\Spanner\Transaction; +use Illuminate\Contracts\Database\Query\Expression; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Database\Connection as BaseConnection; -use Illuminate\Database\Query\Expression; use Illuminate\Database\Query\Grammars\Grammar as BaseQueryGrammar; use Illuminate\Database\QueryException; use Illuminate\Support\Arr; diff --git a/src/Schema/ColumnDefinition.php b/src/Schema/ColumnDefinition.php index db75db8b..1eafae3a 100644 --- a/src/Schema/ColumnDefinition.php +++ b/src/Schema/ColumnDefinition.php @@ -20,7 +20,7 @@ namespace Colopl\Spanner\Schema; -use Illuminate\Database\Query\Expression; +use Illuminate\Contracts\Database\Query\Expression; use Illuminate\Database\Schema\ColumnDefinition as BaseColumnDefinition; /** diff --git a/src/Schema/Grammar.php b/src/Schema/Grammar.php index f3d168cf..c76659eb 100644 --- a/src/Schema/Grammar.php +++ b/src/Schema/Grammar.php @@ -858,7 +858,7 @@ protected function modifyGeneratedAs(Blueprint $blueprint, Fluent $column): ?str $expression = match (true) { $as === true => 'bit_reversed_positive', - $as instanceof Expression => $this->getValue($as), + $as instanceof ExpressionContract => $this->getValue($as), default => $as, };