Skip to content

Rename twig template folders and files to snake_case #115

Description

@loevgaard

The plugin's twig templates use CamelCase folders (and one camelCase filename), a Sylius 1.x-bundle legacy style. Modern Symfony/Sylius convention is snake_case throughout the template tree.

Renames

Current New
src/Resources/views/Form/theme.html.twig src/Resources/views/form/theme.html.twig
src/Resources/views/Admin/Order/Show/Payment/_operations.html.twig src/Resources/views/admin/order/show/payment/_operations.html.twig
src/Resources/views/Admin/Order/Show/Payment/_operationsError.html.twig src/Resources/views/admin/order/show/payment/_operations_error.html.twig
src/Resources/views/Admin/Order/Show/Payment/_quickpay.html.twig src/Resources/views/admin/order/show/payment/_quickpay.html.twig

(_operationsError is the one file that is itself camelCase, not just its path.)

Reference sites to update (8)

  • src/Controller/Admin/PaymentOperationsAction.php — two render() calls
  • src/DependencyInjection/SetonoSyliusQuickpayExtension.php — the prepended form_themes entry and the admin order template config
  • tests/Controller/Admin/PaymentOperationsActionTest.php — two path assertions
  • tests/DependencyInjection/SetonoSyliusQuickpayExtensionTest.php — two expectations

BC note

Template paths are override points — host apps override via templates/bundles/SetonoSyliusQuickpayPlugin/<same path>, so renaming changes those override paths. All four templates are new in unreleased 2.x (form theme + the #105 operations panel), so the rename is free if it ships before the first stable tag; no UPGRADE-2.0.md entry needed since 1.x shipped no templates at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions