-
-
Notifications
You must be signed in to change notification settings - Fork 27
Added SerializationHelper that handles PostgreSql serialization correctly & replaced all serialization function calls #63
Conversation
Create Serialization Helper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome PR, thank you! 🙌
My main question is around the use of DB::connection()
- will it respect the overwritten DB connection on a per-model basis? I'm thinking of this PR
{ | ||
$serialized = serialize($value); | ||
|
||
return DB::connection() instanceof PostgresConnection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be using the connection that has been specified on the model instead of the global DB connection? From Laravel's PR:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think you are right. This solution only covers the default scenario. I will look into it and make fixes accordingly.
Merged with #69 |
Fixes #61