Config firewall for API
I'm trying to develop an API with an authentication system. But the response of my default route / always display the source code of the Symfony default welcome page instead of no route found or...
View Articleexception id not found, dump show entity with isInitialized false and all...
I got a Cours (it's french for lesson) entity, and this entity have a "prof" attribute that is a manytoone relation with a Prof (teacher in french) entity. This Prof entity in itself extend an Eleve...
View ArticleHow to pass queue name to send message middleware
is there a possibility to set a topic for SendMessageMiddleware? When a consumer fails to process the message, message is sent to retry and SendMessageMiddleware will produce it to the...
View ArticleHow to use Datatables with Symfony 4 and Webpack Encore?
I am trying to use Datatables in a Symfony 4 project, using Webpack Encore, I've read the datatables documentation about integration with yarn, lots of tutorials and questions on SO, but I still can't...
View ArticlePersonalize an option list generated from a database
I would like to know if it is possible to choose myself what appears in a list of options that is loaded from a database. Specifically, I have two tables : Account and SubAccount, linked by a...
View ArticleCreate form based on EntityType with option to add quantity
I'm trying to setup a Symfony form that will allow a user to select a number of elements adding the wished quantity. I would like to be able to have a FormType which would be somewhere between an...
View ArticleHow to convert hydra apiplatform documentation to Swagger specification (OAS3)?
My purpose is to call an external hydra api documentation (like https://demo.api-platform.com/docs.jsonld) and convert it on the fly to an OAS 3 (like the one outputed by the command api:openapi:export)
View ArticleCreating new user on LDAP server using The LDAP Component for symfony and...
I'm trying to create a new user on my LDAP server using the Symfony bundle The Ldap Component, but when i try to add the user to a group using memberOf attribute it fails.if i remove the 'memberOf'...
View ArticleCan't Logout user in Symfony4
I'm updating a project built with Symfony2.7 to Symfony4, everything is working fine and have good compatibility, but one thing that should be fine, a built-in resource, the security layer, doesn't...
View ArticleCannot logout with Symfony 4
I cannot logout a user.I ported custom user management logic over to a Symfony 4 project. It uses recipes for security and guard.Here is the logout config in my main firewall: logout: path: /logout...
View ArticleSymfony 4 PHP Application deployed to GAE fails with error 'Attempted to load...
GAE appers not to be able to load classes defined with autoloaded configuration in a PHP application using the Symfony 4 Framework.Spinning up a simple application to deploy to GAE php73 runtime...
View ArticleBoth `symfony new --full` and `composer create-project...
After not doing anything in Symfony for a year, today I tried to create a Symfony 4 project for a small landing. The problem is both symfony new --full testweb and composer create-project...
View ArticleBest practice testing a service that creates an entity instance in phpunit...
I have a question. In my Symfony 4.3 project I have a service that contains a method in which an entity gets created and persisted. currently it is doing (new EntityName())->generateToken(), but now...
View ArticleHow do I use cookie for Locale and redirect according to Locale in...
I want to do override LocaleEventListener in Symfony 3 with the following scenario:Scenario 1: I need to set Locale in Cookie say for example en|deScenario 2: Need to get requestUri = "/" and check if...
View Article404 NOT FOUND Symfony after clearing cache
Everything was working just fine and I was editing twigs but realized that changes doesn't reflect on my website.So I tried /bin/console cache:clear --env=prodAfter that I got an HTTP 500 and when I go...
View Articlehow to pass array to function in symfony 4
Lack of my symfony knowledge bottlenecking me. i searched on web but not exactly solution found yet so here i am. How to pass $parameters to sendmail function rendering $data not working i think but it...
View ArticleSymfony 4: allow only active accounts to login
So I'm using symfony 4 and I managed to add a field in the user's database table called "Active", if active equals 0 then the account is not activated and vice versa. So what I'm trying to do is that...
View ArticleDuplicate insert with Symfony 4
I have a code/condition to getting chat between users like: $chat = $chatRepository->findChat($firstUser, $secondUser); if (!$chat) { $chat = new Chat(); $chat->setSecondUser($secondUser);...
View ArticleMultiples form request Symfony 4
I want to build form to perform multiples request. Here is an example of what i want to do In this case SQL request should be something like this : SELECT * FROM DB WHERE city = city1 or city = city2...
View ArticleHow to configure a Symfony workflow
I work on Symfony 4.2 version I made an Workflow Service, who has three places draft, reviewed and publishednamespace App\Service; use App\Entity\Article; use...
View Article