1025 search results for API Platform

... - 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 ...
... use Api Platform (sometimes i regret it ^^). The putenv error only appears in prod mode on my server. In dev mode I can get to the fronthome but absolutely no requests are accepted. When I'm at "https://WWW.mydomain.fr" I ...
Jean-tilapin
Jean-tilapin
Read Full Comment
Hey @Someswara-rao-J! Hmm. Did you create an access token authenticator like we did? https://symfonycasts.com/screencast/api-platform-security/access-token-authenticator If so, here is what I would do to debug ...
weaverryan
weaverryan
Read Full Comment
... since that would, again, be associated with 2 fields on "companies"? PHP 8.1, Symfony 6.1, API Platform 2.8, doctrine-bundle 2.7, MySQL 8.0.26 I'm using uuid_binary in this case, because it's a Type 4 UUID. I'm aware of ...
... exception". This is expected, and it results in a 400 error. I use the term "type validation" for this - https://symfonycasts.com/screencast/api-platform-extending/type-validation Let me know if that makes sense. From ...
weaverryan
weaverryan
Read Full Comment
... API Platform, so I still struggle with this decisions because I may not be thinking of the trade-offs in the long term due to my inexperience. What is your opinion regarding this? Thank you!
André P.
André P.
Read Full Comment
... ) a query parameter which is used to (B) change the query that's used when fetching the top-level collection (the Activity objects in this case). We cover that here: https://symfonycasts.com/screencast/api-platform-extending/entity-filter-logic Let me know if this helps! Cheers!
weaverryan
weaverryan
Read Full Comment
... groups of users will be using different sections of the system. I think these topics may be good to help beginners get started on Microservices with Symfony: - Create a few individual services in Symfony (or API Platform ...
Kibria A.
Kibria A.
Read Full Comment
... some general things from, but it's starting to show its age. Our much newer tutorial about API Platform is another great option and can get you set up faster. Though, this tutorial teaches you many "lower-level" things ...
weaverryan
weaverryan
Read Full Comment
I really really like symfony and api platform. But i have a weird challenge. (i've never installed anything on a linux machine before, so bear with me please AND i am a newbie to symfony 4). We have a new Azure server ...
... //.enableIntegrityHashes() // uncomment if you're having problems with a jQuery plugin //.autoProvidejQuery() // uncomment if you use API Platform Admin (composer req api-admin) //.enableReactPreset ...
Jean-tilapin
Jean-tilapin
Read Full Comment
75 lines | webpack.config.js
var Encore = require('@symfony/webpack-encore');
// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}
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 your 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
.configureBabelPresetEnv((config) => {
config.useBuiltIns = 'usage';
config.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(Encore.isProduction())
// 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
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