1015 search results for API Platform

Yo @TristanoMilano! Where does that error come from exactly - what's the stack trace? It might be from this line - https://github.com/api-platform/core/blob/main/src/Symfony/EventListener/WriteListener.php#L116 - but ...
weaverryan
weaverryan
Read Full Comment
... with `PUT` ? Things work as expected? But as soon as you change to `PATCH` it always creates a new object? That's possible - but it would be surprising. The logic for that is in the normalizer - https://github.com/api ...
weaverryan
weaverryan
Read Full Comment
... //github.com/api-platform/core/blob/main/src/Symfony/EventListener/DeserializeListener.php#L98-L101 The problem is that, if your "resource class" for this operation is `User` and it doesn't have a `firstName` property, then that ...
weaverryan
weaverryan
Read Full Comment
Hey @Oleh-K! Ah, you're right! I was assuming too much! The APIPlatform Symfony integration references those variables at compile time (like you said). That would need to be fixed inside API Platform, but actually, I ...
weaverryan
weaverryan
Read Full Comment
... :). If you haven't done it already, `password` will need a validation group to be added - https://symfonycasts.com/screencast/api-platform-security/validation-groups - so that it isn't always required. This may or may not be your issue, but I wanted to mention it :). Cheers!
weaverryan
weaverryan
Read Full Comment
Hey @Tobias-B! Your thinking on this is absolutely correct. For me, it was a trade-off between complexity (the API Platform official way is more complex) vs potential performance problems. So, the final decision is ...
weaverryan
weaverryan
Read Full Comment
Just to give some feeback, i've found a solution that works, but not really sure if it's a hack or the correct way to go. https://github.com/api-platform/core/issues/5451 ``` api_platform: mapping ...
... did not described in API=platform docs and i don't know how to fetch collection assigned-related to user with this JWT token. You told that in security: possible to write user check, but how?
... last paragraph, don't konw why I did not think about that!, I'm doing exactly the same when a `B` resource is created so Api Platform will return the IRI for the newly created resource. (that works!) - Using that idea ...
donwilson
donwilson
Read Full Comment
Using the latest Symfony binary and following along the tutorial for API Platform (which is still based on Symfony 4/5), I get the following error: ``` >bin/console make:entitiy In SecurityExtension.php line ...
... i could not find any proper info about it ( not in the docs at least), is it possible to have more info about it? We're' going to make a tutorial for API Platform 3 before the year is over - it's one of my top ...
weaverryan
weaverryan
Read Full Comment
Hi Alex T.! I think I understand! I believe what you are asking about is covered in this section - https://symfonycasts.com/screencast/api-platform-security/validator-logic - and the answer is "do this with a validator ...
weaverryan
weaverryan
Read Full Comment
... where it shoud be. Of course, I changed all else from DailyStats to DailyStat. API-Platform by default seem to assume that ApiResource name are singular and automatically pluralizes it to get the name of the collection query. As it got queries with the same name, it dropped one of them. Or so I believe.
Bernard A.
Bernard A.
Read Full Comment
Hey Benoit L.! Sorry for the slow reply! > [Web Server ] [26-Mar-2022 19:32:57 UTC] PHP Fatal error: require(): Failed opening required 'C:\wamp64\www\api-platform\start/vendor/autoload.php' Hmm. This looks like you ...
weaverryan
weaverryan
Read Full Comment
... https://symfonycasts.com/screencast/api-platform/relations-iri#comment-5391015233 Anyways, I know those links aren't terribly specific, but let me know if they help :). Cheers!
weaverryan
weaverryan
Read Full Comment
... provider not return array of entities. What is the best solution for this ? PS. I'm not using custom controller with invoke method because I will lose some features of api platform. In my data provider I support filters and so on.
(base) shubham@Shubhams-MacBook-Air API-Platform % ./bin/console doctrine:database:create In AbstractMySQLDriver.php line 115 ...
CloudCreators
CloudCreators
Read Full Comment
Hey @Arthur! Excellent! I would say that the best practice is to use an extension when you're able to because. This is a "smaller" hook: you're letting API Platform do its custom logic, and you simply modify the query ...
weaverryan
weaverryan
Read Full Comment
... Laminas\Code\Generator\ClassGenerator $classGenerator), because class Zend\Code\Generator\ClassGenerator is not available in /home/atournayre/PhpstormProjects/code-api-platform/start/vendor/symfony/proxy-manager-bridge ...
atournayre
atournayre
Read Full Comment
... or implement the remaining methods (Symfony\Component\Security\Core\User\UserInterface::getUsername) in /mnt/c/laragon/www/api-platform/src/Entity/User.php on line 13` This is because the method getUsername was ...
André P.
André P.
Read Full Comment