-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework native EntityId(Value) serializations #718
Conversation
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.
Missing a test. Looks good otherwise.
@@ -114,7 +114,7 @@ public function serializationProvider() { | |||
[ '["",""]', '' ], | |||
[ '["",2]', 2 ], | |||
[ '["",null]', null ], | |||
[ '', null ], | |||
[ '', '' ], |
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 test new serialization format: [ 'Q2', 'Q2' ],
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.
Done for both ItemId and PropertyId.
@@ -92,7 +92,7 @@ public function testGetEntityType() { | |||
|
|||
public function testSerialize() { |
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.
there is no test for Propertyid::unserialize?!
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.
There is, see line 101 below.
8a3e451
to
614ebfb
Compare
This is an alternative draft for #716. Pinging @brightbyte and @JeroenDeDauw.
This patch does 2 things:
serialize
instead of JSON.The 1st change makes the serialized string much longer, the 2nd change minimizes it again.
In all cases I keep compatibility with the previous serialization formats.