Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed last year. Improve this question I am using the framework symfony 5 for my website and I have implemented
Tag: symfony
jwt token not found when i pass in username and password in curl
I want to use jwt token in my symfony project. But i have a problem because when i use: curl.exe -X POST -H “Content-Type: application/json” http://localhost:81/api/login_check -d ‘{“username”: “f.djawid@outlook.com”,”password”:”000000″}’ I get : {“code”:401,”message”:”JWT Token not found”} This is my security.yml: As you can see i use the lexikJWTAthenticationBundle. I made a private key and public key with ssl. I use
Symfony TimeType set default value without duplicate value or overwrite
Im trying to make a user friendly timepicker. I use symfony 4.4 together with the form builder to create this timepicker. I use this timepicker when im creating my entity and editing my entity. Now I run into a small issue… I want the time to be at a specific “default” value. So I did the following. The ‘data’ object
Symfony access headers in custom validator constraint
I am trying to access the headers of my request in a custom validator constraint like so: But the headerBag in $this->request is always an empty array unfortunately. Is there maybe an issue because I extend the symfony count validator? Answer You should ingest RequestStack instead of Request See the documentation
Dynamic embedded form with OneToOne relationship
I’m trying to create a form for an article with an addon (tender). The article is in one-to-one relationship with the addon and the addon can be disabled (null). If the checkbox with an addon is checked, the addon needs to be validated, then submitted together with the article. The issue I’m having is, I’m unable to set the addon
Symfony 5.1 to 5.2 unit testing do not authenticate via guard authenticator
I ‘m working with Symfony 5.1 using the firewall and a guard authenticator; All was working fine with 5.1. I’ve recently upgrade to Symfony 5.2 and almost all working fine except Unit tests. When i do a step by step debugging, it’s not stepping into the Authenticator anymore like it was the case previously (in 5.1). Any parameter missing in
PHP – Multiple OR operators in if statement
I am working with getters and setters within my Symfony project. I have to use if() statement to check if status field does not have specific values before changing other field. Code: I defined constants and also using OR operator. I was wondering if there is more elegant solution than this. Maybe is_array() function, but don’t know can it be
Change parent format from @Template to render
When updating the app from Symfony 2.8 to Symfony 3.4, the handling of _format changed, so I would like to change @Template to render as shown in the post below. However, because twig is changed in Parent format Unable to specify twig file in return of BaseStaffController.php. Is there any good way? How to reference multiple twigs with @Template() Controller
Composer outdated command doesn’t show latest versions [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year. Improve this question I am using Composer version 2.0.8, with Docker. When I use the command composer outdated -f json inside a composer project, the field “latest”, giving the
How can I access the URL of a Symfony Http Client response?
With the Symfony Http Client I create a HTTP request like this: The output is: Now I try to output the url of that response: But the output is null. How can I get as an output the url www.something.com? Answer All the HttpClient responses implement the ResponseInterface, defined on Symfony Contracts. That interface declares a getInfo() method, as shown