1015 search results for API Platform

Field Security with Patch

... deserialization, our security expression is returning false! The reason is... arguably a bug: I have an issue open on API Platform. When you make a patch() request, our data provider first loads the object from the ...

6:17
Entities DTO's The Central Object

... like POST and PATCH, just aren't designed to work out of the box with this entityClass solution. The reason... is a bit technical, but important. Internally, for every API request, API Platform has a central object that ...

6:24
Embedded Relations

... context options that are set by API Platform. These control certain internal behavior. Next: let's get crazy with our relationships by using a DragonTreasure endpoint to change the username field of that treasure's owner. Woh. ...

5:58
... API Platform docs: https://api-platform.com/docs/v2.1/core/jwt/#jwt-authentication However, I want to replace the local username / password authentication with a call to AWS Cognito AND include some of the Cognito ...
... really don't understand, but I'm happy i've got it working. Maybe it has something to do with api platform config. But i cannot think of something.
... might need to take some inspiration from what the ElasticSearch implementation looks like in Api Platform. Of course, you could always create a traditional endpoint that returns the results... e.g. just query for the array ...
weaverryan
weaverryan
Read Full Comment
... object/data? A dd doesn't do anything on the API Platform. I'm surprised a dd() doesn't trigger anything: that *should*. As long as you have the validation annotation above a property or class (more info about this below ...
weaverryan
weaverryan
Read Full Comment
Hello, Not sure if it's best here or in the part 2, but i'll take my chances 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 ...
laferte_tech
laferte_tech
Read Full Comment
I have a question how can we have a multi level child parent entity in one table in api platform!!! It does not show the relation when i create it in one table!! I have implemented the one to many!! This is just when ...
Hazhir A.
Hazhir A.
Read Full Comment
... successful upload I store the filepath into a mapped one. I have a bunch of such entities. Some of them have multiple files with different validations. Now I move my application to api platform and if I understood ...
... good because for example change the status of 200 notifications it will take some time In this case (or any case where it may actually take some rime to do the work you need to do), I would leverage Symfony Messenger. API ...
weaverryan
weaverryan
Read Full Comment
... - https://symfonycasts.com/screencast/api-platform-security/query-extension - that allows the URL to be `/api/posts`, but really, we are filtering in whatever way we want. What really makes this work is your logic in the ...
weaverryan
weaverryan
Read Full Comment
... api platform, nothing else. I just now created a RelationItemDataProvider for testing. In there in the function getItem() i put a `print_r($identifiers)`. The variable $identifiers has 'M2M20180621164125617383' as ...
Provider Transforming Entities to DTOs

... $entities variable is actually a Pagination object. Now that we're just returning an array, it makes API Platform think that we don't support pagination. The solution is dead-simple. Instead of returning $dtos, return new ...

4:47
DTO Class Organization

It took some work - especially getting the update to work before API Platform 2.6 - but our input & output DTO system is alive! Though... our logic for converting from CheeseListing to input, input to CheeseListing and ...

5:12
Input Data Transformer

... isPublished to false in CheeseListingInput: Ok, one more time. And... yes! A 201 status code. It worked! So using a DTO input is a 3-step process. First, API Platform deserializes the JSON we send into a CheeseListingInput ...

4:24
Filter Class Arguments

... $throwOnInvalid API platform does a cool, but kind of strange thing: if you pass an arguments option to a filter, it tries to pass that argument - by name - to the constructor of your filter. Check it out: in DailyStatsDateFilter ...

4:26
Leveraging the Doctrine Data Provider

... getCollection(): it creates a query builder and then loops over something called the "collection extensions". This is the Doctrine extension system in API Platform, and these extensions are actually what is responsible for ...

5:27
Calling the Controller View Event

... extensively inside API Platform. Internally, their controllers return objects. Then, they have a listener - actually a few that work together - that transforms that object into JSON, XML or whatever format the user is ...

5:20
Bootstrapping a Test Suite

... --env=test: Repeat that same thing with the doctrine:schema:create command: Perfect! Next, Api Platform has some really nice testing tools which... aren't released yet. Boo! Well... because I'm impatient, let's backport those new tools into our app and get our first test running.

4:29