Category "symfony"

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

Keep messages when I use the Messenger component with Doctrine

I am using the Messenger component configured with Doctrine to store the messages in a database table. I see that in the default configuration the table "messe

How to translate the Main Menu Labels in Symfony EasyAdmin?

I am building an admin backend with Symfony EasyAdmin 4 and couldn't figure out how to change the main menu's entities' labels. They default to their entities'

Symfony Mercure "Failed to send an update"

I am having an issue sending updates to the Caddy-based Mercure Hub with both the Symfony Mercure\HubInterface and the "pure" PHP example. When attempting to pu

Symfony autowiring issues since docker update

I'm having autowiring issues within symfony since I have updated my Docker to the latest version. I am not entirely sure of the causality here but certainly, my

Why can't I access the response content when the Symfony HTTP Client encounters an error, and an exception is thrown instead?

I want to make a request to retrieve user info from OAUTH server with Symfony HttpClient but I can't fetch fetch the response directly when encountering an erro