Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ passed to the processor as container parameters).
capped at 5s) — an explicit 401/403 raises a violation, anything else fails open.
Sylius' admin form theme ignores Symfony's `help_html` option, so the
`payment_methods` docs link renders through the plugin's own form theme
(`Resources/views/Form/theme.html.twig`, scoped to that field's block prefix and registered by
(`Resources/views/form/theme.html.twig`, scoped to that field's block prefix and registered by
`SetonoSyliusQuickpayExtension::prepend()` via `twig.form_themes`).
- `FactoryBuilder/QuickpayGatewayFactoryBuilder` injects a guessed UI `language` into the gateway default config at
build time; `Guesser/LanguageGuesser` derives it from Sylius's locale context (mapping `nb`/`nn` → `no`).
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/Admin/PaymentOperationsAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ public function __invoke(int $id): Response
;
} catch (\Throwable) {
return new Response(
$this->twig->render('@SetonoSyliusQuickpayPlugin/Admin/Order/Show/Payment/_operationsError.html.twig'),
$this->twig->render('@SetonoSyliusQuickpayPlugin/admin/order/show/payment/_operations_error.html.twig'),
Response::HTTP_BAD_GATEWAY,
);
}

return new Response($this->twig->render('@SetonoSyliusQuickpayPlugin/Admin/Order/Show/Payment/_operations.html.twig', [
return new Response($this->twig->render('@SetonoSyliusQuickpayPlugin/admin/order/show/payment/_operations.html.twig', [
'quickpay_payment' => $quickpayPayment,
]));
}
Expand Down
4 changes: 2 additions & 2 deletions src/DependencyInjection/SetonoSyliusQuickpayExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function prepend(ContainerBuilder $container): void
{
if ($container->hasExtension('twig')) {
$container->prependExtensionConfig('twig', [
'form_themes' => ['@SetonoSyliusQuickpayPlugin/Form/theme.html.twig'],
'form_themes' => ['@SetonoSyliusQuickpayPlugin/form/theme.html.twig'],
]);
}

Expand All @@ -39,7 +39,7 @@ public function prepend(ContainerBuilder $container): void
'sylius.admin.order.show.payment_content' => [
'blocks' => [
'setono_sylius_quickpay_operations' => [
'template' => '@SetonoSyliusQuickpayPlugin/Admin/Order/Show/Payment/_quickpay.html.twig',
'template' => '@SetonoSyliusQuickpayPlugin/admin/order/show/payment/_quickpay.html.twig',
'priority' => -10,
],
],
Expand Down
4 changes: 2 additions & 2 deletions tests/Controller/Admin/PaymentOperationsActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function it_renders_the_operations_fetched_from_quickpay(): void

$twig = $this->prophesize(Environment::class);
$twig->render(
'@SetonoSyliusQuickpayPlugin/Admin/Order/Show/Payment/_operations.html.twig',
'@SetonoSyliusQuickpayPlugin/admin/order/show/payment/_operations.html.twig',
Argument::that(static fn (array $context): bool => ($context['quickpay_payment'] ?? null) instanceof QuickpayPayment &&
999999 === $context['quickpay_payment']->id &&
1 === \count($context['quickpay_payment']->operations)),
Expand All @@ -80,7 +80,7 @@ public function it_renders_an_error_when_quickpay_cannot_be_reached(): void
$sdkClient->payments()->will(fn (): PaymentsEndpoint => new PaymentsEndpoint($sdkClient->reveal(), Client::configureMapperBuilder(new MapperBuilder())));

$twig = $this->prophesize(Environment::class);
$twig->render('@SetonoSyliusQuickpayPlugin/Admin/Order/Show/Payment/_operationsError.html.twig')
$twig->render('@SetonoSyliusQuickpayPlugin/admin/order/show/payment/_operations_error.html.twig')
->willReturn('<div>error</div>');

$response = ($this->createAction($sdkClient, $twig))(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function getAlias(): string
(new SetonoSyliusQuickpayExtension())->prepend($container);

self::assertSame([
['form_themes' => ['@SetonoSyliusQuickpayPlugin/Form/theme.html.twig']],
['form_themes' => ['@SetonoSyliusQuickpayPlugin/form/theme.html.twig']],
], $container->getExtensionConfig('twig'));
}

Expand Down Expand Up @@ -152,7 +152,7 @@ public function getAlias(): string
'sylius.admin.order.show.payment_content' => [
'blocks' => [
'setono_sylius_quickpay_operations' => [
'template' => '@SetonoSyliusQuickpayPlugin/Admin/Order/Show/Payment/_quickpay.html.twig',
'template' => '@SetonoSyliusQuickpayPlugin/admin/order/show/payment/_quickpay.html.twig',
'priority' => -10,
],
],
Expand Down
Loading