Skip to content
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

Merged
merged 1 commit into from
Feb 9, 2017
Merged

Conversation

thiemowmde
Copy link
Contributor

This is an alternative draft for #716. Pinging @brightbyte and @JeroenDeDauw.

This patch does 2 things:

  1. Change EntityIdValue::serialize to use the native serialize instead of JSON.
  2. Simplify both ItemId and PropertyId serializations to the straight string.

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.

Copy link

@brightbyte brightbyte left a 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 ],
[ '', '' ],

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' ],

Copy link
Contributor Author

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() {

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?!

Copy link
Contributor Author

@thiemowmde thiemowmde Feb 9, 2017

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.

@brightbyte brightbyte merged commit 4220561 into master Feb 9, 2017
@brightbyte brightbyte deleted the idSerialize branch February 9, 2017 16:03
@thiemowmde thiemowmde modified the milestone: 7.0.0 Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants