Skip to content

Fix the PHPStan and test jobs, drop the Smarty parts - #25

Merged
anoziere merged 11 commits into
mainfrom
fix/ci-debt
Oct 18, 2026
Merged

anoziere merged 11 commits into
mainfrom
fix/ci-debt

Conversation

@anoziere

Copy link
Copy Markdown
Contributor

What failed on main:

  • PHPStan (40 errors): the Smarty plugin (13), @var ActiveRecordInterface $this in the model event trait (24), the skeleton models of the dropped credit_note_version table (2), an undefined $orderId in performCustomer (1).
  • Module tests (48 errors, CreditNoteTableMap::COL_INVOICE_ADDRESS_ID undefined): the listener unit test declares a stub of the table map when the generated class is not autoloadable yet, and the stub then replaced the generated map for the integration tests of the same run. The schema and the generated models were consistent; the models are generated at build, none is committed. One test also assumed a demo shop (French default language).

Changes:

  • tests/bootstrap.php maps var/propel/test/model before the first kernel boot, so the generated map is found instead of the stub.
  • CreditNoteDocumentLocaleTest sets the default language it relies on, inside its transaction.
  • The model event trait no longer types $this as ActiveRecordInterface.
  • performCustomer loses its order branch, which could never run ($orderId was never read from the form; performOrder already sets the customer from the order).
  • Smarty removed: credit_note_format_address plugin, templates/backOffice/default/**, templates/pdf/default/credit-note.html, TemplateFallbackTrait of the back-office hooks. Every removed template has a Twig counterpart (back-office default-twig, the PDF theme credit-note.html.twig).
  • Loops removed: credit-note-version (table dropped in 2.3.4, models were dead), and credit-note-comment, credit-note-status, credit-note-type, order-credit-note, which no Twig template calls. credit-note, credit-note-address, credit-note-detail stay, the PDF document reads them.
  • Version 4.2.0, changelog updated.

@anoziere
anoziere merged commit 6da1692 into main Oct 18, 2026
5 checks passed
@anoziere
anoziere deleted the fix/ci-debt branch October 18, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant