1025 search results for API Platform

... as $item) { $this->tags->add($item); } return $this->tags; } ``` As I use serializer to return an API response, using API Platform, there was an issue returning``` return new ArrayCollection ...
... is going on here... but it's still "fuzzy" to me - I need some more details. Without any special setup, your object should be validated exactly the same whether it's submitted through a form or through API Platform. The ...
weaverryan
weaverryan
Read Full Comment
... (just as you've done) to change the `window.location`. Here's some info about returning this response - https://symfonycasts.com/screencast/api-platform-security/login-response#codeblock-d462cd0049 - I also think it ...
weaverryan
weaverryan
Read Full Comment
... could probably easily use this to solve your issue. But, how to hook into API Platform so you can add this option? The answer (I believe) is via a context builder - https://api-platform.com/docs/core/serialization ...
weaverryan
weaverryan
Read Full Comment
68 lines | webpack.config.js
var Encore = require('@symfony/webpack-encore');
Encore
// directory where compiled assets will be stored
.setOutputPath('public/build/')
// public path used by the web server to access the output path
.setPublicPath('/build')
// only needed for CDN's or sub-directory deploy
//.setManifestKeyPrefix('build/')
/*
* ENTRY CONFIG
*
* Add 1 entry for each "page" of your app
* (including one that's included on every page - e.g. "app")
*
* Each entry will result in one JavaScript file (e.g. app.js)
* and one CSS file (e.g. app.css) if you JavaScript imports CSS.
*/
.addEntry('app', './assets/js/app.js')
//.addEntry('page1', './assets/js/page1.js')
//.addEntry('page2', './assets/js/page2.js')
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
.splitEntryChunks()
// will require an extra script tag for runtime.js
// but, you probably want this, unless you're building a single-page app
.enableSingleRuntimeChunk()
/*
* FEATURE CONFIG
*
* Enable & configure other features below. For a full
* list of features, see:
* https://symfony.com/doc/current/frontend.html#adding-more-features
*/
.cleanupOutputBeforeBuild()
.enableBuildNotifications()
.enableSourceMaps(!Encore.isProduction())
// enables hashed filenames (e.g. app.abc123.css)
.enableVersioning(Encore.isProduction())
// enables @babel/preset-env polyfills
.configureBabel(() => {}, {
useBuiltIns: 'usage',
corejs: 3
})
// enables Sass/SCSS support
//.enableSassLoader()
// uncomment if you use TypeScript
//.enableTypeScriptLoader()
// uncomment to get integrity="..." attributes on your script & link tags
// requires WebpackEncoreBundle 1.4 or higher
//.enableIntegrityHashes()
// uncomment if you're having problems with a jQuery plugin
//.autoProvidejQuery()
// uncomment if you use API Platform Admin (composer req api-admin)
//.enableReactPreset()
//.addEntry('admin', './assets/js/admin.js')
;
module.exports = Encore.getWebpackConfig();
See Code Block in Script
... The data provider is only called to "fetch" the "top-level" resource. In this case, the "Service" object. Once that has been fetched, even if you exposed a "mediaObject" field, API Platform simply calls `$service ...
weaverryan
weaverryan
Read Full Comment
Hello @weaverryan ! Thank you for answering all my questions, it's great! So, for this problem, Since then, I have advanced (and finished) in API Platform training, suddenly the code is not the same. But off the top ...
... topic in general doesn't really relate to API Platform - it's more of a Symfony security setup. This bundle - https://github.com/dunglas/DunglasAngularCsrfBundle - which doesn't work for Symfony 5 (as the author is mostly ...
weaverryan
weaverryan
Read Full Comment
... ": "Paginator", "class": "Doctrine\\ORM\\Tools\\Pagination\\Paginator", "type": "->", "function": "getIterator", "file": "C:\\CODES\\FORMATION\\TutoModuleComment\\vendor\\api-platform\\core\\src ...
... 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
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
... 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