Skip to content

feat: add Thelia 3 bi-compat (default-twig BO, twig config, bank info renderer) - #4

Merged
anoziere merged 4 commits into
thelia-modules:twigfrom
mabruchet:feat/thelia3-migration
Aug 5, 2026
Merged

feat: add Thelia 3 bi-compat (default-twig BO, twig config, bank info renderer)#4
anoziere merged 4 commits into
thelia-modules:twigfrom
mabruchet:feat/thelia3-migration

Conversation

@mabruchet

@mabruchet mabruchet commented Jul 28, 2026

Copy link
Copy Markdown

No description provided.

@mabruchet mabruchet changed the title feat: add Thelia 3 bi-compat (default-twig BO, twig config, bank info… feat: add Thelia 3 bi-compat (default-twig BO, twig config, bank info renderer) Jul 28, 2026
Maxime Bruchet added 3 commits August 5, 2026 10:23
Removes the Smarty templates, the HookManager hook class and the
isThelia3() / resolveDatabase() indirection.

Front-office labels move to the module root domain: wiretransfer.fo.default
only existed because Thelia derives that domain from templates/frontOffice/*,
so deleting the Smarty directory would have unregistered the catalogue the
bank-info renderer reads.
SendPaymentConfirmationEmail was declared in Config/config.xml as
`send.wiretransfer.mail` AND auto-discovered by configureServices(). Two
service ids for one subscriber class means Symfony registers two listeners on
ORDER_UPDATE_STATUS, so the customer received the wire-transfer confirmation
twice on every switch to paid. Auto-discovery alone is now authoritative.

Also:
- Drop the listener's unused ParserInterface dependency, which autowiring
  resolved to the throwing ParserFallback.
- install(): pass $con straight to Database, whose constructor already accepts
  null and unwraps a ConnectionWrapper — the manual getWrappedConnection() was
  duplicating that and would fatal on the null the signature allows. Drop the
  dead argument to isModuleImageDeployed(), which declares no parameter.
- Route the form labels through the trans() helper that existed unused.
- Use the inherited $this->translator instead of an injected duplicate.
- Correct the claim that Thelia 3 has no front-office hooks: it has
  ThemeHookInterface + theme_hook(), but the active theme declares no point.
ThemeHookInterface exists but nothing consumes its thelia.theme_hook tag and no
theme_hook() Twig function is registered, so it cannot be used to render the
bank details. The Twig function stays the only mechanism available today.
@anoziere
anoziere merged commit 88e932a into thelia-modules:twig Aug 5, 2026
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.

2 participants