... api-platform-extending]$ php bin/phpunit --filter=testGetUser
PHPUnit 8.2.5 by Sebastian Bergmann and contributors.
Testing Project Test Suite
F 1 / 1 ...
Hey @ToNy!
I think I understand and it seems reasonable. But it can be tricky to pull off. We talk about something kind of similar in an API Platform 2 tutorial - https://symfonycasts.com/screencast/api-platform2 ...
And here is another question from me on a sunday. I hope you don't mind. I'm pretty exited about api platform and can't wait to dazzle people with it.
Case:
A user has many cheeselistings.
Api platform gives me the user ...
... API Platform 2, subresources are very limited. They're easy enough to use... but super hard to customize. I almost always recommend avoiding them (e.g. instead of /api/users/locations do /api/locations?user=). That's not ...
Yes, I never get the correct IRI.
When using api-platform version 3.1, I got: "../словник" instead of the IRI,
when using api-platform version 3.2.2, I got: "path/실례.html".
I've tried other versions and had same bug in every embedded relation. ...
Thank you for your help |mention:213| ,
For the first point i've open an issue
https://github.com/api-platform/api-platform/issues/2411
For the second one, I will wait for the episode 3. I'm already using state ...
... news inside API Platform?
Yup :). It's high on my list to get a new series re-recorded using fresh API Platform 3!
Cheers!
Hey @Mykyta!
This stuff can be tricky - especially with slight changes in the new versions of API Platform. API Platform 2.6 "should" still work like the tutorial, but sometimes there are subtle changes.
Anyways ...
Hey MolloKhan
What I actually meant was if it was possible to somehow grab the API Platform error responses that already exist instead of creating our own.
Does that make any sense?
What you suggest (I actually already tried it) is to create our own "mimicking" the API Platform one, is that right?
Thank you! ...
Hi there !
I am about to implement file upload in my API Platform software. What do you advise me :
1. Implementing the file upload as described in this course
2. Or going with VichUploaderBundle as mentioned in Api Platform documentation ?
Thanks ! ...
... 1` https://github.com/api-platform/api-platform/issues/1718
The version for code example to this tutorial for SF5.1 works as expected.
... Hey Matias
I've copied 1:1 the entity code of the tutorial and cleared the cache. Also when I create a new field in the entities the API platform doesn't show this field. But it's only my testing app. Now I build my first app with the API platform and I hope there it works fine. ;-)
Hey Michael! My first guess would be a problem with API platform itself! If clearing the symfony cache doesn't fix it, then may be you have made some changes to the Entities yourself and API platform is not exposing that particular field? Let me know if any of this makes sense! ...
Hey Edgar
This is a good question! As I know API platform doesn't support versioning yet. There are some issues on github related to this issue, also one pull request to docs describing their position, but it's not merged yet. https://github.com/api-platform/docs/pull/452
Cheers! ...
Oh really? That's the problem? Wow, it would be nice to spot the BC break change. If you want to go one step further you could open up a new issue on the ApiPlatform project https://github.com/api-platform/api-platform
Nice job! Cheers! ...
Hi there,
Great course!
I was wondering, all this course is about interacting with entities, but is there a way to use API Platform on classes that do stuff? I mean, let's say I have a Helper with a bunch of methods for calculations is there anyway to add API Platform endpoints for that as well? ...
Hey JulienG
In that case what you are looking for is "voters". In this chapter you can see a good example of how to implement them with ApiPlatform https://symfonycasts.com/screencast/api-platform-security/access ...
Hey Evelair,
I just double-checked it for you: downloaded the course code and checked the installed version of API Platform in composer.lock - "api-platform/core" package is locked on v2.4.3 ...
If you are using the downloaded code as I am, you can update only the api-platform/core package to 2.5.0 (compser update api-platform/core). And if you are using PHPStorm (You should), exlude the "tutorial" directory. IDE will include the proper use statement when extending from ApiTestCase. ...
The PR you mentioned has been merged and released in v2.5.0 of api-platform: https://github.com/api-platform/core/pull/2992, and it seems that all it takes to switch to the fixed method is to use `security` instead of `access_control` in annotations. ...
1026
API Platform
Filter Results