…
Hmm. Is your frontend and backend on different domains? The Location header is set by our code when we log in - https://github.com/SymfonyCasts/api-platform/blob/export-cache-bug/src/Controller/SecurityController.php#L26
So, indeed, it does sound like a potential cors…
Hey Zongor A.
Unfortunately it's not possible by default as I know... but you can use custom operations or to achieve what you need. https://api-platform.com/docs/core/controllers/#creating-custom-operations-and-controllers
Cheers!
@weaverryan can you please answer this question?
https://stackoverflow.com/questions/66547232/how-i-can-resolve-502-bad-gateway-in-api-platform-custom-operation
…$someObject)`, API Platform looks at whatever class `$someObject` to find its `@ApiResource` configuration.
In your case, `$this->getUser()` is returning an instance of `Symfony\Component\Ldap\Security\LdapUser`. And so, API Platform looks at that class and tries to find the `@ApiResource` annotation, which of…
…been to move the API Platform route import to the bottom of the routes file. That would involve moving it out of the api_platform.yaml file - https://github.com/symfony/recipes/blob/master/api-platform/core/2.1/config/routes/api_platform.yaml - and…
…You said:
> Weirdly https://localhost:8000/api returns a slightly disfunctional version of my app's landing-page
What do you mean by a "slightly disfunctional version of my app's landing-page"? This shows your custom homepage and not the API Platform documentation…
…just watching videos as demo
I did copy and paste all code but no result
```
[kakhaber@localhost code-api-platform-extending]$ php bin/phpunit --filter=testGetUser
PHPUnit 8.2.5 by Sebastian Bergmann and contributors.
Testing Project Test Suite
F 1 / 1 (100%)
Time: 2…
…series !
Btw, does anybody knows if there's been a change with symfony 5.2 + api platform 2.6.2 ?
Because even though I *did* add the logout path in security.yaml and added the route inside the SecurityController (witch works fine for /login route)…
Yo Alexandr K.!
This is... unfortunately, not currently possible. But there is a good conversation about it and some ways to go about doing that here - https://github.com/api-platform/core/issues/2275
Cheers!
Thanks a lot for tutorials!
Really want to get know about how to combine Vue with Symfony Forms (maybe without API Platform, but with plain action with formView from controller) in proper way, and maybe how to compile Twig markup to Vue, so for example…
Hey Nestor B.
I think that's possible, you can configure your groups by entity like shown in this example: https://api-platform.com/docs/core/serialization/#using-serialization-groups
Cheers!
…ES with ApiPlatform but I found this in the docs:
https://api-platform.com/docs/core/security/#filtering-collection-according-to-the-current-user-permissions
It says that you should create a custom extension, so here is the link to it: https://api-platform.com…
Hey @Edgar!
This is a super weird error! These custom normalizers in api platform are tricky, because you need to make sure (after you do whatever modifications you need) that you call the Serializer system again so that the normal process can take place. The…
…Sridhar,
This is the 2nd tutorial, we created that User entity in the 1st one, exactly here: https://symfonycasts.com/screencast/api-platform/user-entity . We based the code of this tutorial on the finish code of the first tutorial, so it's like continuation…
…data, API Platform simply calls `$user->getComments()`, which returns all 50 results. To limit things, you can use this trick: https://symfonycasts.com/screencast/api-platform-security/filtered-collection#adding-getpublishedcheeselistings
Except that for performance (so you don't query for all 50 comments... only…
Hey Geoff Maddock!
I'm not sure of a workaround - here is the issue tracking this on API Platform: https://github.com/api-platform/core/issues/3590
Cheers!
…here. While my tests were working before, since i upgraded Api Platform to 2.5.9 (i think it's this one), it's not working anymore about authentification.
I tested 2 ways to create a User (one way with Foundry like it was before…
It was really difficult to come up with a working example because the documentation is not very clear on this issue and I am not that good with api platform yet so..., weaverryan what do you think of this solution? Do you have any suggestion…
…you!
I had a hard time to figure what was wrong with what I was doing. Actually, I didn't need the requestStack, but I needed to add "security_post_denormalize" in my Api Platform Configuration. Not sure I've understood why, though. Anyway, it…
…show the setup in the tutorial, but in the first chapter - https://symfonycasts.com/screencast/api-platform-extending/setup#project-setup - we mention that you should follow the README.md file in the code download to get things working. You might have just not seen…
x
1000+