Hey Victor,
Great tutorial - BTW :)
I'm using version 2.5.7. When you follow methods path you'll end up here: https://github.com/api-platform/core/blob/37b5edf50cc05299b12cb8982be3efa035d726ce/src/DataProvider/Pagination.php#L249 - so page number is actually taken from the context.
…this tutorial? Because I have been reading the API Platform documentation and I have seen that it is quite different, I have also been watching this tutorial and I have not found a way to use it correctly in the context of API Platform, also…
…of these classes. I believe you *are* using API Platform 2.5, which is why you're having the issue. So, you can make your life simpler by not copying any of those files and extending the ApiTestCase directly from ApiPlatform :).
But, to your specific…
…here - https://github.com/api-platform/core/issues/1482 - which uses a custom operation. This looks valid, though I'm not sure if there might be a better solution. My initial thought would be to create a totally custom API resource class with only one…
I have completed this courese. Thnks there for your good company.
Also plant to take other course in the series.
I am looking for some open source projects using api platform.
can anyone suggest ?
Hey Daniel W.!
Are you looking for this? https://symfonycasts.com/screencast/api-platform-security/query-extension
Let me know!
Cheers!
Nope =) The idea is not to hide the Uncaught exceptions messages, but to handle them. Maybe I should create an Exception Listener and then catch any Uncaught Exception here. Cause API platform does not catches an AccessDeniedException by default. Cheers!
Ah, good catch - you're totally right. Fixed! https://github.com/SymfonyCasts/api-platform/commit/3e214e50c5253805ed8cb122e4980a28729ad983
Thanks!
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?
Hey @Xav!
Nice job solving the issue!
> It's quite simple but I still have a lot of trouble understanding what is - or not - a "best practice" with Api Platform.
API Platform talks a lot about REST best practices. And so often, there are…
…only Vue with vuex, vue-router and vuetify): https://github.com/api-platform/core/issues/477#issuecomment-588902325
It's quite simple but I still have a lot of trouble understanding what is - or not - a "best practice" with Api Platform.
FOSRestBundle seems to be…
…Swagger is a Js library) https://api-platform.com/docs/core/swagger/#overriding-the-ui-template
2) How do you get custom JS onto the page? By overriding/extending the template that renders Swagger: https://api-platform.com/docs/core/swagger/#overriding-the-ui-template…
…create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading C:\Users\ack\PhpstormProjects\API-Platform-Training/vendor/composer/installed.json
Loading plugin Symfony\Flex\Flex
Downloading https://repo.packagist.org/packages.json
Writing C:/Users/ack/AppData/Local…
…problem with a compiler pass is that they are *really* meant to modify *services* that API Platform created, but not its config directly. It's not working because API Platform has already used its configuration by this point - so you're modifying it too late.…
…with a group that matches the "groups" option of the normalizationContext on your entity (if you have one, which we do in our project).
Let me know if this helps! And, of course, check out our API Platform tutorials to learn a ton more ;).
Cheers!
…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. …
…API Platform handles the request as PUT request. The error message is "Update is not allowed for this operation.".
There is an issue (https://github.com/api-platform/api-platform/issues/343) but with no solution -- actually sending "Content-Type: application/ld+json" instead of…
…into an Exception due to Unique-Key on `user_id` from OneToOne) instead of updating the existing one.
I know why, because I have no `@id` in my `settings` (https://api-platform.com/docs/core/serialization/#denormalization), but I think I don't need one…
…100% agree - ApiPlatform does SO much for you, that thinking about implementing a rich API manually feels crazy :). Btw, we *are* currently releasing the next tutorial, which will start to cover a lot of custom stuff - https://symfonycasts.com/screencast/api-platform-extending
> Right…
…logic? Or should I ditch API platform and just write everything myself?
Your linked articles to me look more like solutions for one-off problems rather than entire API. Overall, as I understand from the docs, writing any custom logic is discouraged with API platform…
x
1000+