change and small fixes

This commit is contained in:
Hesabix 2025-03-05 22:08:22 +00:00
parent 4147938983
commit f97a9e2bae
2 changed files with 10 additions and 2 deletions

View file

@ -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. 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 ## Donation
for help developers please use this link for help developers please use this link

View file

@ -13,7 +13,7 @@ use Ramsey\Uuid\Uuid;
use Symfony\Component\Lock\LockFactory; use Symfony\Component\Lock\LockFactory;
#[AsCommand( #[AsCommand(
name: 'hesabix:update-software', name: 'hesabix:update',
description: 'Updates the Hesabix Core by pulling from GitHub, clearing cache, and updating the database.' description: 'Updates the Hesabix Core by pulling from GitHub, clearing cache, and updating the database.'
)] )]
class UpdateSoftwareCommand extends Command class UpdateSoftwareCommand extends Command
@ -179,7 +179,8 @@ class UpdateSoftwareCommand extends Command
private function writeOutput(OutputInterface $output, string $message): void private function writeOutput(OutputInterface $output, string $message): void
{ {
$output->writeln($message); $output->writeln($message);
if (PHP_SAPI === 'cli' && $output instanceof \Symfony\Component\Console\Output\StreamOutput && $output->getStream()) { // فقط اگه بافرینگ فعال باشه، flush کن
if (ob_get_level() > 0) {
ob_flush(); ob_flush();
flush(); flush();
} }