Questions tagged [symfony5.4]
84 questions
0
votes
1 answer
Symfony - configure class from `service.yaml` with static default value
I am trying to create a Class that can be call from anywhere in the code.
It accepts different parameters that can be configured from the constructor (or setters).
This Class will be shared between several projects, so I need to be able to easily…

CAVASIN Florian
- 78
- 9
0
votes
0 answers
symfony doctrine how to reverse entityManager->persist()
I am editing an entity, and upon some manual validation error I want to write a log message to the DB, but when I flush that message, the entity under editing is also flushed to DB. I have tried entityManager->clear() but that throws errors about…

Matt Welander
- 8,234
- 24
- 88
- 138
0
votes
1 answer
I am getting error when trying to create symfony folder
I've installed symfony but now when i am trying to create a folder i see a error i have never seen before
symfony : The term 'symfony' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the…

Husow
- 1
- 1
0
votes
0 answers
Compound forms expect an array or NULL on submission
I have a problem with my symfony 5 application. When I try to insert an object with the file field set to null, I get the following error:
Caused by:
Symfony\Component\Validator\ConstraintViolation {#4637 ▼
root: Symfony\Component\Form\Form {#4042…

oracle972
- 77
- 10
0
votes
0 answers
Symfony 5.4 Auto login after user confirmation and password reset
How Auto login after user confirmation and password reset using le link in the email sent?
I tried to use Password less login link but I'm not able to make a mix with emailverifierbundle...

JBB
- 71
- 1
- 5
0
votes
0 answers
Form - symfony 5.4 - What type of field for Player
Class Presence
/**
* @ORM\ManyToOne(targetEntity=Player::class, inversedBy="presence")
* @ORM\JoinColumn(name="player_id", referencedColumnName="id", onDelete="CASCADE", nullable=false)
*/
private $player;
PresenceType
...
…

brico
- 61
- 6
0
votes
1 answer
"hydra:description": "A circular reference has been detected when serializing the object of class \"App\\Entity\\Category\" (configured limit: 1).",
I am using Api platform and Symfony 5.4, ManyTomany relation on category and I have this error
I found the solution: by adding @ApiResource on the Category entity.

Moccine
- 1,021
- 6
- 14
0
votes
0 answers
Get values from Criteria for an export (data transformer) with api platform
I have a problem, I have to export a csv with platform api and we use data transformer and dto for that. I have a collection in my entity and I would like to export this collection in a single row grouped by user id.
I can explain in sql what I…

Riwalenn Bas
- 1
- 1
0
votes
0 answers
How to calculate the body with inheritable templates I have a 76 px high navbar and a 157 px high footer in Symfony 5.*
How to calculate the body in Symfony 5 with inheritable templates I have a 76 px high navbar and a 157 px high footer because I want to make a body that occupies the rest of the screen but is responsive at the same time, that is, if the resolution…

Miguel Ángel
- 13
- 4
0
votes
1 answer
symfony 5.4 and doctrine : SQLSTATE[HY000] [2019] Unknown character set
i managed to read a book on symfony 5, but i am stuck where the book begins to talk about databases. i 'v been adding this to the .env…
0
votes
1 answer
Php spreadsheet downlod is giving garbage collect error
I am using "phpoffice/phpspreadsheet": "^1.25", for downloading Excel file.
Here is the code I have used.
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use…

nas
- 2,289
- 5
- 32
- 67
0
votes
1 answer
How to inject env VARS into abstract class in a Symfony54 php81 app
I have recently undertaken upgrading an old Symfony 4.4 app (to 5.4 and PHP 8.1) and have been following the brilliant tutorials over at symfonycasts.com. I have come up to a point where I don't understand how to move forward.
class One extends…

Oceanic_Panda
- 112
- 1
- 13
0
votes
1 answer
Symfony 5.4 - Flysystem Driver for ElfinderVolume does not exist
My environment:
Symfony 5.4
Php version 7.4
Installed packages and versions :
"aws/aws-sdk-php": "^3.238",
"helios-ag/fm-elfinder-bundle": "^12.1",
"league/flysystem": "^2.5",
"league/flysystem-aws-s3-v3": "^2.5",
"league/flysystem-bundle":…

mirkoventuri
- 1
- 1
0
votes
0 answers
Symfony 5: Autowire not working, but everything is configured
I have just set up a new application on Symfony 5.4.15.
The services.yaml looks like this:
`
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your…

47GN
- 1
- 1
0
votes
1 answer
Symfony 5 : Warning: SessionHandler::read(): open(D:\XAMPP\tmp\.... failed: Permission denied (13)
i'm working on making crud with symfony and php the READ and DELETE working fine but when i add the create witch is a very simple code :
#[Route('/addClassroom', name: 'addClassroom')]
public function addClassroom(ManagerRegistry…

Abdo Bodabous
- 11
- 1