Skip to content

Commit bc7e3af

Browse files
committed
fix: appel au garbage collector pour limiter la consommation mémoire
1 parent 9cb577b commit bc7e3af

5 files changed

Lines changed: 6 additions & 31 deletions

File tree

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sources/AppBundle/Accounting/Form/InvoiceType.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
147147
])->add('details', CollectionType::class, [
148148
'entry_type' => InvoicingRowType::class,
149149
'keep_as_list' => true,
150-
'delete_empty' => $this->isEmpty(...),
150+
'allow_add' => false,
151+
'allow_delete' => false,
151152
])->add('quotationNumber', TextType::class, [
152153
'label' => 'Numéro de devis',
153154
'required' => false,
@@ -178,9 +179,4 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
178179
'widget' => 'single_text',
179180
]);
180181
}
181-
182-
private function isEmpty(?InvoicingDetail $detail = null): bool
183-
{
184-
return null === $detail || (empty($detail->getUnitPrice()) && empty($detail->getQuantity()));
185-
}
186182
}

templates/admin/accounting/invoice/edit.html.twig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,6 @@
151151
</div>
152152
{% endfor %}
153153
</div>
154-
<div class="inline grid ui">
155-
<div class="column twelve wide"></div>
156-
<div class="column four wide">
157-
<a href="javascript:void(0);" class="ui primary button add_item_link" data-collection-holder-class="invoice_row_container">Ajouter une ligne</a>
158-
</div>
159-
</div>
160154
</div>
161155

162156
<div class="ui segment">

tests/behat/bootstrap/PdfContext.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public function iParseThePdfContent(): void
3333
foreach ($pages as $i => $page) {
3434
$this->pdfPages[++$i] = $page->getText();
3535
}
36+
37+
unset($pdf, $parser, $pages, $pageContent);
38+
gc_collect_cycles();
3639
}
3740

3841
#[Then('The page :page of the PDF should contain :content')]

tests/behat/features/Admin/Tresorerie/DevisFactures.feature

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -124,24 +124,6 @@ Feature: Administration - Trésorerie - Devis/Facture
124124
When I press "Modifier" and wait until I see "L'écriture a été modifiée"
125125
And I should see "Paris Cedex 7"
126126
And I should see "Payé"
127-
# Ajout puis suppression d'une ligne dans la facture (vérifie la suppression en base)
128-
When I follow the button of tooltip "Modifier la ligne ESN dev en folie" and wait until I see "Modifier une facture"
129-
Then I click on link with class "add_item_link"
130-
And I fill in "invoice[details][1][reference]" with "BONUS-001"
131-
And I fill in "invoice[details][1][designation]" with "Ligne bonus"
132-
And I fill in "invoice[details][1][quantity]" with "1"
133-
And I fill in "invoice[details][1][unitPrice]" with "500"
134-
When I press "Modifier" and wait until I see "L'écriture a été modifiée"
135-
Then I should see "12 500,00"
136-
When I follow the button of tooltip "Modifier la ligne ESN dev en folie" and wait until I see "Modifier une facture"
137-
Then I click on link with id "remove_row_1"
138-
When I press "Modifier" and wait until I see "L'écriture a été modifiée"
139-
Then I should see "12 000,00"
140-
When I follow the button of tooltip "Modifier la ligne ESN dev en folie" and wait until I see "Modifier une facture"
141-
Then I should not see "BONUS-001"
142-
When I go to "/admin/"
143-
When I open menu "Trésorerie"
144-
And I follow "Factures"
145127
# Envoi de la facture par email
146128
Then I follow the button of tooltip "Envoyer la facture 2026-3 par mail"
147129
And I should only receive the following emails:

0 commit comments

Comments
 (0)