Symfony make:entity annotation mapping error
I want to create a new entity in my ORO platform application by using the make:entity command from the MakerBundle.I expect it to create an entity in my bundle Acme\Bundle\TestBundle which I set in my...
View ArticleAdding auth route to generate a JWT in OpenApi 3
I would like to achieve this kind of result with ApiPlatform and OpenApi V3 : screenchot of an old swagger displaying an auth routeI found this on an old SO question : How to add Login to swagger UI...
View ArticleProperly increment a twig value
I am trying to make a quizz using Symfony 4. I pass an array of Questions to my template, I tried to make a function i call when the user clicks on an answer, to load the next question.here is what i...
View ArticleSymfony 4 post request too slow
It's my first time here :)I'm making a website in Symfony 4. My problem is that forms take a long time to be submit. When I submit one of them, I wait between 5 and 20 seconds before the form ends.I...
View ArticleHow to setup access control for the user in symfony?
I have a users table where roles field contains ["ROLE_SUPERUSER"]Now I have two Urls:localhost:8000/api/en/loginlocalhost:8000/api/en/testWhen the user successfully logins, it generate a cookie. How...
View ArticleSymfony 4 Remember me not working without username
How can we configure Symfony 4 Remember me functionality to use email instead of username (as set by default) when creating the cookie and storing it in the browser?My issue is that by using email to...
View ArticlePHP twig foreach Bootstrap Modal needHelp
I'am doing a modal, the modal show the player informations. We have a list of players showed with a twig foreach in a page. When i click on a player, i want the informations of the player. I tried with...
View ArticleHow to resolve ERR_ABORTED 404 (Not Found) with Webpack Encore
I'm using Symfony 4.4 for a project and yesterday I deployed the project on my server. This is the first time I'm using the package webpack encore. It's cannot find the app.js and runtime.js files and...
View ArticleUpdating field inside a repository [closed]
I'm creating a CRON in my Symfony 4 App (command) to archive news that is older than 60 days. How should this be done?My first instinct was to add a method to my NewsRepository to retrieve all news...
View ArticleHow to find the good path for image with Webpack Encore and Symfony 4
I'm using Symfony 4.4 for a project and yesterday I deployed the project on my server. This is the first time I'm using the package webpack encore. Impossible to find the path for the imagesThis is the...
View ArticleSelect from junction table
everybody! What should I do if I need to make select from junction table?For example, I develop project and I need to make chats between users. I have two entities: User and Chat, and many-to-many...
View Articlefalse] error">Symfony 4 : Unsezialise() , ["allowed_classes" => false] error
(My english are bad, hope you will understand)Hello, I'm actualy developping an website with Synfony 4 and created an admin login. I used serialise and unserialise. /** * @inheritDoc */ public function...
View ArticleWhat is causing the expected literal error?
I have a query that has a syntax error. This is the error!string(63) "[Syntax Error] line 0, col 57: Error: Expected Literal, got 'd'"public function getDomain(string $country) { try { return...
View ArticleUpdate Symfony 4 to 5 DatetimeType validation error [duplicate]
I have this Symfony 4.3.11 API rest application :Here is my post request body:{ "publicationDate": "2019-03-13" } Entity : /** * @var \DateTimeImmutable * * @ORM\Column(type="datetime_immutable") * *...
View ArticlePHP - Symfony 4 - API Platform - Custom operation
Using SF4 & Api platform : I would like to have a route for performing a random computation, and returning result to the client.. this seems to be simple However I am not able to do it easily with...
View Articlehow to get image data
I want get image data to crop and after then save<?php namespace App\Controller; use App\Entity\Services; use App\Form\ServicesType; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;...
View ArticleMixing positional and keyed arguments in service definition, using YAML
When configuring a service using XML, we can do the followin:<service id="foobar" class="App\Foobar" public="false" abstract="true"> <argument type="service" id="doctrine" />...
View ArticleBuilding an Point of Interest system with different comment types
I am building a system for POIs. We want to give the owner the possibility to add different types of comments/votes to a POI.Like a harbour would have: Does it have W-LAN? (BOOL, once per POI) Whats...
View ArticleAre queries/commands objects mandatory on DDD with CQRS?
im working on a system built following DDD and some CQRS patterns written in symfony. Normally on a Query endpoint, the controller receives a request, and it uses an adapter service to build a query...
View ArticleHERE maps for JavaScript API: How to calculate route?
I wanna implement in my project option to draw route on the map using HERE maps api, I read documentation and saw few examples and if I implement it all global and push static route to calculate...
View Article