Commit 590faf8c by Yvon

remove irrelevant comments

parent 4ac3ab4e
...@@ -220,7 +220,6 @@ class SendCcasTransactionsExportToPrestatairesCommand extends Command ...@@ -220,7 +220,6 @@ class SendCcasTransactionsExportToPrestatairesCommand extends Command
} }
$nf = new NumberFormatter('fr', NumberFormatter::SPELLOUT); $nf = new NumberFormatter('fr', NumberFormatter::SPELLOUT);
//see below why not used $filesToDelete = [];
foreach ($prestas as $p) { foreach ($prestas as $p) {
/* @var Prestataire $p */ /* @var Prestataire $p */
...@@ -237,23 +236,11 @@ class SendCcasTransactionsExportToPrestatairesCommand extends Command ...@@ -237,23 +236,11 @@ class SendCcasTransactionsExportToPrestatairesCommand extends Command
$mail = $this->prepareMail($p, $month, $year, $prestaTotal); $mail = $this->prepareMail($p, $month, $year, $prestaTotal);
if ($path) { if ($path) {
$mail->attach(\Swift_Attachment::fromPath($path)); $mail->attach(\Swift_Attachment::fromPath($path));
//see below why not used $filesToDelete[] = $path;
} }
$this->mailer->send($mail); $this->mailer->send($mail);
} }
} }
//TODO : if we really want to delete files, we need to find another way
//TODO : as below code does not work probably due to mailer trying to access the file later.
//TODO : idea : https://stackoverflow.com/questions/15643027/swiftmailer-remove-attachment-after-send
/*
* In FileByteStream.php line 131:
* Unable to open file for reading [/.../ccastransactions/ssagir_ccastrans_2024-5_xxxx.csv]
*/
/*foreach ($filesToDelete as $ftd) {
unlink($ftd);
}*/
$this->io->success('End'); $this->io->success('End');
$memoryUsage = memory_get_usage(true) / 1024 / 1024; $memoryUsage = memory_get_usage(true) / 1024 / 1024;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment