From fc0aea68a27c5eb136a38bba44e1c842c4c13f37 Mon Sep 17 00:00:00 2001 From: Wojdylak Date: Wed, 27 Nov 2024 13:01:27 +0100 Subject: [PATCH] Bump sylius to version 2.0 --- composer.json | 9 +++++---- config/bundles.php | 2 ++ config/packages/_sylius.yaml | 1 + config/packages/fos_rest.yaml | 11 +++++++++++ config/routes.yaml | 3 ++- config/routes/sylius_admin.yaml | 6 +++--- config/routes/sylius_shop.yaml | 10 +++++----- symfony.lock | 15 +++++++++++++++ 8 files changed, 44 insertions(+), 13 deletions(-) create mode 100644 config/packages/fos_rest.yaml diff --git a/composer.json b/composer.json index fddec28..c325b2c 100644 --- a/composer.json +++ b/composer.json @@ -20,12 +20,13 @@ } ], "require": { + "bugsnag/bugsnag-symfony": "^1.7", + "nyholm/psr7": "^1.8", "php": "^8.2", - "sylius/sylius": "2.0.x-dev", - "symfony/flex": "^2.4", "sylius/invoicing-plugin": "2.0.x-dev", - "bugsnag/bugsnag-symfony": "^1.7", - "nyholm/psr7": "^1.8" + "sylius/paypal-plugin": "2.0.x-dev", + "sylius/sylius": "2.0.x-dev", + "symfony/flex": "^2.4" }, "require-dev": { "behat/behat": "^3.14", diff --git a/config/bundles.php b/config/bundles.php index a9fef42..175279e 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -64,4 +64,6 @@ Symfony\UX\Autocomplete\AutocompleteBundle::class => ['all' => true], Sylius\TwigExtra\Symfony\SyliusTwigExtraBundle::class => ['all' => true], FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true], + FOS\RestBundle\FOSRestBundle::class => ['all' => true], + Sylius\PayPalPlugin\SyliusPayPalPlugin::class => ['all' => true], ]; diff --git a/config/packages/_sylius.yaml b/config/packages/_sylius.yaml index 63a44ba..2491c7e 100644 --- a/config/packages/_sylius.yaml +++ b/config/packages/_sylius.yaml @@ -4,6 +4,7 @@ imports: - { resource: "@SyliusShopBundle/Resources/config/app/config.yml" } - { resource: "@SyliusApiBundle/Resources/config/app/config.yaml" } - { resource: "@SyliusPayumBundle/Resources/config/app/config.yaml" } + - { resource: "@SyliusPayPalPlugin/config/config.yaml" } parameters: fixtures_dir: "%kernel.project_dir%/src/Resources/fixtures" diff --git a/config/packages/fos_rest.yaml b/config/packages/fos_rest.yaml new file mode 100644 index 0000000..a72eef7 --- /dev/null +++ b/config/packages/fos_rest.yaml @@ -0,0 +1,11 @@ +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/config/routes.yaml b/config/routes.yaml index 8b13789..f99bec1 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -1 +1,2 @@ - +sylius_paypal_webhook: + resource: "@SyliusPayPalPlugin/config/webhook_routing.yaml" diff --git a/config/routes/sylius_admin.yaml b/config/routes/sylius_admin.yaml index b462bcb..a2b5fcb 100644 --- a/config/routes/sylius_admin.yaml +++ b/config/routes/sylius_admin.yaml @@ -2,6 +2,6 @@ sylius_admin: resource: "@SyliusAdminBundle/Resources/config/routing.yml" prefix: /admin -#sylius_paypal_admin: -# resource: "@SyliusPayPalPlugin/Resources/config/admin_routing.yml" -# prefix: /admin +sylius_paypal_admin: + resource: "@SyliusPayPalPlugin/config/admin_routing.yml" + prefix: '/%sylius_admin.path_name%' diff --git a/config/routes/sylius_shop.yaml b/config/routes/sylius_shop.yaml index 236921f..16dfa3e 100644 --- a/config/routes/sylius_shop.yaml +++ b/config/routes/sylius_shop.yaml @@ -16,8 +16,8 @@ sylius_shop_payum: sylius_payment_notify: resource: "@SyliusPaymentBundle/Resources/config/routing/integrations/sylius.yaml" -#sylius_paypal: -# resource: "@SyliusPayPalPlugin/Resources/config/shop_routing.yaml" -# prefix: /{_locale} -# requirements: -# _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$ +sylius_paypal_shop: + resource: "@SyliusPayPalPlugin/config/shop_routing.yaml" + prefix: /{_locale} + requirements: + _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$ diff --git a/symfony.lock b/symfony.lock index cb6a906..eb90a18 100644 --- a/symfony.lock +++ b/symfony.lock @@ -163,6 +163,18 @@ "friendsofphp/proxy-manager-lts": { "version": "v1.0.12" }, + "friendsofsymfony/rest-bundle": { + "version": "3.7", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "main", + "version": "3.0", + "ref": "3762cc4e4f2d6faabeca5a151b41c8c791bd96e5" + }, + "files": [ + "config/packages/fos_rest.yaml" + ] + }, "gedmo/doctrine-extensions": { "version": "v2.4.36" }, @@ -531,6 +543,9 @@ "sylius/mailer-bundle": { "version": "v1.7.1" }, + "sylius/paypal-plugin": { + "version": "2.0.x-dev" + }, "sylius/registry": { "version": "v1.4.1" },