Symfony process executes command but returns failed status

By doing public function spawn_queue_process(){ $command = ‘echo hi > find_me.txt’; $process = new Process($command); $process->setWorkingDirectory(base_path()); $process->start(); //Just in case 🙂 Log::error($process->getOutput()); if(!$process->isSuccessful()){ $exception = new ProcessFailedException($process); Log::error(‘Error on queue call’); Log::error($exception->getTraceAsString()); } } Even though the file is created,…

Symfony 3.4 – How to debug_backtrace?

I am using Symfony 3.4, and I am trying to file_put_contents(‘/var/www/html/var/logs/deleted.log’, print_r(debug_backtrace(), true), FILE_APPEND); However, I am getting Uncaught PHP Exception SymfonyComponentDebugExceptionOutOfMemoryException: “Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 98570240 bytes) It appears the debug_backtrace might…

I clear the cache after deployment to production but also lose my app cache. How do I exclude my pool while seeing new symfony code updates?

To deploy, I ‘git pull’ then ‘bin/console cache:clear’ to see the updates to my website. It works, but I don’t want to lose MY cache pool’s data when this happens. (I cache results to 3rd party api calls) I expected…

How to link to download or preview pdf in sonata admin list

I have an Entity, with the next fields: /** * @ORMColumn(type=”string”, length=255) * @var string */ private $document; /** * @AssertFile( * maxSize=”2M”, * mimeTypes={“application/pdf”,”application/msword”}, * mimeTypesMessage = “Please upload a PDF or MSWORD file” * ) * @VichUploadableField(mapping=”resume_doc”, fileNameProperty=”document”)…