Definitely! We'll cover the new way of doing things soon in an API Platform v3 version of this tutorial :). Things are actually MUCH nicer with DTOs in API Platform 3 - I never liked this data transformer business all that much.
Thank you for your help |mention:213| ,
For the first point i've open an issue
https://github.com/api-platform/api-platform/issues/2411
For the second one, I will wait for the episode 3. I'm already using state providers and it works…
…upcoming API Platform tutorials. If you want to allow your users to "log in" via some social service, I'd check out https://github.com/knpuniversity/oauth2-client-bundle. I don't think adding social auth will have much to do with API Platform or…
hey, can this tutorial works for Symfony 5.4 & API Platform 2.7 ?
It actually worked with a custom normalizer. According to API Platform doc, unlike event system, normalizers & denormalizers are GraphQL friendly
Hey Michal!
Hmm. The problem is that API Platform 3 requires Symfony 6. So if you're using API Platform with Symfony 5, then I think you're using version 2.7, not 3. However, 2.7 and 3.0 are identical, except that deprecated…
Hi! Is this course going to be divided into 3 parts just like api platform 2? [base, security, custom resources]. I also have more questions. Are you going to cover Mercure? When are you going to release all 3 parts (I read comment from SC…
…6 and API-Platform version 3. If I am right, the "Data Persister" is changed to "Processor" and the code is a little bit different. You can see the documention here: [https://api-platform.com/docs/main/core/state-processors/](https://api-platform.com/docs…
Probably the answer to my question is to use a `PlainIdentifierDenormalizer`
I'm trying to follow this example: https://api-platform.com/docs/core/serialization/#denormalization
es:
```
class PlainIdentifierDenormalizer implements ContextAwareDenormalizerInterface, DenormalizerAwareInterface
{
use DenormalizerAwareTrait;
private $iriConverter;
public function __construct(IriConverterInterface $iriConverter)
{
$this->iriConverter = $iriConverter…
…api_platform:
enable_swagger: false
enable_swagger_ui: false
```
I believe the difference between those two options is that the UI prevents the HTML version of the page being loaded, but `enable_swagger` controls if you could see the JSON version of the "open api…
Thanks for posting your solution kkedzierski! We're going to update this tutorial for API Platform 3 soon, but in the mean time, this is very helpful!
Got it working:
MongoDB example:
`
App\DataProvider\TestDataProvider:
arguments:
$collectionExtensions: !tagged api_platform.doctrine_mongodb.odm.aggregation_extension.collection
```
/**
* {@inheritdoc}
*/
public function getCollection(string $resourceClass, string $operationName = null, array $context = []): iterable
{
$queryBuilder = $this->testRepository->createAggregationBuilder();
foreach ($this->collectionExtensions as $extension) {
$extension->applyToCollection…
hallo i would like to know wich is the best way to clean input field using api platform, according to this https://github.com/api-platform/api-platform/issues/1089 has been told to take care of cleaning the values before sending to the client…
I solved my problem by looking at this little tip that I had missed: https://symfonycasts.com/screencast/api-platform-security/query-item-extension
Hi
A couple of things:
First, I work mostly with graphql on API-Platform and would appreciate if you create a specific tutorial for that.
Secondly, with API-Platform graphql, I would normally do this type of customization per/post persist on the stages.
Is…
Hey there, you used bind instead of arguments when injecting
api_platform.doctrine.orm.default.item_data_provider service
, it was for a reason, is it a good practice ?
Hey Jeremy Pasco!
> The stateless attribute I changed was in api_platform.yaml
Ah! I actually didn't know about this option! It looks like it comes from v2.6. This causes the routes defined by your API to be "stateless", which *prohibits* the…
Hi,
I faced the same issues mentioned below and in the previous video whereby I had to specify api-platform/api-pack "1.2.0" and doctrine/doctrine-migrations-bundle "^2.0" and now I'm getting a connection refused error when running ./bin/console…
I solve the problem by using code in finish directory
https://github.com/atournayre/symfonycasts_code_api_platform-_security/commit/be777c3e70cdf652faaf76643b43eb8e74a45b75
- copy bin/phpunit, composer.json, composer.lock and phpunit.xml.dist from /finish
- composer install
- php bin/phpunit
Hello ! Do you recommend working with this "generator" on every project with API Platform? Do you ?
Does it cover all the needs that we might have during development? I have heard of "SubResources", I never used them, but if I were to use it, would…
x
1000+