-
-
Notifications
You must be signed in to change notification settings - Fork 329
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
Using JSON string containing an array in Yaml fixtures #935
Comments
Indeed this string would need to be escaped otherwise it's interpreted as for any value. So I would either recommend to try a custom faker provider or help out with #840 :) |
@theofidry Thank you, it works with this workaround.
|
Even better :) maybe you can pop a message is the linked issue about it I
think they will find it helpful as well!
…On Fri 15 Jun 2018 at 14:07, Loïc Frémont ***@***.***> wrote:
@theofidry <https://github.com/theofidry> Thank you, it works with the
workaround.
parameters:
data: '{"name":"Netflix", "types":["streeming", "video"]}'
App\Entity\Test:
test_1:
__calls:
- setData: [<{data}>]
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#935 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AE76gQiNHaBQ4i8ojk2gJR7LoSgTUqvqks5t87FcgaJpZM4UpP5O>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using doctrine, we now have "json" type (https://www.doctrine-project.org/projects/doctrine-dbal/en/2.7/reference/types.html#json).
We can now have a json string and this works correctly with alice, but when we have an array in the json, we got an error.
Exemple
data: '{"name":"Netflix", "types":["streaming", "video"]}'
It throws that error: "Array to string conversion"
The text was updated successfully, but these errors were encountered: