Closed MatteoL-W closed 2 years ago
Actually if your JSON doesn't contain the link
then it's incomplete.
You must have the link
value, but empty.
What do you think?
Yes that's true ! I took a little time to find out what was wrong, this is why I thought that this minor update could help ! (since the image fixture are not documented and symfony's error messages are not really effective in that case)
What is your Symfony's error message on that case ?
Mybad, I noticed afterwards that related symfony error messages were available in the ajax requests (and pretty effective).
If I have to explain my reasoning, I would say that I find weird to require a link (even empty) for an image and in that case, mainly if an "alt" is not at least as needy.
But don't make me wrong, I totally agree that this PR is not revolutionary and don't necessary need to be accepted ! :smile: Have a nice day
@MatteoL-W I agree that this PR could improve things.
But I'm not sure it's what we want. In fixtures you can have the "link" empty, it's not that big of a deal.
Will is make your clearer not to have it? I'm not sure actually :). The purpose of fixtures is to change over time, and having the link inside the JSON already makes it easier later to change it. I would prefer to keep it the way it is: we want all attributes to be in the JSON, event empty ones.
The original files did not allow adding an image / image_collection in fixtures without adding the "link" attribute