1015 search results for API Platform

Sorry, but if I don't want just to hide the uncaught exceptions inside a logger?For example it could be thrown an AccessDeniedHttpException which would not be catched by API platform. What should I do in this situation?How I can handle it? ...
So if I see this right zenstruck/foundry acts as a replacement for the hautelook/AliceBundle dependency which is currently incompatible with api-platform 2.5.7? And is there a reason why zenstruck/foundry and the doctrine-fixtures-bundle isn't just a require-dev dependency? ...
Hey Guido! Not in this tutorial - DTO's aren't really related to Doctrine - they are more important depending on *how* you want to use them - like DTO's in the form component or DTO's with API Platform. What is your interest with DTO's? Cheers! ...
weaverryan
weaverryan
Read Full Comment
I think Hans Grinwis just nailed the answer :). If you have a "title" argument to the constructor, then it IS something you can set on CREATE, because API Platform will use your constructor. But if it has not setter, then you cannot update it. Excellent catch on that! It's a feature, but it *is* subtle. ...
weaverryan
weaverryan
Read Full Comment
... was expected. api-platform/core v2.5.5 symfony/http-client v4.3.11 symfony/http-foundation v4.3.11 symfony/http-kernel v4.3.11 symfony/phpunit-bridge v5.0.8
CISVHenriksen
CISVHenriksen
Read Full Comment
... () must be an instance of App\\Entity\\User, null given, called in /Users/hannah/PhpstormProjects/api-platform-security/src/Serializer/Normalizer/UserNormalizer.php on line 104" ` UserResourceTest::testCreateUser also fails with the same Error. I'm confused :) ...
Hannah R.
Hannah R.
Read Full Comment
Hey Daniel S. Thanks for reaching us. We are very glad that you appreciate our courses. Unfortunately I can't give you any ETA on Api platform part 3 so stay in touch and looking for updates. While waiting it I'd recommend to check out our newest Symfony 5 tutorials. Cheers! ...
Hey ahmedbhs! Sorry for the late reply! Yes, this should indeed be possible :). In API Platform, they use their own custom Client service (as you've noticed). But *inside* that services is the "normal" one. So, try ...
weaverryan
weaverryan
Read Full Comment
... Ohh I wasn't aware of that. Hmm, maybe this chapter can help you https://symfonycasts.com/screencast/api-platform-security/resource-metadata-factory Ryan shows how you can modify the metadata of your endpoints, it requires some work but I think that's what you need Cheers!
MolloKhan
MolloKhan
Read Full Comment
Hey man, Good observation. Hashing the password and adding roles is a job you have to do and has nothing to do with ApiPlatform. Ryan talks more about that in the next course: https://symfonycasts.com/screencast/api ...
MolloKhan
MolloKhan
Read Full Comment
Hi! I have an angular frontend aplication with is hosted on other server, so there is no way to read cookies set to httpOnly: true. As far as i understand CSRF is not available then? Or I could do some configuration in API platform to anable this? Thanks in advance. ...
Viktoriia K.
Viktoriia K.
Read Full Comment
Hey Abdelkarim, Yeah, more info about it: It seems access_control was replaced with security. see their changelog: https://github.com/api-platform/core/blob/master/CHANGELOG.md#250-beta-1 So, if you replace "access_control" with security in User object - it should pass :) Cheers! ...
Hey Abdelkarim, Yes, the new minor version of "api-platform/core" causes it to fail. If you downgrade it to "2.4.*" - it will work. So, it sounds like a BC break in 2.5.* but I'm not sure what exactly causes it though. Cheers! ...
Hi, i have lots of properties i need to make immutable but i also need to use the SerializedName() to alter the camelcase that API Platform generates. When i remove the setter the property disappears completey from the POST even though it's still in the group. Any ideas how i can achieve this? Thank you ...
Hey truuslee That's a tricky one, you made me dig but didn't find anything out of the box. In this thread they recommend to create a custom normalizer for such cases. https://github.com/api-platform/core/issues/244 I hope it helps. Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
Hey Startchurch! Hmm, excellent question :). Yes, this is the correct place. Well, of course, anything is subjective - but if you asked Kévin Dunglas, he would agree with using a data persister for this - https://github.com/api-platform/docs/issues/866 Cheers! ...
weaverryan
weaverryan
Read Full Comment
... I'd like to interact with 3rd party services like Stripe. I'd be creating accounts, payment profiles, charges etc. Is Data Persister the best place to put that sort of logic in API Platform? The only other option seems to be events. Thanks for the great tutorials!
Startchurch
Startchurch
Read Full Comment
Hi Tobias I. , Personally, for fields like createdAt and updatedAt I choose to use Doctrine Lifecycle Callbacks: https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/events.html#lifecycle-callbacks For author, api-platform already handle it if you give the author IRI to the POST/PUT endpoint. ...
... Hi, I'm very happy about this course. I'm wondering if there is any recommendation which frontend framevork is best (easiest) to use with the Api platform. And I wonder if one particular frontend framevork will be used in the following courses and which one?
Thanks Diego! Sorry, I removed by comment because I didn't see your answer! :/ I managed to find a solution before seeing your comment and it seems that you were right. I posted the whole solution here: https://stackoverflow.com/questions/56793777/how-can-i-use-api-platform-filters-in-yaml Maybe it will help others. ;) ...