diff --git a/CLAUDE.md b/CLAUDE.md index 6d3c5e7..e6460e4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -69,11 +69,11 @@ make ecs # Docker ## Architecture -This is the **Sylius Legacy Bridge Plugin** - a plugin for bridging legacy functionality with Sylius e-commerce. It provides a complete development environment with both traditional and Docker setups. +This is the **Sylius Legacy Shop Bridge Plugin** - a plugin for bridging legacy functionality with Sylius e-commerce. It provides a complete development environment with both traditional and Docker setups. ### Core Structure -- **Main Plugin Class**: `src/SyliusLegacyBridgePlugin.php` - Entry point using `SyliusPluginTrait` -- **DI Extension**: `src/DependencyInjection/SyliusLegacyBridgeExtension.php` - Handles service loading and Doctrine migrations +- **Main Plugin Class**: `src/SyliusLegacyShopBridgePlugin.php` - Entry point using `SyliusPluginTrait` +- **DI Extension**: `src/DependencyInjection/SyliusLegacyShopBridgeExtension.php` - Handles service loading and Doctrine migrations - **Services**: `config/services.xml` - Service definitions with XML configuration - **Routes**: `config/routes/` - Separate admin and shop route definitions - **Templates**: `templates/` - Twig templates for admin and shop diff --git a/README.md b/README.md index bfc06c5..9f5691a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@

-

Sylius Legacy Bridge Plugin

+

Sylius Legacy Shop Bridge Plugin

A plugin for bridging legacy Sylius functionality with modern Sylius applications.

@@ -17,7 +17,7 @@ 1. Install the plugin via Composer: ```bash -composer require sylius/legacy-bridge-plugin +composer require sylius/legacy-shop-bridge-plugin ``` 2. Enable the plugin and required bundles in `config/bundles.php`: @@ -27,7 +27,7 @@ return [ // ... Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true], FOS\RestBundle\FOSRestBundle::class => ['all' => true], - Sylius\LegacyBridgePlugin\SyliusLegacyBridgePlugin::class => ['all' => true], + Sylius\LegacyShopBridgePlugin\SyliusLegacyShopBridgePlugin::class => ['all' => true], ]; ``` @@ -39,7 +39,7 @@ Add the plugin configuration import to your `config/packages/_sylius.yaml` (or m ```yaml imports: - - { resource: "@SyliusLegacyBridgePlugin/config/config.yaml" } + - { resource: "@SyliusLegacyShopBridgePlugin/config/config.yaml" } ``` ### 2. Configure FOSRestBundle @@ -73,16 +73,16 @@ sylius_order: resources: order: classes: - controller: Sylius\LegacyBridgePlugin\Controller\OrderController + controller: Sylius\LegacyShopBridgePlugin\Controller\OrderController order_item: classes: - controller: Sylius\LegacyBridgePlugin\Controller\OrderItemController + controller: Sylius\LegacyShopBridgePlugin\Controller\OrderItemController sylius_addressing: resources: province: classes: - controller: Sylius\LegacyBridgePlugin\Controller\ProvinceController + controller: Sylius\LegacyShopBridgePlugin\Controller\ProvinceController ``` **Option B: If you HAVE already any of these controllers in your project** @@ -93,7 +93,7 @@ Add the appropriate traits to your existing controllers: // src/Controller/OrderController.php namespace App\Controller; -use Sylius\LegacyBridgePlugin\Controller\Trait\OrderTrait; +use Sylius\LegacyShopBridgePlugin\Controller\Trait\OrderTrait; class OrderController extends \Sylius\Bundle\CoreBundle\Controller\OrderController { @@ -108,7 +108,7 @@ class OrderController extends \Sylius\Bundle\CoreBundle\Controller\OrderControll namespace App\Controller; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; -use Sylius\LegacyBridgePlugin\Controller\Trait\OrderItemTrait; +use Sylius\LegacyShopBridgePlugin\Controller\Trait\OrderItemTrait; class OrderItemController extends ResourceController { @@ -123,7 +123,7 @@ class OrderItemController extends ResourceController namespace App\Controller; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; -use Sylius\LegacyBridgePlugin\Controller\Trait\ProvinceTrait; +use Sylius\LegacyShopBridgePlugin\Controller\Trait\ProvinceTrait; class ProvinceController extends ResourceController { @@ -135,7 +135,7 @@ class ProvinceController extends ResourceController ### 4. Update UI Configuration -Replace `sylius_ui` configuration with `sylius_legacy_bridge` in your `config/packages/sylius_ui.yaml` (or wherever your UI events are configured): +Replace `sylius_ui` configuration with `sylius_legacy_shop_bridge` in your `config/packages/sylius_ui.yaml` (or wherever your UI events are configured): ```yaml # Before @@ -144,7 +144,7 @@ sylius_ui: # ... # After -sylius_legacy_bridge: +sylius_legacy_shop_bridge: events: # ... ``` @@ -161,8 +161,8 @@ twig: '%kernel.project_dir%/templates/bundles/SyliusUiBundle': 'SyliusUi' # These two lines are REQUIRED - '%kernel.project_dir%/vendor/sylius/legacy-bridge-plugin/templates/bundles/SyliusShopBundle': 'SyliusShop' - '%kernel.project_dir%/vendor/sylius/legacy-bridge-plugin/templates/bundles/SyliusUiBundle': 'SyliusUi' + '%kernel.project_dir%/vendor/sylius/legacy-shop-bridge-plugin/templates/bundles/SyliusShopBundle': 'SyliusShop' + '%kernel.project_dir%/vendor/sylius/legacy-shop-bridge-plugin/templates/bundles/SyliusUiBundle': 'SyliusUi' ``` **Note:** The first two lines are only needed if you have customized `SyliusShopBundle` or `SyliusUiBundle` templates in your `templates/bundles/` directory. The last two lines pointing to the plugin's templates are always required. @@ -180,8 +180,8 @@ sylius_shop: _locale: ^[a-z]{2}(?:_[A-Z]{2})?$ # Legacy bridge routes - must be loaded AFTER shop routes -sylius_legacy_bridge: - resource: "@SyliusLegacyBridgePlugin/config/routes.yaml" +sylius_legacy_shop_bridge: + resource: "@SyliusLegacyShopBridgePlugin/config/routes.yaml" ``` ### 7. Update Encore Entry Points (Shop) @@ -243,7 +243,7 @@ Encore.reset(); Encore .setOutputPath('public/build/legacy/shop') .setPublicPath('/build/legacy/shop') - .addEntry('legacy-shop-entry', path.resolve(__dirname, './vendor/sylius/legacy-bridge-plugin/assets/shop/entrypoint.js')) + .addEntry('legacy-shop-entry', path.resolve(__dirname, './vendor/sylius/legacy-shop-bridge-plugin/assets/shop/entrypoint.js')) .addAliases({ 'semantic-ui-css': path.resolve(__dirname, 'node_modules/semantic-ui-css'), 'jquery': path.resolve(__dirname, 'node_modules/jquery'), diff --git a/composer.json b/composer.json index 79f6723..8b64529 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,11 @@ { - "name": "sylius/legacy-bridge-plugin", + "name": "sylius/legacy-shop-bridge-plugin", "type": "sylius-plugin", - "description": "Legacy Bridge plugin for Sylius.", + "description": "Legacy Shop Bridge plugin for Sylius.", "keywords": [ "sylius", "sylius-plugin", - "legacy-bridge" + "legacy-shop-bridge" ], "license": "MIT", "require": { @@ -66,12 +66,12 @@ }, "autoload": { "psr-4": { - "Sylius\\LegacyBridgePlugin\\": "src/" + "Sylius\\LegacyShopBridgePlugin\\": "src/" } }, "autoload-dev": { "psr-4": { - "Tests\\Sylius\\LegacyBridgePlugin\\": ["tests/", "tests/TestApplication/src/"] + "Tests\\Sylius\\LegacyShopBridgePlugin\\": ["tests/", "tests/TestApplication/src/"] } } } diff --git a/config/config.yaml b/config/config.yaml index e0fc71a..81e9515 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -1,5 +1,5 @@ imports: - - { resource: "@SyliusLegacyBridgePlugin/config/events.yaml" } + - { resource: "@SyliusLegacyShopBridgePlugin/config/events.yaml" } sonata_block: default_contexts: ~ diff --git a/config/events.yaml b/config/events.yaml index 87dfe1c..871b740 100644 --- a/config/events.yaml +++ b/config/events.yaml @@ -1,7 +1,7 @@ # This file is part of the Sylius package. # (c) Sylius Sp. z o.o. -sylius_legacy_bridge: +sylius_legacy_shop_bridge: events: sylius.grid: blocks: diff --git a/config/routes.yaml b/config/routes.yaml index 77c9e62..7e0b1d6 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -1,11 +1,11 @@ -sylius_legacy_bridge_shop: - resource: "@SyliusLegacyBridgePlugin/config/routes/shop.yaml" +sylius_legacy_shop_bridge_shop: + resource: "@SyliusLegacyShopBridgePlugin/config/routes/shop.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_legacy_bridge_legacy_shop: - resource: "@SyliusLegacyBridgePlugin/config/routes/legacy_shop.yaml" +sylius_legacy_shop_bridge_legacy_shop: + resource: "@SyliusLegacyShopBridgePlugin/config/routes/legacy_shop.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/config/routes/legacy_shop.yaml b/config/routes/legacy_shop.yaml index 71c2738..418a14b 100644 --- a/config/routes/legacy_shop.yaml +++ b/config/routes/legacy_shop.yaml @@ -8,36 +8,36 @@ sylius_shop_homepage: _controller: sylius.controller.shop.homepage::indexAction sylius_shop_security: - resource: "@SyliusLegacyBridgePlugin/config/routes/legacy_shop/security.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/legacy_shop/security.yml" sylius_shop_user: - resource: "@SyliusLegacyBridgePlugin/config/routes/legacy_shop/shop_user.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/legacy_shop/shop_user.yml" sylius_shop_product: - resource: "@SyliusLegacyBridgePlugin/config/routes/legacy_shop/product.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/legacy_shop/product.yml" sylius_shop_product_review: - resource: "@SyliusLegacyBridgePlugin/config/routes/legacy_shop/product_review.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/legacy_shop/product_review.yml" prefix: /products/{slug}/reviews sylius_shop_cart: - resource: "@SyliusLegacyBridgePlugin/config/routes/legacy_shop/cart.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/legacy_shop/cart.yml" prefix: /cart sylius_shop_checkout: - resource: "@SyliusLegacyBridgePlugin/config/routes/legacy_shop/checkout.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/legacy_shop/checkout.yml" prefix: /checkout sylius_shop_contact_request: - resource: "@SyliusLegacyBridgePlugin/config/routes/legacy_shop/contact.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/legacy_shop/contact.yml" prefix: /contact sylius_shop_order: - resource: "@SyliusLegacyBridgePlugin/config/routes/legacy_shop/order.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/legacy_shop/order.yml" prefix: /order sylius_shop_account: - resource: "@SyliusLegacyBridgePlugin/config/routes/legacy_shop/account.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/legacy_shop/account.yml" prefix: /account sylius_shop_switch_currency: diff --git a/config/routes/legacy_shop/account.yml b/config/routes/legacy_shop/account.yml index a23ba1f..4b7f94e 100644 --- a/config/routes/legacy_shop/account.yml +++ b/config/routes/legacy_shop/account.yml @@ -2,11 +2,11 @@ # (c) Sylius Sp. z o.o. sylius_shop_account_order: - resource: "@SyliusLegacyBridgePlugin/config/routes/legacy_shop/account/order.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/legacy_shop/account/order.yml" prefix: /orders sylius_shop_account_address_book: - resource: "@SyliusLegacyBridgePlugin/config/routes/legacy_shop/account/address_book.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/legacy_shop/account/address_book.yml" prefix: /address-book sylius_shop_account_root: diff --git a/config/routes/shop.yaml b/config/routes/shop.yaml index 02694c9..8af0e80 100644 --- a/config/routes/shop.yaml +++ b/config/routes/shop.yaml @@ -2,9 +2,9 @@ # (c) Sylius Sp. z o.o. sylius_shop_ajax: - resource: "@SyliusLegacyBridgePlugin/config/routes/shop/ajax.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/shop/ajax.yml" prefix: /ajax sylius_shop_partial: - resource: "@SyliusLegacyBridgePlugin/config/routes/shop/partial.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/shop/partial.yml" prefix: /_partial diff --git a/config/routes/shop/ajax.yml b/config/routes/shop/ajax.yml index 604b7eb..bd2e070 100644 --- a/config/routes/shop/ajax.yml +++ b/config/routes/shop/ajax.yml @@ -2,11 +2,11 @@ # (c) Sylius Sp. z o.o. sylius_shop_ajax_user: - resource: "@SyliusLegacyBridgePlugin/config/routes/shop/ajax/user.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/shop/ajax/user.yml" prefix: /users sylius_shop_ajax_cart: - resource: "@SyliusLegacyBridgePlugin/config/routes/shop/ajax/cart.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/shop/ajax/cart.yml" prefix: /cart sylius_shop_ajax_render_province_form: diff --git a/config/routes/shop/partial.yml b/config/routes/shop/partial.yml index df0e828..57e3978 100644 --- a/config/routes/shop/partial.yml +++ b/config/routes/shop/partial.yml @@ -2,21 +2,21 @@ # (c) Sylius Sp. z o.o. sylius_shop_partial_taxon: - resource: "@SyliusLegacyBridgePlugin/config/routes/shop/partial/taxon.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/shop/partial/taxon.yml" prefix: /taxons sylius_shop_partial_cart: - resource: "@SyliusLegacyBridgePlugin/config/routes/shop/partial/cart.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/shop/partial/cart.yml" prefix: /cart sylius_shop_partial_product: - resource: "@SyliusLegacyBridgePlugin/config/routes/shop/partial/product.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/shop/partial/product.yml" prefix: /products sylius_shop_partial_product_review: - resource: "@SyliusLegacyBridgePlugin/config/routes/shop/partial/product_review.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/shop/partial/product_review.yml" prefix: /products/{productId}/reviews sylius_shop_partial_product_association: - resource: "@SyliusLegacyBridgePlugin/config/routes/shop/partial/product_association.yml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/shop/partial/product_association.yml" prefix: /products/{productId}/associations diff --git a/config/services/context_provider.xml b/config/services/context_provider.xml index 44200cf..a4dd9f2 100644 --- a/config/services/context_provider.xml +++ b/config/services/context_provider.xml @@ -21,7 +21,7 @@ diff --git a/config/services/controller.xml b/config/services/controller.xml index 0a467e7..2ba05ba 100644 --- a/config/services/controller.xml +++ b/config/services/controller.xml @@ -19,25 +19,25 @@ - + - + - + - + diff --git a/config/services/template_event.xml b/config/services/template_event.xml index 6ca97b1..72b003b 100644 --- a/config/services/template_event.xml +++ b/config/services/template_event.xml @@ -17,16 +17,16 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd" > - + - + - + diff --git a/config/services/twig.xml b/config/services/twig.xml index 06777eb..3bb090c 100644 --- a/config/services/twig.xml +++ b/config/services/twig.xml @@ -18,17 +18,17 @@ > - + - + %sylius_ui.sonata_block.whitelisted_variables% - + diff --git a/src/ContextProvider/ContextProviderInterface.php b/src/ContextProvider/ContextProviderInterface.php index 9a790ee..995ba52 100644 --- a/src/ContextProvider/ContextProviderInterface.php +++ b/src/ContextProvider/ContextProviderInterface.php @@ -11,16 +11,10 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\ContextProvider; +namespace Sylius\LegacyShopBridgePlugin\ContextProvider; -use Sylius\LegacyBridgePlugin\Registry\TemplateBlock; +use Sylius\LegacyShopBridgePlugin\Registry\TemplateBlock; -trigger_deprecation( - 'sylius/ui-bundle', - '1.14', - 'The "%s" class is deprecated and will be removed in Sylius 2.0', - ContextProviderInterface::class, -); interface ContextProviderInterface { public function provide(array $templateContext, TemplateBlock $templateBlock): array; diff --git a/src/ContextProvider/DefaultContextProvider.php b/src/ContextProvider/DefaultContextProvider.php index 8dbba91..b379f74 100644 --- a/src/ContextProvider/DefaultContextProvider.php +++ b/src/ContextProvider/DefaultContextProvider.php @@ -11,16 +11,10 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\ContextProvider; +namespace Sylius\LegacyShopBridgePlugin\ContextProvider; -use Sylius\LegacyBridgePlugin\Registry\TemplateBlock; +use Sylius\LegacyShopBridgePlugin\Registry\TemplateBlock; -trigger_deprecation( - 'sylius/ui-bundle', - '1.14', - 'The "%s" class is deprecated and will be removed in Sylius 2.0', - DefaultContextProvider::class, -); final class DefaultContextProvider implements ContextProviderInterface { public function provide(array $templateContext, TemplateBlock $templateBlock): array diff --git a/src/Controller/CartActions.php b/src/Controller/CartActions.php index 5afcb92..529a3ea 100644 --- a/src/Controller/CartActions.php +++ b/src/Controller/CartActions.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Controller; +namespace Sylius\LegacyShopBridgePlugin\Controller; interface CartActions { diff --git a/src/Controller/CurrencySwitchController.php b/src/Controller/CurrencySwitchController.php index b97cf4b..436a602 100644 --- a/src/Controller/CurrencySwitchController.php +++ b/src/Controller/CurrencySwitchController.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Controller; +namespace Sylius\LegacyShopBridgePlugin\Controller; use Sylius\Component\Channel\Context\ChannelContextInterface; use Sylius\Component\Core\Currency\CurrencyStorageInterface; diff --git a/src/Controller/HomepageController.php b/src/Controller/HomepageController.php index c3e690c..7388a4e 100644 --- a/src/Controller/HomepageController.php +++ b/src/Controller/HomepageController.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Controller; +namespace Sylius\LegacyShopBridgePlugin\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/src/Controller/LocaleSwitchController.php b/src/Controller/LocaleSwitchController.php index 7695a8b..04c713c 100644 --- a/src/Controller/LocaleSwitchController.php +++ b/src/Controller/LocaleSwitchController.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Controller; +namespace Sylius\LegacyShopBridgePlugin\Controller; use Sylius\Bundle\ShopBundle\Locale\LocaleSwitcherInterface; use Sylius\Component\Locale\Context\LocaleContextInterface; diff --git a/src/Controller/OrderController.php b/src/Controller/OrderController.php index c134088..35e3ecb 100644 --- a/src/Controller/OrderController.php +++ b/src/Controller/OrderController.php @@ -11,9 +11,9 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Controller; +namespace Sylius\LegacyShopBridgePlugin\Controller; -use Sylius\LegacyBridgePlugin\Controller\Trait\OrderTrait; +use Sylius\LegacyShopBridgePlugin\Controller\Trait\OrderTrait; class OrderController extends \Sylius\Bundle\CoreBundle\Controller\OrderController { diff --git a/src/Controller/OrderItemController.php b/src/Controller/OrderItemController.php index 5c862cb..69c6921 100644 --- a/src/Controller/OrderItemController.php +++ b/src/Controller/OrderItemController.php @@ -11,10 +11,10 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Controller; +namespace Sylius\LegacyShopBridgePlugin\Controller; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; -use Sylius\LegacyBridgePlugin\Controller\Trait\OrderItemTrait; +use Sylius\LegacyShopBridgePlugin\Controller\Trait\OrderItemTrait; class OrderItemController extends ResourceController { diff --git a/src/Controller/ProvinceController.php b/src/Controller/ProvinceController.php index 3948f54..f5010f7 100644 --- a/src/Controller/ProvinceController.php +++ b/src/Controller/ProvinceController.php @@ -11,10 +11,10 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Controller; +namespace Sylius\LegacyShopBridgePlugin\Controller; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; -use Sylius\LegacyBridgePlugin\Controller\Trait\ProvinceTrait; +use Sylius\LegacyShopBridgePlugin\Controller\Trait\ProvinceTrait; class ProvinceController extends ResourceController { diff --git a/src/Controller/SecurityWidgetController.php b/src/Controller/SecurityWidgetController.php index 85991e3..413ddde 100644 --- a/src/Controller/SecurityWidgetController.php +++ b/src/Controller/SecurityWidgetController.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Controller; +namespace Sylius\LegacyShopBridgePlugin\Controller; use Symfony\Component\HttpFoundation\Response; use Twig\Environment; diff --git a/src/Controller/Trait/OrderItemTrait.php b/src/Controller/Trait/OrderItemTrait.php index 30b736c..4f12c8c 100644 --- a/src/Controller/Trait/OrderItemTrait.php +++ b/src/Controller/Trait/OrderItemTrait.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Controller\Trait; +namespace Sylius\LegacyShopBridgePlugin\Controller\Trait; use Doctrine\ORM\EntityManagerInterface; use FOS\RestBundle\View\View; @@ -23,7 +23,7 @@ use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface; use Sylius\Component\Order\Modifier\OrderModifierInterface; use Sylius\Component\Order\Repository\OrderRepositoryInterface; -use Sylius\LegacyBridgePlugin\Controller\CartActions; +use Sylius\LegacyShopBridgePlugin\Controller\CartActions; use Symfony\Component\Form\FormError; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; diff --git a/src/Controller/Trait/OrderTrait.php b/src/Controller/Trait/OrderTrait.php index 6268523..263b213 100644 --- a/src/Controller/Trait/OrderTrait.php +++ b/src/Controller/Trait/OrderTrait.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Controller\Trait; +namespace Sylius\LegacyShopBridgePlugin\Controller\Trait; use FOS\RestBundle\View\View; use Sylius\Resource\ResourceActions; diff --git a/src/Controller/Trait/ProvinceTrait.php b/src/Controller/Trait/ProvinceTrait.php index 730ddb7..69edf5d 100644 --- a/src/Controller/Trait/ProvinceTrait.php +++ b/src/Controller/Trait/ProvinceTrait.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Controller\Trait; +namespace Sylius\LegacyShopBridgePlugin\Controller\Trait; use Sylius\Bundle\AddressingBundle\Form\Type\ProvinceCodeChoiceType; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; diff --git a/src/DependencyInjection/Compiler/LegacySonataBlockPass.php b/src/DependencyInjection/Compiler/LegacySonataBlockPass.php index 987919a..bab44cf 100644 --- a/src/DependencyInjection/Compiler/LegacySonataBlockPass.php +++ b/src/DependencyInjection/Compiler/LegacySonataBlockPass.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\DependencyInjection\Compiler; +namespace Sylius\LegacyShopBridgePlugin\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; diff --git a/src/DependencyInjection/Compiler/MakeServicesPublicCompilerPass.php b/src/DependencyInjection/Compiler/MakeServicesPublicCompilerPass.php index 29c74a7..5639f11 100644 --- a/src/DependencyInjection/Compiler/MakeServicesPublicCompilerPass.php +++ b/src/DependencyInjection/Compiler/MakeServicesPublicCompilerPass.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\DependencyInjection\Compiler; +namespace Sylius\LegacyShopBridgePlugin\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index dd17a07..bceb9fb 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\DependencyInjection; +namespace Sylius\LegacyShopBridgePlugin\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; @@ -14,7 +14,7 @@ final class Configuration implements ConfigurationInterface */ public function getConfigTreeBuilder(): TreeBuilder { - $treeBuilder = new TreeBuilder('sylius_legacy_bridge'); + $treeBuilder = new TreeBuilder('sylius_legacy_shop_bridge'); $rootNode = $treeBuilder->getRootNode(); $rootNode diff --git a/src/DependencyInjection/SyliusLegacyBridgeExtension.php b/src/DependencyInjection/SyliusLegacyShopBridgeExtension.php similarity index 93% rename from src/DependencyInjection/SyliusLegacyBridgeExtension.php rename to src/DependencyInjection/SyliusLegacyShopBridgeExtension.php index 4375492..b228f90 100644 --- a/src/DependencyInjection/SyliusLegacyBridgeExtension.php +++ b/src/DependencyInjection/SyliusLegacyShopBridgeExtension.php @@ -2,19 +2,19 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\DependencyInjection; +namespace Sylius\LegacyShopBridgePlugin\DependencyInjection; use Laminas\Stdlib\SplPriorityQueue; use Sylius\Bundle\CoreBundle\DependencyInjection\PrependDoctrineMigrationsTrait; use Sylius\Bundle\ResourceBundle\DependencyInjection\Extension\AbstractResourceExtension; -use Sylius\LegacyBridgePlugin\Registry\TemplateBlock; +use Sylius\LegacyShopBridgePlugin\Registry\TemplateBlock; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -final class SyliusLegacyBridgeExtension extends AbstractResourceExtension implements PrependExtensionInterface +final class SyliusLegacyShopBridgeExtension extends AbstractResourceExtension implements PrependExtensionInterface { use PrependDoctrineMigrationsTrait; @@ -36,7 +36,7 @@ protected function getMigrationsNamespace(): string protected function getMigrationsDirectory(): string { - return '@SyliusLegacyBridgePlugin/src/Migrations'; + return '@SyliusLegacyShopBridgePlugin/src/Migrations'; } protected function getNamespacesOfMigrationsExecutedBefore(): array diff --git a/src/Registry/TemplateBlock.php b/src/Registry/TemplateBlock.php index f1a67c2..d7e7779 100644 --- a/src/Registry/TemplateBlock.php +++ b/src/Registry/TemplateBlock.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Registry; +namespace Sylius\LegacyShopBridgePlugin\Registry; final class TemplateBlock { diff --git a/src/Registry/TemplateBlockRegistry.php b/src/Registry/TemplateBlockRegistry.php index b57f7d7..514e473 100644 --- a/src/Registry/TemplateBlockRegistry.php +++ b/src/Registry/TemplateBlockRegistry.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Registry; +namespace Sylius\LegacyShopBridgePlugin\Registry; use Laminas\Stdlib\SplPriorityQueue; diff --git a/src/Registry/TemplateBlockRegistryInterface.php b/src/Registry/TemplateBlockRegistryInterface.php index 7d6d7bf..04fd083 100644 --- a/src/Registry/TemplateBlockRegistryInterface.php +++ b/src/Registry/TemplateBlockRegistryInterface.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Registry; +namespace Sylius\LegacyShopBridgePlugin\Registry; interface TemplateBlockRegistryInterface { diff --git a/src/Renderer/DelegatingTemplateEventRenderer.php b/src/Renderer/DelegatingTemplateEventRenderer.php index 4d55b57..e538747 100644 --- a/src/Renderer/DelegatingTemplateEventRenderer.php +++ b/src/Renderer/DelegatingTemplateEventRenderer.php @@ -11,9 +11,9 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Renderer; +namespace Sylius\LegacyShopBridgePlugin\Renderer; -use Sylius\LegacyBridgePlugin\Registry\TemplateBlockRegistryInterface; +use Sylius\LegacyShopBridgePlugin\Registry\TemplateBlockRegistryInterface; final class DelegatingTemplateEventRenderer implements TemplateEventRendererInterface { diff --git a/src/Renderer/HtmlDebugTemplateBlockRenderer.php b/src/Renderer/HtmlDebugTemplateBlockRenderer.php index 9713409..727ae51 100644 --- a/src/Renderer/HtmlDebugTemplateBlockRenderer.php +++ b/src/Renderer/HtmlDebugTemplateBlockRenderer.php @@ -11,9 +11,9 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Renderer; +namespace Sylius\LegacyShopBridgePlugin\Renderer; -use Sylius\LegacyBridgePlugin\Registry\TemplateBlock; +use Sylius\LegacyShopBridgePlugin\Registry\TemplateBlock; final class HtmlDebugTemplateBlockRenderer implements TemplateBlockRendererInterface { diff --git a/src/Renderer/HtmlDebugTemplateEventRenderer.php b/src/Renderer/HtmlDebugTemplateEventRenderer.php index 59da088..17012f4 100644 --- a/src/Renderer/HtmlDebugTemplateEventRenderer.php +++ b/src/Renderer/HtmlDebugTemplateEventRenderer.php @@ -11,10 +11,10 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Renderer; +namespace Sylius\LegacyShopBridgePlugin\Renderer; -use Sylius\LegacyBridgePlugin\Registry\TemplateBlock; -use Sylius\LegacyBridgePlugin\Registry\TemplateBlockRegistryInterface; +use Sylius\LegacyShopBridgePlugin\Registry\TemplateBlock; +use Sylius\LegacyShopBridgePlugin\Registry\TemplateBlockRegistryInterface; final class HtmlDebugTemplateEventRenderer implements TemplateEventRendererInterface { diff --git a/src/Renderer/TemplateBlockRendererInterface.php b/src/Renderer/TemplateBlockRendererInterface.php index 44214c7..ff2c01f 100644 --- a/src/Renderer/TemplateBlockRendererInterface.php +++ b/src/Renderer/TemplateBlockRendererInterface.php @@ -11,9 +11,9 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Renderer; +namespace Sylius\LegacyShopBridgePlugin\Renderer; -use Sylius\LegacyBridgePlugin\Registry\TemplateBlock; +use Sylius\LegacyShopBridgePlugin\Registry\TemplateBlock; interface TemplateBlockRendererInterface { diff --git a/src/Renderer/TemplateEventRendererInterface.php b/src/Renderer/TemplateEventRendererInterface.php index 2662677..f8d1723 100644 --- a/src/Renderer/TemplateEventRendererInterface.php +++ b/src/Renderer/TemplateEventRendererInterface.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Renderer; +namespace Sylius\LegacyShopBridgePlugin\Renderer; interface TemplateEventRendererInterface { diff --git a/src/Renderer/TwigTemplateBlockRenderer.php b/src/Renderer/TwigTemplateBlockRenderer.php index f84d1b0..64172ef 100644 --- a/src/Renderer/TwigTemplateBlockRenderer.php +++ b/src/Renderer/TwigTemplateBlockRenderer.php @@ -11,10 +11,10 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Renderer; +namespace Sylius\LegacyShopBridgePlugin\Renderer; -use Sylius\LegacyBridgePlugin\ContextProvider\ContextProviderInterface; -use Sylius\LegacyBridgePlugin\Registry\TemplateBlock; +use Sylius\LegacyShopBridgePlugin\ContextProvider\ContextProviderInterface; +use Sylius\LegacyShopBridgePlugin\Registry\TemplateBlock; use Twig\Environment; final class TwigTemplateBlockRenderer implements TemplateBlockRendererInterface diff --git a/src/SyliusLegacyBridgePlugin.php b/src/SyliusLegacyShopBridgePlugin.php similarity index 65% rename from src/SyliusLegacyBridgePlugin.php rename to src/SyliusLegacyShopBridgePlugin.php index edee30e..46324e4 100644 --- a/src/SyliusLegacyBridgePlugin.php +++ b/src/SyliusLegacyShopBridgePlugin.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin; +namespace Sylius\LegacyShopBridgePlugin; use Sylius\Bundle\CoreBundle\Application\SyliusPluginTrait; -use Sylius\LegacyBridgePlugin\DependencyInjection\Compiler\LegacySonataBlockPass; -use Sylius\LegacyBridgePlugin\DependencyInjection\Compiler\MakeServicesPublicCompilerPass; +use Sylius\LegacyShopBridgePlugin\DependencyInjection\Compiler\LegacySonataBlockPass; +use Sylius\LegacyShopBridgePlugin\DependencyInjection\Compiler\MakeServicesPublicCompilerPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; -final class SyliusLegacyBridgePlugin extends Bundle +final class SyliusLegacyShopBridgePlugin extends Bundle { use SyliusPluginTrait; diff --git a/src/Twig/LegacySonataBlockExtension.php b/src/Twig/LegacySonataBlockExtension.php index 1f4caf8..773dfb6 100644 --- a/src/Twig/LegacySonataBlockExtension.php +++ b/src/Twig/LegacySonataBlockExtension.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Twig; +namespace Sylius\LegacyShopBridgePlugin\Twig; use Twig\Extension\AbstractExtension; use Twig\TwigFunction; diff --git a/src/Twig/SortByExtension.php b/src/Twig/SortByExtension.php index fa72d85..0973aad 100644 --- a/src/Twig/SortByExtension.php +++ b/src/Twig/SortByExtension.php @@ -11,7 +11,7 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Twig; +namespace Sylius\LegacyShopBridgePlugin\Twig; use Sylius\TwigExtra\Twig\Extension\SortByExtension as BaseSortByExtension; use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; @@ -37,7 +37,7 @@ public function getFilters(): array public function sortBy(iterable $iterable, string $field, string $order = 'ASC'): array { trigger_deprecation( - 'sylius/legacy-bridge-plugin', + 'sylius/legacy-shop-bridge-plugin', '1.0', 'The "sort_by" filter is deprecated. Use "sylius_sort_by" instead.', ); diff --git a/src/Twig/TemplateEventExtension.php b/src/Twig/TemplateEventExtension.php index 052ec0b..d3b8f75 100644 --- a/src/Twig/TemplateEventExtension.php +++ b/src/Twig/TemplateEventExtension.php @@ -11,9 +11,9 @@ declare(strict_types=1); -namespace Sylius\LegacyBridgePlugin\Twig; +namespace Sylius\LegacyShopBridgePlugin\Twig; -use Sylius\LegacyBridgePlugin\Renderer\TemplateEventRendererInterface; +use Sylius\LegacyShopBridgePlugin\Renderer\TemplateEventRendererInterface; use Twig\Extension\AbstractExtension; use Twig\TwigFunction; use Webmozart\Assert\Assert; diff --git a/tests/TestApplication/.env b/tests/TestApplication/.env index 06bbc3f..9d1dd2e 100644 --- a/tests/TestApplication/.env +++ b/tests/TestApplication/.env @@ -1,5 +1,5 @@ -DATABASE_URL=mysql://root:root@127.0.0.1/sylius_legacy_bridge_plugin_%kernel.environment% +DATABASE_URL=mysql://root:root@127.0.0.1/sylius_legacy_shop_bridge_plugin_%kernel.environment% SYLIUS_TEST_APP_BUNDLES_PATH="tests/TestApplication/config/bundles.php" -SYLIUS_TEST_APP_CONFIGS_TO_IMPORT="@SyliusLegacyBridgePlugin/tests/TestApplication/config/config.yaml" -SYLIUS_TEST_APP_ROUTES_TO_IMPORT="@SyliusLegacyBridgePlugin/tests/TestApplication/config/routes.yaml" +SYLIUS_TEST_APP_CONFIGS_TO_IMPORT="@SyliusLegacyShopBridgePlugin/tests/TestApplication/config/config.yaml" +SYLIUS_TEST_APP_ROUTES_TO_IMPORT="@SyliusLegacyShopBridgePlugin/tests/TestApplication/config/routes.yaml" diff --git a/tests/TestApplication/.env.test b/tests/TestApplication/.env.test index c87d791..a68ddd8 100644 --- a/tests/TestApplication/.env.test +++ b/tests/TestApplication/.env.test @@ -1 +1 @@ -DATABASE_URL=mysql://root:root@127.0.0.1/sylius_legacy_bridge_plugin_%kernel.environment% +DATABASE_URL=mysql://root:root@127.0.0.1/sylius_legacy_shop_bridge_plugin_%kernel.environment% diff --git a/tests/TestApplication/config/bundles.php b/tests/TestApplication/config/bundles.php index 76d193b..ae00883 100644 --- a/tests/TestApplication/config/bundles.php +++ b/tests/TestApplication/config/bundles.php @@ -2,5 +2,5 @@ return [ Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true], - Sylius\LegacyBridgePlugin\SyliusLegacyBridgePlugin::class => ['all' => true], + Sylius\LegacyShopBridgePlugin\SyliusLegacyShopBridgePlugin::class => ['all' => true], ]; diff --git a/tests/TestApplication/config/config.yaml b/tests/TestApplication/config/config.yaml index b856042..b5998d9 100644 --- a/tests/TestApplication/config/config.yaml +++ b/tests/TestApplication/config/config.yaml @@ -1,2 +1,2 @@ imports: - - { resource: "@SyliusLegacyBridgePlugin/config/config.yaml" } + - { resource: "@SyliusLegacyShopBridgePlugin/config/config.yaml" } diff --git a/tests/TestApplication/config/routes.yaml b/tests/TestApplication/config/routes.yaml index 35f1e17..96640b4 100644 --- a/tests/TestApplication/config/routes.yaml +++ b/tests/TestApplication/config/routes.yaml @@ -1,5 +1,5 @@ sylius_legacy_bridge_shop: - resource: "@SyliusLegacyBridgePlugin/config/routes/shop.yaml" + resource: "@SyliusLegacyShopBridgePlugin/config/routes/shop.yaml" prefix: /{_locale} requirements: _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$