In a Symfony2.8/Doctrine2 application, I need to store in each row of my SQL tables the id of the user who created or updated the row (users can connect with Ldap). So all my entities inherited of a GenericEntity which contains this variable (type would be string if I want to store Ldap username): And I use the prePersistCallback() to
Tag: symfony
500 status code for symfony functional test
I’m performing a test just to see if a certain route is working. The page/route is found at http://localhost/login and when I go there in the browser it works fine and I’ve tested this with no cookies and my cache cleared. However, as soon as I test it in the phpunit LoginControllerTest class I recieve a 500 status code internal
Symfony: pass parameter to Ajax url
I am trying to figure out how to enable/disable user with checkbox without page reload. index.html.twig UserController Question How can I set corresponding user id to enabledChange function and change checked state depending on user state? Answer You need to add quotes to your variables, and pass changePath as an argument: then: I hope this will help.
Symfony logs to stdout inside Docker container
I’m building a docker image for a Symfony application. In this image, I want to stream the Symfony logs to stdout. So, similar to how nginx logs are configured, I added this line to my Dockerfile: ln …
Rendering multiple forms on same page with Symfony 3
I’d like to show a login and a registration form on the same page. However it seems that we cannot render the same template with different form variables in different two actions in a controller. Here is what I mean; } Above I have my login and registration action. I’d like to pass the ‘form’ variable to the same twig
How to render json into a twig in Symfony2
The question is how to pass a json to twig to render a template. I’ve tried to pass a json with JsonResponse object but I did not find the way to render the template. TarifasController.php index.html.twig How can I pass a json from the controller to use it in the DataTable (in twig template) but mantaining the render in this
stored procedure with OUT variable not working with oracle & symfony2
what i need i need to fetch json data from stored procedures i have google a lot but cannot solve problem source code $param1 = ‘abc’; $param2 = ’79’; …
Doing a “composer install” inside a Symfony console
I have to launch inside a working directory a composer install after a jQuery success (I’m developing a git panel under Silex). I have been told it could be well done with Symfony Console, because it can keep some options. But I have really no idea how to call it. I created a class which extends Command, I think I
Running a background task using Symfony Process without having to wait for the process to finish
After a user submits a form, I want to render a view file, and right after that I want to initiate a background task to process five MS Excel files (each may have up to 2000 rows) , but in way so that the user don’t have to wait for the process to finish in order to view the page.
Using a Progress Bar while Seeding a database in Laravel
I have to seed quite a lot of data into a database and I want to be able to show the user a progress bar while this happens. I know this is documented: https://laravel.com/docs/master/artisan#…