1026 search results for API Platform

... - is probably to use a Doctrine listener - like we do here - https://symfonycasts.com/screencast/api-platform-extending/post-load-listener. Other solutions involve adding a listener - https://symfonycasts.com/screencast/api ...
weaverryan
weaverryan
Read Full Comment
... ``` Call to a member function is() on null ... if ($user->is(Utente::ROLE_ADMIN)) { ``` That is correct cause there is no user BUT ... should API platform stop my request BEFORE the Extension be applied? If I perform ...
Gianluca-F
Gianluca-F
Read Full Comment
I had always problems to start chapter 2 of api platform tutorial because of issues during instalation of this project. Now i using a 8.1 version of php on Ubuntu and after read all comments i think the simplest ...
kkedzierski
kkedzierski
Read Full Comment
Cart API Data

... current user's session. By the way, the cart data itself is also stored in the session instead of the database. That fact is completely not important for us in Vue. I just mention it in case you're an API Platform geek ...

5:58
404 On Unpublished Items

... fix this? Well... just like how there's a QueryCollectionExtensionInterface for the collection endpoint, there's also a QueryItemExtensionInterface that's used whenever API Platform queries for a single item. You can ...

8:00
Serialization Tricks

... few minutes. The point is: the serializer was able to create our object. Next: To help us while we're developing, let's add a rich set of data fixtures. Then we'll play with a great feature that API Platform gives us for free: pagination

5:15
Pagination Context

... parameter directly because API Platform already has this info! Where? It's hiding in a service called Pagination: a service that we can autowire. Add a second argument to DailyStatsProvider: Pagination - the one from ...

7:09
... thinking about creating a new entity with customer ids and brand ids together in a 'cross' table. But i hope there is a better way? Hmm. Ideally we can avoid adding duplication to our database to make API Platform happy ...
weaverryan
weaverryan
Read Full Comment
Blog
2023 A Year in Tutorials Open Source

... surprisingly LAST Stack and API Platform episode 3 are 6th and 8th. How long does it take to make a tutorial? Great question! The biggest variance depends on research. Yup, sometimes I have a lot to learn before hitting ...

Hello! Is it possible to have 2 types of tokens in the same app, in API Platform 3 : - a jwt token for the users: this is a 'user specific' token. A user gets a jwt token from the server after successful ...
I am still having one little issue with that approach, The response is fine, but how do I tell API-Platform to show the correct Schema? I want to show the same Schema, that is auto-generated with every GetCollection ...
TristanoMilano
TristanoMilano
Read Full Comment
... normally be statically defined in every class inside the #[ApiResource] attribute. In your course "API Platform 2 Chapter 27" the system is used to dynamically set the normalization context instead of having to define it ...
... Hey @Auro! > In this chapter you are talking about the DTO solution, are you going to do a course to explain how it works in Api Platform v3? Yes! But not until episode 3 so we can give them proper attention ...
weaverryan
weaverryan
Read Full Comment
... collection system by using its same logic https://github.com/api-platform/core/blob/9b4b58ca0113a2645b58a116fe9e4bf200df8aa3/src/Serializer/AbstractCollectionNormalizer.php#L53 B) At this point, your normalizer should be ...
weaverryan
weaverryan
Read Full Comment
Hey Marko! Weird! The error comes from this class - https://github.com/api-platform/core/blob/main/src/Symfony/Routing/IriConverter.php - unfortunately that exact error wording is used 3 times in that file, so it's ...
weaverryan
weaverryan
Read Full Comment
... this is a more custom source, I haven't done this yet, but you can look at how the ORM pagination works. The process is: A) `CollectionProvider` is the provider used for the ORM: https://github.com/api-platform/core ...
weaverryan
weaverryan
Read Full Comment
**DISCLAIMER** I'm no by no means a pro with api-platform and symfony, so excuse me if I'm incorrect and do correct me if possible. However after spending 3 hours digging through 7 concrete validator classes that ...
... table - where would it live in the hierarchy? I suspect the problem I encountered with paths using slugs might be an API platform bug (or user misuse). It doesn't work as I expect with non-composite keys either. If I ...
... this was not an accident, and it touches on a cool thing with API Platform / Symfony;'s serializer. If you have a `$title` constructor property, then you do NOT need a `setTitle()` method to make it writable. However, if ...
weaverryan
weaverryan
Read Full Comment
... what Api Platform does for its own validation layer: https://github.com/api-platform/core/blob/10827bb570c44cdee2c1bb7a307a8a18df9b4f00/src/Core/Bridge/Symfony/Validator/EventListener/ValidateListener.php#L85-L89 Let me know if that helps! Cheers!
weaverryan
weaverryan
Read Full Comment