Questions tagged [symfony5.4]
84 questions
0
votes
1 answer
How do I stop needing to cache:clear every annotation change?
I have a fresh project from built in Symfony 5 and have Api Platform 2.7.
My project also have PHP 7.4.
My problem is that every change that I got in annotations, I need to input cache:clear or cache:pool:clear to see my changes i.e (Adding…

MJ Convento
- 213
- 3
- 8
0
votes
1 answer
Title: Missing condition for password validation in Symfony controller
I'm working on a Symfony application where I have a controller method for updating the user's password. However, I seem to have made an error in the code, and I'm having trouble figuring out the issue.
In my userPasswordEdit method, I'm using a…

Butterbad
- 43
- 4
0
votes
1 answer
Issue with rendering data based on role in Symfony/Twig
Hello,
I'm currently working on a Symfony project where I need to render a list of "mededelingens" (announcements) based on the user's role. I have two routes, one for "leerling" (student) and one for "instructeur" (instructor), and I'm using the…

ProDeveloper69
- 36
- 4
0
votes
0 answers
PHPWord : word doc loses table/cell border formating in Windows
l have a project in Symfony 5, ubuntu 20.04 and l created a functionality to generate word templates using phpWord.
To format the template, I am using the library methods like
->addRow(), ->addCell(), ->addTable(), ->addTableStyle(), etc.
The…

Nick
- 1
0
votes
0 answers
Symfony\Component\Form\FormFactory::create(): Argument #3 ($options) must be of type array, null given
I am making a multi step form with the craue/formflow bundle in symfony. I want to pass submitted data to the next form. When I want to render the form it gives me this error
Symfony\Component\Form\FormFactory::create(): Argument #3 ($options) must…

Ralda00
- 1
- 5
0
votes
1 answer
Issue with role checking in Symfony authentication success handler
public function onAuthenticationSuccess(Request $request, TokenInterface $token, string $firewallName): ?Response
{
if ($targetPath = $this->getTargetPath($request->getSession(), $firewallName)) {
return new…

NinjaCoder69
- 3
- 2
0
votes
2 answers
Symfony 5.4 error: Object of class App\Entity\Routes could not be converted to string
namespace App\Form;
use App\Entity\Booking;
use App\Entity\User;
use App\Entity\Routes;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use…

NoobDeveloper69
- 13
- 5
0
votes
1 answer
PHP Variable "must be of type DateTimeInterface, string given" error
am working with symfony and i have avariable of type DateTimeInterface and i want to pass it in the url request in postman but it keeps giving me this error :
Argument #1 ($eventDate) must be of type DateTimeInterface, string
given, called…

massaoud ghassen
- 17
- 3
0
votes
0 answers
Is there a way to build images assets with Heroku in a Symfony app, without deleting images already upload through a form in back office?
I have a Symfony app, deployed with Heroku.
In Heroku buildpacks I have "heroku/php" and "heroku/nodejs" to build assets such as SCSS / JS / images.
SCSS and JS are build into /public/build folder
Image are build into /public/uplaods/ folder
The app…

KevinVanphavong
- 1
- 1
0
votes
1 answer
Symfony: How to inject AuthorizationChecker in phpunit Test
A colleage changed the code of my service to use the isGranted method of of the AuthorizationCheckerInterface to check the rights. Like this:
$this->authorizationChecker->isGranted(Roles::ROLE_PERSON_VIEW);
Regretfully, he didn't adapt my phpunit…

Calamity Jane
- 2,189
- 5
- 36
- 68
0
votes
0 answers
Symfony Messages are not sent to failure transport
I'm working with Symfony Messenger (Symfony 5.4), trying to use an async transport with multiple retries. As a fallback I would like to use a failure transport. My Messenger configuration is:
framework:
messenger:
reset_on_message: true
…

arsrobota
- 15
- 6
0
votes
0 answers
How to dynamically modify forms using FormEvents on multiple fields in Symfony 5.4
So I have a form on which I want to be able to modify multiple fields, to make it short
I have followed the documentation regarding FormEvents to add an event listener on my category field.
And it does work, when I select a category the product…

Raha32
- 1
- 3
0
votes
0 answers
How to deal with a manyToMany relation in the easyAdminBundle from Symfony?
I have a Product Entity and a Category Entity which are linked together by a join table named "Categories_Products".
Both entities contain a CollectionField and are built in ArrayCollection.
For an example, here is the Product Entity with the…
0
votes
0 answers
Symfony users in memory authentication leads me too many redirects
EDIT:
Forget it, I've just added the:
- { path: ^/admin/login, roles: PUBLIC_ACCESS }
and now it works.
I have an issue with login page, it gaves me too many redirects. I saw a lot of posts about it, but I can not found out what could be the…

vaso123
- 12,347
- 4
- 34
- 64
0
votes
0 answers
How do i style the password/repeat password with attribute?
So my problem is i can't style the same way as other form rows/attributes with tailwindcss on symfony
enter image description here