From bac3797b45fafaf763a5ad08516c85cfe3d09ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Jaskulski?= <40125720+Rafikooo@users.noreply.github.com> Date: Mon, 9 Dec 2024 07:33:33 +0100 Subject: [PATCH] Add New Sylius Recipes (#1723) * Add sylius/invoicing-plugin:1.0 recipe * Add sylius/refund-plugin:2.0 recipe * Add sylius/paypal-plugin:2.0 recipe * Remove sylius/refund-plugin:0.4 recipe --- .../1.0/config/packages/sylius_invoicing.yaml | 2 ++ .../1.0/config/routes/sylius_invoicing.yaml | 9 +++++++++ sylius/invoicing-plugin/1.0/manifest.json | 8 ++++++++ .../2.0/config/packages/sylius_paypal.yaml | 14 ++++++++++++++ .../2.0/config/routes/sylius_paypal.yaml | 12 ++++++++++++ sylius/paypal-plugin/2.0/manifest.json | 8 ++++++++ .../0.4/config/packages/sylius_refund.yaml | 2 -- .../0.4/config/routes/sylius_refund.yaml | 2 -- .../2.0/config/packages/sylius_refund.yaml | 2 ++ .../2.0/config/routes/sylius_refund.yaml | 9 +++++++++ sylius/refund-plugin/{0.4 => 2.0}/manifest.json | 0 11 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 sylius/invoicing-plugin/1.0/config/packages/sylius_invoicing.yaml create mode 100644 sylius/invoicing-plugin/1.0/config/routes/sylius_invoicing.yaml create mode 100644 sylius/invoicing-plugin/1.0/manifest.json create mode 100644 sylius/paypal-plugin/2.0/config/packages/sylius_paypal.yaml create mode 100644 sylius/paypal-plugin/2.0/config/routes/sylius_paypal.yaml create mode 100644 sylius/paypal-plugin/2.0/manifest.json delete mode 100644 sylius/refund-plugin/0.4/config/packages/sylius_refund.yaml delete mode 100644 sylius/refund-plugin/0.4/config/routes/sylius_refund.yaml create mode 100644 sylius/refund-plugin/2.0/config/packages/sylius_refund.yaml create mode 100644 sylius/refund-plugin/2.0/config/routes/sylius_refund.yaml rename sylius/refund-plugin/{0.4 => 2.0}/manifest.json (100%) diff --git a/sylius/invoicing-plugin/1.0/config/packages/sylius_invoicing.yaml b/sylius/invoicing-plugin/1.0/config/packages/sylius_invoicing.yaml new file mode 100644 index 000000000..93b2ba94f --- /dev/null +++ b/sylius/invoicing-plugin/1.0/config/packages/sylius_invoicing.yaml @@ -0,0 +1,2 @@ +imports: + - { resource: "@SyliusInvoicingPlugin/config/config.yaml" } diff --git a/sylius/invoicing-plugin/1.0/config/routes/sylius_invoicing.yaml b/sylius/invoicing-plugin/1.0/config/routes/sylius_invoicing.yaml new file mode 100644 index 000000000..44b42e1c7 --- /dev/null +++ b/sylius/invoicing-plugin/1.0/config/routes/sylius_invoicing.yaml @@ -0,0 +1,9 @@ +sylius_invoicing_admin: + resource: "@SyliusInvoicingPlugin/config/admin_routes.yaml" + prefix: /admin + +sylius_invoicing_shop: + resource: "@SyliusInvoicingPlugin/config/shop_routes.yaml" + prefix: /{_locale} + requirements: + _locale: ^[a-z]{2}(?:_[A-Z]{2})?$ diff --git a/sylius/invoicing-plugin/1.0/manifest.json b/sylius/invoicing-plugin/1.0/manifest.json new file mode 100644 index 000000000..1749ec675 --- /dev/null +++ b/sylius/invoicing-plugin/1.0/manifest.json @@ -0,0 +1,8 @@ +{ + "bundles": { + "Sylius\\InvoicingPlugin\\SyliusInvoicingPlugin": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + } +} diff --git a/sylius/paypal-plugin/2.0/config/packages/sylius_paypal.yaml b/sylius/paypal-plugin/2.0/config/packages/sylius_paypal.yaml new file mode 100644 index 000000000..e929f502e --- /dev/null +++ b/sylius/paypal-plugin/2.0/config/packages/sylius_paypal.yaml @@ -0,0 +1,14 @@ +imports: + - { resource: "@SyliusInvoicingPlugin/config/config.yaml" } + +fos_rest: + exception: true + view: + formats: + json: true + xml: true + empty_content: 204 + format_listener: + rules: + - { path: '^/api/.*', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true } + - { path: '^/', stop: true } diff --git a/sylius/paypal-plugin/2.0/config/routes/sylius_paypal.yaml b/sylius/paypal-plugin/2.0/config/routes/sylius_paypal.yaml new file mode 100644 index 000000000..002c573e6 --- /dev/null +++ b/sylius/paypal-plugin/2.0/config/routes/sylius_paypal.yaml @@ -0,0 +1,12 @@ +sylius_paypal_admin: + resource: "@SyliusPayPalPlugin/config/admin_routes.yaml" + prefix: /admin + +sylius_paypal_shop: + resource: "@SyliusPayPalPlugin/config/shop_routes.yaml" + prefix: /{_locale} + requirements: + _locale: ^[a-z]{2}(?:_[A-Z]{2})?$ + +sylius_paypal_plugin_webhook_refund_order: + resource: "@SyliusPayPalPlugin/config/webhook_routes.yaml" diff --git a/sylius/paypal-plugin/2.0/manifest.json b/sylius/paypal-plugin/2.0/manifest.json new file mode 100644 index 000000000..1749ec675 --- /dev/null +++ b/sylius/paypal-plugin/2.0/manifest.json @@ -0,0 +1,8 @@ +{ + "bundles": { + "Sylius\\InvoicingPlugin\\SyliusInvoicingPlugin": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + } +} diff --git a/sylius/refund-plugin/0.4/config/packages/sylius_refund.yaml b/sylius/refund-plugin/0.4/config/packages/sylius_refund.yaml deleted file mode 100644 index ce7ff8aee..000000000 --- a/sylius/refund-plugin/0.4/config/packages/sylius_refund.yaml +++ /dev/null @@ -1,2 +0,0 @@ -imports: - - { resource: "@SyliusRefundPlugin/Resources/config/app/config.yml" } diff --git a/sylius/refund-plugin/0.4/config/routes/sylius_refund.yaml b/sylius/refund-plugin/0.4/config/routes/sylius_refund.yaml deleted file mode 100644 index 46e99b160..000000000 --- a/sylius/refund-plugin/0.4/config/routes/sylius_refund.yaml +++ /dev/null @@ -1,2 +0,0 @@ -sylius_refund: - resource: "@SyliusRefundPlugin/Resources/config/routing.yml" diff --git a/sylius/refund-plugin/2.0/config/packages/sylius_refund.yaml b/sylius/refund-plugin/2.0/config/packages/sylius_refund.yaml new file mode 100644 index 000000000..5107d4fb1 --- /dev/null +++ b/sylius/refund-plugin/2.0/config/packages/sylius_refund.yaml @@ -0,0 +1,2 @@ +imports: + - { resource: "@SyliusRefundPlugin/config/config.yaml" } diff --git a/sylius/refund-plugin/2.0/config/routes/sylius_refund.yaml b/sylius/refund-plugin/2.0/config/routes/sylius_refund.yaml new file mode 100644 index 000000000..fc790e935 --- /dev/null +++ b/sylius/refund-plugin/2.0/config/routes/sylius_refund.yaml @@ -0,0 +1,9 @@ +sylius_refund_admin: + resource: "@SyliusRefundPlugin/config/admin_routes.yaml" + prefix: '/%sylius_admin.path_name%' + +sylius_refund_shop: + resource: "@SyliusRefundPlugin/config/shop_routes.yaml" + prefix: /{_locale} + requirements: + _locale: ^[a-z]{2}(?:_[A-Z]{2})?$ diff --git a/sylius/refund-plugin/0.4/manifest.json b/sylius/refund-plugin/2.0/manifest.json similarity index 100% rename from sylius/refund-plugin/0.4/manifest.json rename to sylius/refund-plugin/2.0/manifest.json