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

jsonSerialize dont serialize "included" #31

Closed
bondas83 opened this issue Dec 21, 2018 · 2 comments · Fixed by #32
Closed

jsonSerialize dont serialize "included" #31

bondas83 opened this issue Dec 21, 2018 · 2 comments · Fixed by #32

Comments

@bondas83
Copy link

Detailed description

If we get data from funcion return $this->client->get($this->endpoint.'?'.http_build_query($parameters)); ant then json encode, it didnt return included parameters

Make it clear if the issue is a bug, an enhancement or just a question.

BUG

Why is this change important to you? How would you use it?

If i get data from json api and want to return to Frontent i should do some extra steps

Possible implementation

File CollectionDocument.php

Add extra line:

if ($this->getIncluded()) {
            $document['included'] = $this->included->toArray();
        }

Not obligatory, but suggest an idea for implementing addition or change.

Your environment

Include as many relevant details about the environment you experienced the bug in and how to reproduce it.

  • Version used (e.g. PHP 7.2, HHVM 3):
  • Operating system and version (e.g. Ubuntu 16.04, Windows 7):
  • Link to your project:
  • ...
  • ...
@JaZo
Copy link
Member

JaZo commented Dec 21, 2018

@bondas83, thanks for reporting this issue. I've released 0.11.0 with a fix.

@bondas83
Copy link
Author

bondas83 commented Dec 21, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants