Questions tagged [symfony5]

Use this tag for questions addressing particular features of the PHP framework Symfony in version 5. Otherwise use only the general [symfony] tag plus the language tag [php].

Symfony is a framework for web and CLI-applications built on top of a catalog of Symfony components. It is free software released under the MIT license. The project's homepage is symfony.com.

Symfony 5 was released in November 2019 and includes several changes compared to its predecessor. However there are no new features compared to version 4.4.

1079 questions
-1
votes
1 answer

Symfony group multiple emails into one and send it

I am using Symfony 5.2 and messenger with sengrid for sending mails. I want to send an email when a specific action is taken. But this action can be repeated several times in a row and I don't want to spam my users. I would like to store these…
2kne
  • 1
-1
votes
1 answer

Avoid user to edit value on HiddenType field using CSRF?

Using Symfony 5, Is there any way to avoid user edit (using browser inspector) on hidden input field? My use case is: My website can display to a user A a list of recommended user. For each recommend user displayed, the user A can click on a…
Kevin D
  • 71
  • 1
  • 4
-1
votes
1 answer

How to upload .jpg file in my form Symfony 5

Impossible for me to upload .jpg files in Symfony 5.1, i tried many things, If i search on the mimtype guide in symfony documentation (https://www.iana.org/assignments/media-types/media-types.xhtml), there is no simple.jpg supported, so how can I do…
-1
votes
1 answer

How to create, edit or delete entities from a table and save it to database

I want to be able to use a table like this: Snippet 1 Snippet 2 After editing, creating or deleting rows, I want to be able to submit them to the controller. After having the data in the controller I should be good and know what to. However my…
Grozz
  • 1
  • 1
-1
votes
1 answer

Symfony bundle access config value

I am trying to initialize a service using a config value: CHANGE_THIS
Alex.Barylski
  • 2,843
  • 4
  • 45
  • 68
-1
votes
1 answer

Symfony5 The CSRF token is invalid - after upload on hosting

I have strange problem: i have dev version on pc on localhost and it;s work but after uploading on hosting on every form i have error: The CSRF token is invalid. Please try to resubmit the form. I tryied repload, delete cache and everytime the…
-1
votes
1 answer

Best approach to generate presigned URL for entity property in Symfony

I have a User object which has a a profilePicturePresignedUrl property. The value of the profilePicturePresignedUrl property needs to be computed using a service. It would seem that the most efficient way of doing this would be to create a method in…
user1392897
  • 831
  • 2
  • 9
  • 25
-1
votes
1 answer

make a request to the database when the user close the browser

In my Database I've got a boolean is_logged's field. I made 3 events : _ When the user log in, is_logged => true, _ When the user log out, is_logged => false, _ When the user is inactive during 30 min, the page is refresh with js and redirect to…
Micka Bup
  • 391
  • 1
  • 9
-1
votes
1 answer

How to persist OneToMany Relationship data in Symfony?

I'm facing a problem with persisting OneToMany relationship data into the database. Following is the Code: Item Type ->add('title') ->add('image',FileType::class) ->add('size', CollectionType::class,[ 'entry_type'=> SizeType::class, …
-1
votes
2 answers

I can't add automatically a user ID to it's creation - Symfony 5

So, there's my problem : I want to create a pet profile in my project, everything was working fine until I wanted to add some elementary information, the property User ( The user who created that profile) I want to add the current User's ID but I'm…
Seikyoo
  • 3
  • 2
-1
votes
2 answers

vuejs and symfony5 - link to public document

I have a refered documents for my entity and render this in vuejs like this: {{ document.id }}.{{ document.extension }} the…
goldlife
  • 1,949
  • 3
  • 29
  • 48
-1
votes
1 answer

Symfony 5 - Repository Class extend from custom BaseRepository Class instead of ServiceEntityRepository

Lets say we have two Repository classes: class CarrierRepository extends ServiceEntityRepository { const ENTITY = 'carrier'; /** @var PaginatorInterface $paginator */ private $paginator; public function __construct(ManagerRegistry…
goldlife
  • 1,949
  • 3
  • 29
  • 48
-1
votes
1 answer

Merge two routes with ParamConverter

I would like to merge two routes with ParamConverters on Symfony 5. On the root route I want to get all the records from the Entity table. On the id route I want to get only that particular Id. But as I access the root route i get this…
Claudio Ferraro
  • 4,551
  • 6
  • 43
  • 78
-1
votes
1 answer

Installation error of EasyAdmin in Symfony 5 app

I tried to install EasyAdmin bundle in my Symfony 5 app: composer require easycorp/easyadmin-bundle And got an error: Using version ^3.1 for easycorp/easyadmin-bundle ./composer.json has been updated Loading composer…
yesnik
  • 4,085
  • 2
  • 30
  • 25
-1
votes
1 answer

How to add "selected & disabled" option tag inside select tag in Symfony's ChoiceType form?

I have created a custom form type in Symfony 5. This is the class: namespace App\Form; use App\Entity\Product; use App\Entity\Species; use App\Repository\SpeciesRepository; use Symfony\Component\Form\AbstractType; use…
msrumon
  • 1,250
  • 1
  • 10
  • 27