Category "symfony"

"Unable to find template" with Docker

I created a Symfony environment with Docker. I then included this file in my web project (skeleton website). But when I try to access my base.html.twig page loc

Symfony6 FindBy and entity many to many

I use symfony6 for the first time with php 8.0.17. I want to make a small form that allows me to retrieve "Card" objects. My "Card" objects are bound to many to

Database updates not readable while PHPunit WebTestCase (Symfony 5.1)

I have a problem asserting updates made by a form are really written in the database. I explain, I first do a create test (testCreateLactationForm), very simila

Unable to find "Proxies\__CG__\App\MyBundle\Entity\User" entity identifier associated with the UnitOfWork

I updated a Symfony project from version 3.4 to 5.3, and after that, I am getting the following error on some pages: Unable to find "Proxies\__CG__\App\MyBundle

Couldn't find constant subresourceOperations, class App\Entity\Comment

i have two table comment and author between them OneToMany relation, i want to display author of comment but it gives me error [Semantical Error] Couldn't find

401 Invalid JWT Token Lexik

I'm not sure why i Keep getting a wrong bearer token. { "code": 401, "message": "Invalid JWT Token" } When i debug it on https://jwt.io/ i also get a Invalid S

How can I prevent autologout of user in Symfony 4?

When the user uses my symfony application, then after a couple of minutes the user is automatically logged out, while he is working with the application. To pre

Deploy API Platform 2.6 and Symfony 5.4

I created a project with Api platform 2.6 & Symfony 5.4 and then I uploaded it with FileZilla (FTP). I followed the step to deploy a Symfonyproject update c

EasyAdmin: Error on change formTypeOptions property field in twig

I've an User entity and EasyAdmin (EA) UserCrudController for manage to them. The User entity has active boolean field. And I want that field will be disabled f

How create Nginx redirect if php send 404 error

i have a project and this project installed on few servers, he has one code, example: Server "A" => Project "A" Server "B" => Project "A" Project has bun

How create Nginx redirect if php send 404 error

i have a project and this project installed on few servers, he has one code, example: Server "A" => Project "A" Server "B" => Project "A" Project has bun

How to add all page specific entries from dependency

I'm currently upgrading an existing app with legacy per-page frontend javascript and CSS to Symfony's Webpack Encore. The app and it's dependencies each supply

Try to use Symfony mailer with Gmail

Try to use Symfony mailer with Gmail on my Symfony 5.1 app. mailer.yaml: framework: mailer: dsn: '%env(MAILER_DSN)%' .env: MAILER_DSN=gmail+smtp://

disable transport fallback when sending emails

I have two transports, one for general emails and the other for noreply emails because of huge number mailer.yml: framework: mailer: transports:

getUser method from Symfony Security can't get my User Repository

My problem is the $this->getUser(); method (called from Controller) from Symfony Security can't get my User Repository. The "App\Model\ODM\Repository\UserRep

Symfony 4.4 Translation Annotations Nelmio ApiDoc

I have a symfony 4.4 project with enabled translations and now I have to find a solution that translations also take effect for swagger annotations. The result

Exception thrown during the rendering of a template("Parameter "id" for route "url" must match "[^/]++" ("" given) to generate a corresponding URL.")

I have a delete button which is created here: _delete_form.html.twig <form method="post" action="{{ path('finals_delete', {'id': final.id}) }}" onsubmit="ret

Symfony 4: how to allow dynamic values for array nodes in bundle configuration?

In the Configuration of my bundle I have defined the following for example: $treeBuilder = new TreeBuilder('foo'); $treeBuilder ->getRootNode() -&

inside a script module, try to import js files with twig asset() (error: myalias.x is not a function)

[ Environment: symfony (PHP), twig files with HTML/JS code, and Managing assets with Webpack ] Files Tree _assets |__js |__file.js |__library |_

how to solve openssl problem on windows 11 pro while working on symfony jwt authentication generating key pair

openssl rsa -pubout -in app/var/jwt/private.pem -out app/var/jwt/public.pem openssl : The term 'openssl' is not recognized as the name of a cmdlet, function, sc