From f97a9e2bae2591772460d2009639aba6b77a8c95 Mon Sep 17 00:00:00 2001 From: Babak Alizadeh Date: Wed, 5 Mar 2025 22:08:22 +0000 Subject: [PATCH] change and small fixes --- README.md | 7 +++++++ hesabixCore/src/Command/UpdateSoftwareCommand.php | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0e88fe1..fe5452d 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,13 @@ For connect hesabix to your email service edit .env.local.php file located in he after set connection string edit mailer.yaml located in configs folder and set header for send emails. +## update software + +For update software with last changes that publishe in hesabixCore folder run this command + +``` +php bin/console hesabix:update +``` ## Donation for help developers please use this link diff --git a/hesabixCore/src/Command/UpdateSoftwareCommand.php b/hesabixCore/src/Command/UpdateSoftwareCommand.php index 53ee5f6..d56f67c 100644 --- a/hesabixCore/src/Command/UpdateSoftwareCommand.php +++ b/hesabixCore/src/Command/UpdateSoftwareCommand.php @@ -13,7 +13,7 @@ use Ramsey\Uuid\Uuid; use Symfony\Component\Lock\LockFactory; #[AsCommand( - name: 'hesabix:update-software', + name: 'hesabix:update', description: 'Updates the Hesabix Core by pulling from GitHub, clearing cache, and updating the database.' )] class UpdateSoftwareCommand extends Command @@ -179,7 +179,8 @@ class UpdateSoftwareCommand extends Command private function writeOutput(OutputInterface $output, string $message): void { $output->writeln($message); - if (PHP_SAPI === 'cli' && $output instanceof \Symfony\Component\Console\Output\StreamOutput && $output->getStream()) { + // فقط اگه بافرینگ فعال باشه، flush کن + if (ob_get_level() > 0) { ob_flush(); flush(); }