Category: rest

api platform: Error (null) Backend fetch failed

We use symfony with the platform api in docker and we have a problem with varnish. For local development varnish works with the default.vcl configuration file (https://github.com/api-platform/api-platform/blob/master/api/docker/varnish/conf/default.vcl). When uploading to the server, varnish provides the error “Error (null) Backend fetch…

Notice: Accessing static property PhpArrayAdapter::$valuesCache as non static, when try to get a collection of data using api platform

I’m using symfony and api pplatform, and I have a problem getting a collection of data using GET operation on user entity with Api Platform. First it was working on a branch with other operations, after I did the merge…

How to configure different prefixes for different bundles in api-platform

Console command debug:router show absolutely ALL resources, from all installed Bundles (entity marked with @ApiResource()) How to configure different prefixes for different bundles? Or selectively disable resources. App ignored any path in resource: config/routes/api_platform.yaml api_platform: resource: . type: api_platform prefix:…

How to set normalization groups based on user’s role and request method

I am creating a sandbox app as Api-platform practice and I have the following problem to address: Let’s consider following REST endpoint for user entity: DISCLAIMER in the code examples there are a little more attributes but the whole concept…