Closed remoteclient closed 5 years ago
Another one is that a change one serialization group it took effect immediately in dev environment. Now I have to clear the cache to see the changes.
:see_no_evil: set metadata_cache
to false in api platform's configuration. I'm not sure to know how to solve your issue though, I'd need to reproduce the issue.
same issue i have to clear the cache to see the changes, any workaround? i already set metadata_cache to false, but still the same.
We reverted the change in https://github.com/api-platform/core/pull/2648, in the meantime you need to disable the metadata cache: https://api-platform.com/docs/core/performance/#enabling-the-metadata-cache
We reverted the change in #2648, in the meantime you need to disable the metadata cache: https://api-platform.com/docs/core/performance/#enabling-the-metadata-cache
may i know how to disable metadata_cache? i did to add api_platform.metadata_cache: false in my parameters, but still the same, need to clear cache.
normally just set the parameter to false
:
# api/config/config.yaml
parameters:
api_platform.metadata_cache: false
Can you provide a failing Behat test? I think it'd be easier to understand the issue that way. :smile:
This should be fixed in 2.4.1, let us know if that's not the case.
Doesn't appear to be fixed in 2.4.1
- Installing api-platform/core (v2.4.1): Downloading (100%)
- Installing api-platform/api-pack (dev-master f756ff0): Loading from cache
This should be fixed in 2.4.1, let us know if that's not the case.
@soyuka The cache:clear
issue is fixed, but this issue is mainly not about that.
WDYM by "property[exists]=false is also broken"?
@BonnieDoug Please open another issue for unrelated topics to avoid confusing the discussion here.
Anyway, we have Behat tests for that: https://github.com/api-platform/core/blob/v2.4.1/features/doctrine/exists_filter.feature
@alanpoulain @teohhanhui Apologies, my code was broken not the property[exists]
filter. Edited my original comment.
However, the serialization of sub-resources is still broken in 2.4.0 and 2.4.1, works fine in 2.3.6.
Could you help us by adding a Behat test for that? :)
This is not fixed by the latest version of apip (2.4.1). The problem with the serialization group on subresources still exists. The other one was still an observation.
@remoteclient
Could you help us by adding a Behat test for that? :)
Shame on me that I never did tests since now. This takes a little bit. @BonnieDoug as you can confirm the bug.... Can you help here? I am also still on slack. so if there are any questions, feel free to ping me directly (nic is also remoteclient).
@remoteclient sorry I'm currently completely snowed under trying to complete my current project before I leave my current company in 3 days... Once I've finished and moved to the new company I'll certainly get involved here.
@remoteclient @BonnieDoug Could you check if https://github.com/api-platform/core/pull/2679 fixes your problems?
@teohhanhui I did a composer update
and cleared the cache. I am now on APIP 2.4.2. If this includes the patch, the issue seems not to be fixed.
@remoteclient You have to use the correct branch from my fork, as the PR is not merged yet. :)
@remoteclient The issue is actually https://github.com/api-platform/docs/pull/779
So the issue seems to be fixed. There was a change in the behavior in apip 2.2 but due to a bug it was working like before. After changing <collectionOperations>
to subresourceOperations
on the subresource it is working like before.
I have a pet owner:
And there is a subresource (pets belong to the pet owner):
The serialization groups of the pet entity is:
After the update to APIP 2.4 I only get the iris and the types of the pets. The properties are not serialized anymore. Now the serialization group of the entity level (
mws_nc_pet_read
) is assigned to serialization instead of the one of the operation level (mws_nc_pet_list
).So what I get ist:
Before the update I got:
Another one is that a change one serialization group it took effect immediately in dev environment. Now I have to clear the cache to see the changes.