Skip to content
Advertisement

Tag: symfony

Symfony Webpack not working server return 404 in CSS/JS

I working on Symfony project but when I want implement Tailwind I have problem when I want render images it return 404.. I went through the whole internet and found no answer please help me btw. Rendering Image through url also not working webpack.config.js tailwind.config.js assets/app.js twig usage Answer Ok so I fixed it, I don’t know why, but I

Shopware : How to get customFields for products in the Order Object

I am currently trying to get a custom field ’emakers_custom_field_warehouse_name’ in the products when an order is made with the code below. Here’s my search Request : Here’s what I get when I serialize $orderObject->getLineItems->first()->getProduct() : https://gist.github.com/Youmar0504/8b53632fbc1b43c11769711519a74a17 What I already tried and gave me empty result : TBH, I don’t know what to try else. It looks like (if you

Use a request header with HTTP Client to external Api server

Consider the following request to a Symfony controller: This code snippet is a minimal example for the usage in a controller. The controller accepts a Request, and uses the x-token header for authenticating against the 3rd Party Api (here: localhost:3001). Is there a way, to automate this process? So basically – listen to incoming requests and inject the x-token header

New alternative for getDoctrine() in Symfony 5.4 and up

As my IDE points out, the AbstractController::getDoctrine() method is now deprecated. I haven’t found any reference for this deprecation neither in the official documentation nor in the Github changelog. What is the new alternative or workaround for this shortcut? Answer As mentioned here: Instead of using those shortcuts, inject the related services in the constructor or the controller methods. You

Customize new authentication errors messages on Symfony5.3

on my new symfony 5.3 project i just implemented the new authentication system, and it works fine, but my problem is that i can’t customize the authentication errors: in the method: onAuthentificationFailure in the AbstractLoginFormAuthenticator but in my view it only displays the session error which is normal since my controller calls the getLastAuthenticationError() method. but how could I display

Advertisement