... - 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 ...
...
```
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 ...
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 ...
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 ...
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 ...
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
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 ...
... 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 ...
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 ...
... 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 ...
... 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 ...
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 ...
... 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 ...
**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 ...
... 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!
1026
API Platform
Filter Results