Fix type of hased model property (#1579)

* set hashed properity as string

* add to changelog

* add test
This commit is contained in:
khaled sadek
2024-08-07 09:29:14 +02:00
committed by GitHub
parent 591e7d665f
commit 643329d23d
4 changed files with 4 additions and 0 deletions
+1
View File
@@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
-------------- --------------
### Fixed ### Fixed
- Fix type of hashed model property to `string`
### Changed ### Changed
+1
View File
@@ -382,6 +382,7 @@ class ModelsCommand extends Command
break; break;
case 'decimal': case 'decimal':
case 'string': case 'string':
case 'hashed':
$realType = 'string'; $realType = 'string';
break; break;
case 'array': case 'array':
@@ -39,5 +39,6 @@ class SimpleCast extends Model
'cast_to_encrypted_collection' => 'encrypted:collection', 'cast_to_encrypted_collection' => 'encrypted:collection',
'cast_to_encrypted_json' => 'encrypted:json', 'cast_to_encrypted_json' => 'encrypted:json',
'cast_to_encrypted_object' => 'encrypted:object', 'cast_to_encrypted_object' => 'encrypted:object',
'cast_to_hashed' => 'hashed',
]; ];
} }
@@ -105,5 +105,6 @@ class SimpleCast extends Model
'cast_to_encrypted_collection' => 'encrypted:collection', 'cast_to_encrypted_collection' => 'encrypted:collection',
'cast_to_encrypted_json' => 'encrypted:json', 'cast_to_encrypted_json' => 'encrypted:json',
'cast_to_encrypted_object' => 'encrypted:object', 'cast_to_encrypted_object' => 'encrypted:object',
'cast_to_hashed' => 'hashed',
]; ];
} }