FOSRestBundle's format_listener prevents http_basic challenge
I'm trying to setup my PHP/Symfony4/FOSRestBundle API to accept both JWT and HTTP-Basic authentication but the format_listener appears to be intercepting the UnauthorizedHttpException exception an...
View ArticleAll entities made by doctrine does not contains properties
good afternoon, I'm trying to use donctrine to make entities. My purpose is to make all the entities to generate the database from doctrine with a simple migration. My issue is that when i made my an...
View ArticleSymfony 4 autowiring argument not working
I'm trying to autowire the UrlGeneratorInterface into a DTO to use the generate method in my DTO,I have this in my DTO:namespace App\DTO; use JMS\Serializer\Annotation as Serializer; use...
View ArticleLoading user locale when logging in automatically with remember_me token in...
Using Symfony 4 I managed to have my users save their locale prefs in database and loading these when they "fully" log in (with login form).But I don't see how to load the user's locale prefs when...
View ArticleLogin dans symfony4.3.6 [closed]
Good evening or hello depending on the time you read this post! I have a big problem on symfony4.3.6 since already 2 days. in fact my login form does not pass every time I try to connect to my site...
View ArticleSymfony 4 Service Injection Too Few Arguments
In my Symfony 4 project I've created a HelloBlock class in the /src/Blocks/Hello/HelloBlock.php file.Here's its constructor...public function __construct(EntityManagerInterface $entityManager) {...
View ArticleDoctrine\DBAL\DBALException: Platform mssql does not support offset values in...
The error is pretty straight forward. I use Symfony 4 and MSSQL Server as a database server with below configuration: driver: 'sqlsrv' url: 'mssql://username:password@host:1433/db'The error happens...
View Articlehow to use form builder to make form from entity relation of entity in symfony4
TL;TR:How to make form fields from formbuilder with relation columnHere is my Level Entity<?php namespace App\Entity; use Doctrine\Common\Collections\ArrayCollection; use...
View ArticleWarning fsockopen() in Symfony 4
(sorry for my english ... i'm french)I'm using Symfony 4 and PHP 7.2.1 (the one in MAMP) and MySQL. My computer is an iMac with mac OS X HighSierra. The error message in var/log/dev.log is the...
View ArticleHow to enable cache in dev mode?
I'm working on a heavy-load Symfony optimization, trying out template cache, doctrine cache, etc. But unless I'm wrong, those caches are disabled in dev, so it's hard to evaluate the effect of those...
View ArticleSymfony4 - Refresh user roles on every request
I've faced with problem trying to implement simple autorization system in SF4.class User implements UserInterface { // some properties... /** * @var RoleGroup|null *...
View ArticleSymfony 4 Bundle: AuthenticationUtils but no such service exists
I'm trying to make a Bundle (Symfony 4) for managing users of all our projects and I'm having a problem.Cannot autowire argument $authenticationUtils of...
View ArticlePut environment in prod and remove the profiler Symfony 4
I am putting my website in production, but I have a problem with the environment.As you can see in the screenshot below, the site remains in "dev" modeHowever, I already modify my .env file as...
View ArticleSaml 2.0 Identity Provider with Symfony 4
I'am trying to implement an saml 2.0 identity provider with symfony, but can't decide which bundle to use, lightsaml seems to be used for Service providers, others like samplesamlphp or oneloginsaml...
View ArticleEncore webpack or assets generating wrong path to image in symfony 4
I am trying to learn to use encore webpack. Well, following this guideEncore + webpack + bootstrap sass and this guide Symfony 4+ enconre + Bootstrap 4 I got symfony to use the scss and js assets I...
View ArticleAssets not install in symfony 4
I read symfony documentation for Web Assets and create /assets directory in root of my project then run command php bin/console assets:install but get:[OK] No assets were provided by any bundle. I...
View ArticleSymfony 4, Doctrine and AWS RDS read replica usage
I'm about to embark on using RDS with a master read/write and slave read-only setup.I've read about the Doctrine MasterSlaveConnection type. However, there will be some endpoints I create that I would...
View ArticleI use vichUploaderBundle the error i get is Expected argument of type...
I have a product entity each product is related to a multiple images when i add a product with multiple images it work but if i remove a product i have a error in the delete function i have this code...
View Articlesymfony 4.0 failed to install assetic-bundle
I'm trying this new symfony 4.0, so I failed to install assetic-bundle, the command I usecomposer require assetic-bundle I got a set of problems :Updating dependencies (including require-dev) Your...
View ArticleSymfony 4 and webpack encore, looking for good practice when adding a CSS...
I'm on a Symfony 4 new project.Via yarn, I installed (by example) the CSS library animate.cssyarn install animate.cssFrom the webpack.config.js file, I added the animate.css file like that :...
View Article