Category : command

I tried to run the following : $process = new Process([‘php’, ‘bin/console’, ‘app:run-batch’, $batch->getId()], $this->getParameter(‘kernel.project_dir’)); $process->start(); But the process doesn’t run at all. Then if I add this line to wait for the process to end : $process->wait(); It works, but the thing is that I specifically put my code in a command to be ..

Read more

I’m generating a large PDF with 2000 pages in symfony (4.2) framework. What I’m doing is just save the HTML content to the .HTML file by getting content from the twig. Then I’m using the headless chrome to generate the PDF from the URL using the below command. /usr/bin/google-chrome –headless –disable-gpu –run-all-compositor-stages-before-draw –print-to-pdf [URL of ..

Read more

I’d like to run a command in a separate process from a unit test and obtain its output. I’ve tested several options like using shell_exec or the ApplicationTester-class. While the command is obviously executed (I checked by inserting some side-effects), its output cannot be obtained when executed from the unit test. However, if I create ..

Read more

I want to make a scheduler command in TYPO3 v9, the problem is, that I don’t know and can’t find how I can make a select input. This is what I have: /** * Basic configuration(s) for the command. */ protected function configure(): void { $this->setName(‘WiRo Workflow’) ->setDescription(‘Sendet eine E-Mail an den Redakteur, wenn Inhaltselemente ..

Read more

I have created a symfony command that can be executed successful from the shell using the following syntax: php bin/console app:create-pdf 1 www.google.com this command works! (the last two parameters are required for the command to process) Now I want to call this command inside my Controller using the Process Component https://symfony.com/doc/current/components/process.html, but I have ..

Read more

I’m trying to create a personnal command to change data in my database. I could do it directly with a “SELECT *” … but Symfony says that the good method is to create a command to apply changes in database, etc… So this is the problem i’m facing : When I override the default __construct ..

Read more