-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
Add toArray and fromArray methods to the serializer #435
Conversation
817241d
to
bd3f7d6
Compare
@@ -0,0 +1,1307 @@ | |||
<?php |
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.
Let's not replicate the entire test suite. One simple test per method should be ok.
I've just returned from vacation. I'll wrap this up this week. |
👍 thanks for your time on this @tystr |
4593154
to
8291086
Compare
@schmittjoh I've simplified the tests for the array methods down to a couple of very rudimentary tests and added handling for |
$visitor->setNavigator($this->navigator); | ||
$this->navigator->accept($visitor->prepare($data), null, $context); | ||
|
||
return (array) $visitor->getRoot(); |
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.
We should do this for the entire array (including children) as these might have an array object, too. Could you also add this to the test-suite?
👍 |
Where are we with this? Any ideas when a release with it will come out? |
I've made a few tweaks, and merged this. We'll need to give this a bit of time in master before thinking about a release. |
Great, thanks @tystr and @schmittjoh for getting this done! |
Just a quick update, this has been used by our app in production since 1 May and all good so far! |
can we get this in a release? |
Aha, you did, v1.0.0 now supports this. 👍 |
This PR implements the solution suggested by @schmittjoh to add additional methods for dealing with array input/output instead of adding a new format for arrays.
#20 (comment)
TODO