From 6831acdfcbcecb20f33e10840eeea35f7df788be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20L=C3=B8vgaard?= Date: Thu, 20 Jun 2024 12:25:49 +0200 Subject: [PATCH] Change all occurences of setono_sylius_peak_wms to setono_sylius_peak --- README.md | 10 +++++----- src/Controller/Admin/PeakController.php | 4 ++-- src/DependencyInjection/Configuration.php | 2 +- ...Extension.php => SetonoSyliusPeakExtension.php} | 12 ++++++------ src/EventSubscriber/AddLinkToPeakSubscriber.php | 2 +- src/EventSubscriber/AddMenuSubscriber.php | 6 +++--- ...loadOrderRequestColumnToOrderGridSubscriber.php | 6 +++--- src/Registrar/WebhookRegistrar.php | 2 +- .../doctrine/model/RegisteredWebhooks.orm.xml | 2 +- .../doctrine/model/UploadOrderRequest.orm.xml | 2 +- src/Resources/config/routes.yaml | 4 ++-- src/Resources/config/routes/admin.yaml | 12 ++++++------ src/Resources/config/routes/global.yaml | 8 +++----- src/Resources/config/routes_no_locale.yaml | 4 ++-- src/Resources/config/services/client.xml | 4 ++-- src/Resources/config/services/command.xml | 8 ++++---- src/Resources/config/services/controller.xml | 14 +++++++------- src/Resources/config/services/data_mapper.xml | 10 +++++----- src/Resources/config/services/event_subscriber.xml | 10 +++++----- src/Resources/config/services/factory.xml | 12 ++++++------ src/Resources/config/services/message.xml | 14 +++++++------- src/Resources/config/services/parser.xml | 2 +- src/Resources/config/services/processor.xml | 8 ++++---- src/Resources/config/services/provider.xml | 6 +++--- src/Resources/config/services/registrar.xml | 8 ++++---- src/Resources/config/services/webhook_handler.xml | 14 +++++++------- src/Resources/translations/messages.en.yaml | 12 ++++++------ ...ml.twig => peak_upload_order_request.html.twig} | 2 +- .../failed.html.twig | 0 .../pending.html.twig | 0 .../processing.html.twig | 0 .../uploaded.html.twig | 0 .../views/admin/{peak_wms => peak}/index.html.twig | 12 ++++++------ src/SetonoSyliusPeakPlugin.php | 8 ++++---- src/Workflow/UploadOrderRequestWorkflow.php | 2 +- tests/Application/.env | 2 +- tests/Application/Model/Order.php | 8 ++++---- .../config/routes/setono_sylius_peak_wms.yaml | 2 +- .../SetonoSyliusPeakWMSExtensionTest.php | 6 +++--- 39 files changed, 119 insertions(+), 121 deletions(-) rename src/DependencyInjection/{SetonoSyliusPeakWMSExtension.php => SetonoSyliusPeakExtension.php} (82%) rename src/Resources/views/admin/order/grid/field/{peak_wms_upload_order_request.html.twig => peak_upload_order_request.html.twig} (88%) rename src/Resources/views/admin/order/grid/field/{peak_wms_upload_order_request => peak_upload_order_request}/failed.html.twig (100%) rename src/Resources/views/admin/order/grid/field/{peak_wms_upload_order_request => peak_upload_order_request}/pending.html.twig (100%) rename src/Resources/views/admin/order/grid/field/{peak_wms_upload_order_request => peak_upload_order_request}/processing.html.twig (100%) rename src/Resources/views/admin/order/grid/field/{peak_wms_upload_order_request => peak_upload_order_request}/uploaded.html.twig (100%) rename src/Resources/views/admin/{peak_wms => peak}/index.html.twig (68%) diff --git a/README.md b/README.md index a4b7a64..563df59 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ composer require setono/sylius-peak-wms-plugin ### Add plugin class to your `bundles.php` Make sure you add it before `SyliusGridBundle`, otherwise you'll get -`You have requested a non-existent parameter "setono_sylius_peak_wms.model.remote_event.class".` exception. +`You have requested a non-existent parameter "setono_sylius_peak.model.upload_order_request.class".` exception. ```php render('@SetonoSyliusPeakPlugin/admin/peak_wms/index.html.twig', [ + return $this->render('@SetonoSyliusPeakPlugin/admin/peak/index.html.twig', [ 'apiError' => $apiError, 'webhooksShouldBeRegistered' => $this->webhookRegistrar->outOfDate(), ]); @@ -43,6 +43,6 @@ public function registerWebhooks(): RedirectResponse $this->addFlash('success', 'Webhooks registered successfully'); - return $this->redirectToRoute('setono_sylius_peak_wms_admin_peak_wms_index'); + return $this->redirectToRoute('setono_sylius_peak_admin_peak_index'); } } diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 81ae37f..1bbe6f0 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -15,7 +15,7 @@ final class Configuration implements ConfigurationInterface { public function getConfigTreeBuilder(): TreeBuilder { - $treeBuilder = new TreeBuilder('setono_sylius_peak_wms'); + $treeBuilder = new TreeBuilder('setono_sylius_peak'); $rootNode = $treeBuilder->getRootNode(); /** @psalm-suppress UndefinedInterfaceMethod,PossiblyNullReference,MixedMethodCall */ diff --git a/src/DependencyInjection/SetonoSyliusPeakWMSExtension.php b/src/DependencyInjection/SetonoSyliusPeakExtension.php similarity index 82% rename from src/DependencyInjection/SetonoSyliusPeakWMSExtension.php rename to src/DependencyInjection/SetonoSyliusPeakExtension.php index dc40b3a..aed942c 100644 --- a/src/DependencyInjection/SetonoSyliusPeakWMSExtension.php +++ b/src/DependencyInjection/SetonoSyliusPeakExtension.php @@ -14,7 +14,7 @@ use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; -final class SetonoSyliusPeakWMSExtension extends AbstractResourceExtension implements PrependExtensionInterface +final class SetonoSyliusPeakExtension extends AbstractResourceExtension implements PrependExtensionInterface { public function load(array $configs, ContainerBuilder $container): void { @@ -28,18 +28,18 @@ public function load(array $configs, ContainerBuilder $container): void $container ->registerForAutoconfiguration(SalesOrderDataMapperInterface::class) - ->addTag('setono_sylius_peak_wms.sales_order_data_mapper') + ->addTag('setono_sylius_peak.sales_order_data_mapper') ; $container ->registerForAutoconfiguration(WebhookHandlerInterface::class) - ->addTag('setono_sylius_peak_wms.webhook_handler') + ->addTag('setono_sylius_peak.webhook_handler') ; - $container->setParameter('setono_sylius_peak_wms.api_key', $config['api_key']); + $container->setParameter('setono_sylius_peak.api_key', $config['api_key']); $this->registerResources( - 'setono_sylius_peak_wms', + 'setono_sylius_peak', SyliusResourceBundle::DRIVER_DOCTRINE_ORM, $config['resources'], $container, @@ -53,7 +53,7 @@ public function prepend(ContainerBuilder $container): void $container->prependExtensionConfig('framework', [ 'messenger' => [ 'buses' => [ - 'setono_sylius_peak_wms.command_bus' => [ + 'setono_sylius_peak.command_bus' => [ 'middleware' => [ 'doctrine_transaction', 'router_context', diff --git a/src/EventSubscriber/AddLinkToPeakSubscriber.php b/src/EventSubscriber/AddLinkToPeakSubscriber.php index deeb3fd..14de90a 100644 --- a/src/EventSubscriber/AddLinkToPeakSubscriber.php +++ b/src/EventSubscriber/AddLinkToPeakSubscriber.php @@ -45,7 +45,7 @@ public function addLink(OrderShowMenuBuilderEvent $event): void 'uri' => sprintf('https://app%s.peakwms.com/dialog/orderOverview/%d/details', $this->testEnvironment ? '-test' : '', $peakOrderId), ]) ->setAttribute('type', 'link') - ->setLabel('setono_sylius_peak_wms.ui.view_order_in_peak') + ->setLabel('setono_sylius_peak.ui.view_order_in_peak') ->setLabelAttribute('icon', 'external alternate') ->setLabelAttribute('color', 'blue') ; diff --git a/src/EventSubscriber/AddMenuSubscriber.php b/src/EventSubscriber/AddMenuSubscriber.php index 3b4e1d7..1fd53c9 100644 --- a/src/EventSubscriber/AddMenuSubscriber.php +++ b/src/EventSubscriber/AddMenuSubscriber.php @@ -33,10 +33,10 @@ public function add(MenuBuilderEvent $event): void private function addChild(ItemInterface $item): void { $item - ->addChild('peak_wms', [ - 'route' => 'setono_sylius_peak_wms_admin_peak_wms_index', + ->addChild('setono_sylius_peak', [ + 'route' => 'setono_sylius_peak_admin_peak_index', ]) - ->setLabel('setono_sylius_peak_wms.ui.peak_wms') + ->setLabel('setono_sylius_peak.ui.peak') ->setLabelAttribute('icon', 'truck') ; } diff --git a/src/EventSubscriber/Grid/AddUploadOrderRequestColumnToOrderGridSubscriber.php b/src/EventSubscriber/Grid/AddUploadOrderRequestColumnToOrderGridSubscriber.php index f2d0055..0148575 100644 --- a/src/EventSubscriber/Grid/AddUploadOrderRequestColumnToOrderGridSubscriber.php +++ b/src/EventSubscriber/Grid/AddUploadOrderRequestColumnToOrderGridSubscriber.php @@ -21,12 +21,12 @@ public function add(GridDefinitionConverterEvent $event): void { $field = Field::fromNameAndType('peakWMSUploadOrderRequest', 'twig'); $field->setOptions([ - 'template' => '@SetonoSyliusPeakPlugin/admin/order/grid/field/peak_wms_upload_order_request.html.twig', + 'template' => '@SetonoSyliusPeakPlugin/admin/order/grid/field/peak_upload_order_request.html.twig', 'vars' => [ - 'labels' => '@SetonoSyliusPeakPlugin/admin/order/grid/field/peak_wms_upload_order_request', + 'labels' => '@SetonoSyliusPeakPlugin/admin/order/grid/field/peak_upload_order_request', ], ]); - $field->setLabel('setono_sylius_peak_wms.ui.peak_wms_state'); + $field->setLabel('setono_sylius_peak.ui.peak_state'); $event->getGrid()->addField($field); } diff --git a/src/Registrar/WebhookRegistrar.php b/src/Registrar/WebhookRegistrar.php index 7468b6b..b474cc1 100644 --- a/src/Registrar/WebhookRegistrar.php +++ b/src/Registrar/WebhookRegistrar.php @@ -86,7 +86,7 @@ private function getWebhooks(): array $webhooks[] = new Webhook( name: $name, url: $this->urlGenerator->generate( - name: 'setono_sylius_peak_wms_global_webhook', + name: 'setono_sylius_peak_global_webhook', parameters: ['name' => $name], referenceType: UrlGeneratorInterface::ABSOLUTE_URL, ), diff --git a/src/Resources/config/doctrine/model/RegisteredWebhooks.orm.xml b/src/Resources/config/doctrine/model/RegisteredWebhooks.orm.xml index 9b74ab4..da8edea 100644 --- a/src/Resources/config/doctrine/model/RegisteredWebhooks.orm.xml +++ b/src/Resources/config/doctrine/model/RegisteredWebhooks.orm.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> + table="setono_sylius_peak__registered_webhooks"> diff --git a/src/Resources/config/doctrine/model/UploadOrderRequest.orm.xml b/src/Resources/config/doctrine/model/UploadOrderRequest.orm.xml index 9ec4fc1..dbe3240 100644 --- a/src/Resources/config/doctrine/model/UploadOrderRequest.orm.xml +++ b/src/Resources/config/doctrine/model/UploadOrderRequest.orm.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> + table="setono_sylius_peak__upload_order_request"> diff --git a/src/Resources/config/routes.yaml b/src/Resources/config/routes.yaml index dd746c3..a3807ea 100644 --- a/src/Resources/config/routes.yaml +++ b/src/Resources/config/routes.yaml @@ -1,6 +1,6 @@ -setono_sylius_peak_wms_global: +setono_sylius_peak_global: resource: "@SetonoSyliusPeakPlugin/Resources/config/routes/global.yaml" -setono_sylius_peak_wms_admin: +setono_sylius_peak_admin: resource: "@SetonoSyliusPeakPlugin/Resources/config/routes/admin.yaml" prefix: /admin diff --git a/src/Resources/config/routes/admin.yaml b/src/Resources/config/routes/admin.yaml index 47feb93..f3c879e 100644 --- a/src/Resources/config/routes/admin.yaml +++ b/src/Resources/config/routes/admin.yaml @@ -1,11 +1,11 @@ -setono_sylius_peak_wms_admin_peak_wms_index: - path: /peak-wms +setono_sylius_peak_admin_peak_index: + path: /peak methods: [GET,POST] defaults: - _controller: setono_sylius_peak_wms.controller.admin.peak_wms::index + _controller: setono_sylius_peak.controller.admin.peak::index -setono_sylius_peak_wms_admin_peak_wms_register_webhooks: - path: /peak-wms/register-webhooks +setono_sylius_peak_admin_peak_register_webhooks: + path: /peak/register-webhooks methods: [GET] defaults: - _controller: setono_sylius_peak_wms.controller.admin.peak_wms::registerWebhooks + _controller: setono_sylius_peak.controller.admin.peak::registerWebhooks diff --git a/src/Resources/config/routes/global.yaml b/src/Resources/config/routes/global.yaml index 38f25e2..375d01a 100644 --- a/src/Resources/config/routes/global.yaml +++ b/src/Resources/config/routes/global.yaml @@ -1,6 +1,4 @@ -# todo since this plugin will support Symfony 5.4 we need to create our own Webhook implementation -setono_sylius_peak_wms_global_webhook: - path: /peak-wms/webhook +setono_sylius_peak_global_webhook: + path: /peak/webhook defaults: - _controller: webhook.controller::handle - type: 'peak_wms' + _controller: setono_sylius_peak.controller.handle_webhook diff --git a/src/Resources/config/routes_no_locale.yaml b/src/Resources/config/routes_no_locale.yaml index f4597ec..867319c 100644 --- a/src/Resources/config/routes_no_locale.yaml +++ b/src/Resources/config/routes_no_locale.yaml @@ -2,9 +2,9 @@ # localized URLs (see https://docs.sylius.com/en/latest/cookbook/shop/disabling-localised-urls.html). # To accommodate this in your plugin, provide a routes file for non localized stores and tell this in the README.md -setono_sylius_peak_wms_global: +setono_sylius_peak_global: resource: "@SetonoSyliusPeakPlugin/Resources/config/routes/global.yaml" -setono_sylius_peak_wms_admin: +setono_sylius_peak_admin: resource: "@SetonoSyliusPeakPlugin/Resources/config/routes/admin.yaml" prefix: /admin diff --git a/src/Resources/config/services/client.xml b/src/Resources/config/services/client.xml index 2ba0a44..094f9fb 100644 --- a/src/Resources/config/services/client.xml +++ b/src/Resources/config/services/client.xml @@ -2,8 +2,8 @@ - - %setono_sylius_peak_wms.api_key% + + %setono_sylius_peak.api_key% diff --git a/src/Resources/config/services/command.xml b/src/Resources/config/services/command.xml index bfdf54a..dc02511 100644 --- a/src/Resources/config/services/command.xml +++ b/src/Resources/config/services/command.xml @@ -2,16 +2,16 @@ - - + - - + diff --git a/src/Resources/config/services/controller.xml b/src/Resources/config/services/controller.xml index 4315c78..d954a32 100644 --- a/src/Resources/config/services/controller.xml +++ b/src/Resources/config/services/controller.xml @@ -2,11 +2,11 @@ - - - - + + + @@ -15,10 +15,10 @@ - - - + + diff --git a/src/Resources/config/services/data_mapper.xml b/src/Resources/config/services/data_mapper.xml index f6e18c5..979512d 100644 --- a/src/Resources/config/services/data_mapper.xml +++ b/src/Resources/config/services/data_mapper.xml @@ -2,21 +2,21 @@ - - - + - - + diff --git a/src/Resources/config/services/event_subscriber.xml b/src/Resources/config/services/event_subscriber.xml index 9c1da34..eb6551a 100644 --- a/src/Resources/config/services/event_subscriber.xml +++ b/src/Resources/config/services/event_subscriber.xml @@ -2,27 +2,27 @@ - - %kernel.debug% - - - + diff --git a/src/Resources/config/services/factory.xml b/src/Resources/config/services/factory.xml index 1d66c2f..1c705f5 100644 --- a/src/Resources/config/services/factory.xml +++ b/src/Resources/config/services/factory.xml @@ -2,16 +2,16 @@ - - + decorates="setono_sylius_peak.factory.registered_webhooks" decoration-priority="64"> + - - + decorates="setono_sylius_peak.factory.upload_order_request" decoration-priority="64"> + diff --git a/src/Resources/config/services/message.xml b/src/Resources/config/services/message.xml index a4f6822..f608de5 100644 --- a/src/Resources/config/services/message.xml +++ b/src/Resources/config/services/message.xml @@ -2,20 +2,20 @@ - - - - - %setono_sylius_peak_wms.model.upload_order_request.class% + + + + %setono_sylius_peak.model.upload_order_request.class% - - + diff --git a/src/Resources/config/services/parser.xml b/src/Resources/config/services/parser.xml index 37b8804..cc22678 100644 --- a/src/Resources/config/services/parser.xml +++ b/src/Resources/config/services/parser.xml @@ -2,7 +2,7 @@ - diff --git a/src/Resources/config/services/processor.xml b/src/Resources/config/services/processor.xml index dd72620..75eee33 100644 --- a/src/Resources/config/services/processor.xml +++ b/src/Resources/config/services/processor.xml @@ -2,11 +2,11 @@ - - - - + + + diff --git a/src/Resources/config/services/provider.xml b/src/Resources/config/services/provider.xml index aec589c..de4027c 100644 --- a/src/Resources/config/services/provider.xml +++ b/src/Resources/config/services/provider.xml @@ -2,14 +2,14 @@ - - %setono_sylius_peak_wms.factory.upload_order_request.class% + %setono_sylius_peak.factory.upload_order_request.class% - %sylius.model.product_variant.class% diff --git a/src/Resources/config/services/registrar.xml b/src/Resources/config/services/registrar.xml index 5c23121..0eb6c63 100644 --- a/src/Resources/config/services/registrar.xml +++ b/src/Resources/config/services/registrar.xml @@ -2,12 +2,12 @@ - - + - - + + diff --git a/src/Resources/config/services/webhook_handler.xml b/src/Resources/config/services/webhook_handler.xml index 0fa93b8..44cce53 100644 --- a/src/Resources/config/services/webhook_handler.xml +++ b/src/Resources/config/services/webhook_handler.xml @@ -2,23 +2,23 @@ - - - + - - - + + - + diff --git a/src/Resources/translations/messages.en.yaml b/src/Resources/translations/messages.en.yaml index b1ead29..b8adaea 100644 --- a/src/Resources/translations/messages.en.yaml +++ b/src/Resources/translations/messages.en.yaml @@ -1,13 +1,13 @@ -setono_sylius_peak_wms: +setono_sylius_peak: ui: failed: Failed pending: Pending register_webhooks: Register webhooks - register_webhooks_information: Your webhooks registration is out of date. Please click the button to register webhooks with Peak WMS. - peak_wms: Peak WMS - peak_wms_index: Manage your Peak WMS settings - peak_wms_state: Peak WMS state + register_webhooks_information: Your webhooks registration is out of date. Please click the button to register webhooks with Peak. + peak: Peak + peak_index: Manage your Peak settings + peak_state: Peak state uploaded: Uploaded processing: Processing - view_order_in_peak: View order in Peak WMS + view_order_in_peak: View order in Peak webhooks: Webhooks diff --git a/src/Resources/views/admin/order/grid/field/peak_wms_upload_order_request.html.twig b/src/Resources/views/admin/order/grid/field/peak_upload_order_request.html.twig similarity index 88% rename from src/Resources/views/admin/order/grid/field/peak_wms_upload_order_request.html.twig rename to src/Resources/views/admin/order/grid/field/peak_upload_order_request.html.twig index 6128e2d..c4e5b22 100644 --- a/src/Resources/views/admin/order/grid/field/peak_wms_upload_order_request.html.twig +++ b/src/Resources/views/admin/order/grid/field/peak_upload_order_request.html.twig @@ -1,7 +1,7 @@ {# @var data \Setono\SyliusPeakPlugin\Model\UploadOrderRequestInterface|null #} {% if data is not null %} {% set state = data.state %} - {% set value = 'setono_sylius_peak_wms.ui.' ~ state %} + {% set value = 'setono_sylius_peak.ui.' ~ state %} {% if options.vars.labels is defined %} {% include [(options.vars.labels ~ '/' ~ state ~ '.html.twig'), '@SyliusUi/Label/_default.html.twig'] with {'value': value} %} diff --git a/src/Resources/views/admin/order/grid/field/peak_wms_upload_order_request/failed.html.twig b/src/Resources/views/admin/order/grid/field/peak_upload_order_request/failed.html.twig similarity index 100% rename from src/Resources/views/admin/order/grid/field/peak_wms_upload_order_request/failed.html.twig rename to src/Resources/views/admin/order/grid/field/peak_upload_order_request/failed.html.twig diff --git a/src/Resources/views/admin/order/grid/field/peak_wms_upload_order_request/pending.html.twig b/src/Resources/views/admin/order/grid/field/peak_upload_order_request/pending.html.twig similarity index 100% rename from src/Resources/views/admin/order/grid/field/peak_wms_upload_order_request/pending.html.twig rename to src/Resources/views/admin/order/grid/field/peak_upload_order_request/pending.html.twig diff --git a/src/Resources/views/admin/order/grid/field/peak_wms_upload_order_request/processing.html.twig b/src/Resources/views/admin/order/grid/field/peak_upload_order_request/processing.html.twig similarity index 100% rename from src/Resources/views/admin/order/grid/field/peak_wms_upload_order_request/processing.html.twig rename to src/Resources/views/admin/order/grid/field/peak_upload_order_request/processing.html.twig diff --git a/src/Resources/views/admin/order/grid/field/peak_wms_upload_order_request/uploaded.html.twig b/src/Resources/views/admin/order/grid/field/peak_upload_order_request/uploaded.html.twig similarity index 100% rename from src/Resources/views/admin/order/grid/field/peak_wms_upload_order_request/uploaded.html.twig rename to src/Resources/views/admin/order/grid/field/peak_upload_order_request/uploaded.html.twig diff --git a/src/Resources/views/admin/peak_wms/index.html.twig b/src/Resources/views/admin/peak/index.html.twig similarity index 68% rename from src/Resources/views/admin/peak_wms/index.html.twig rename to src/Resources/views/admin/peak/index.html.twig index 01bba9a..f6ec51f 100644 --- a/src/Resources/views/admin/peak_wms/index.html.twig +++ b/src/Resources/views/admin/peak/index.html.twig @@ -2,13 +2,13 @@ {% import '@SyliusUi/Macro/headers.html.twig' as headers %} -{% set header = 'setono_sylius_peak_wms.ui.peak_wms'|trans %} +{% set header = 'setono_sylius_peak.ui.peak'|trans %} {% block title %}{{ header }} {{ parent() }}{% endblock %} {% block content %}
- {{ headers.default(header, 'truck', 'setono_sylius_peak_wms.ui.peak_wms_index'|trans) }} + {{ headers.default(header, 'truck', 'setono_sylius_peak.ui.peak_index'|trans) }}
@@ -28,13 +28,13 @@
-

{{ 'setono_sylius_peak_wms.ui.webhooks'|trans }}

+

{{ 'setono_sylius_peak.ui.webhooks'|trans }}

{% if webhooksShouldBeRegistered %} -

{{ 'setono_sylius_peak_wms.ui.register_webhooks_information'|trans }}

+

{{ 'setono_sylius_peak.ui.register_webhooks_information'|trans }}

{% endif %} - - {{ 'setono_sylius_peak_wms.ui.register_webhooks'|trans }} + + {{ 'setono_sylius_peak.ui.register_webhooks'|trans }}
diff --git a/src/SetonoSyliusPeakPlugin.php b/src/SetonoSyliusPeakPlugin.php index 88c8509..fae64bb 100644 --- a/src/SetonoSyliusPeakPlugin.php +++ b/src/SetonoSyliusPeakPlugin.php @@ -20,13 +20,13 @@ public function build(ContainerBuilder $container): void parent::build($container); $container->addCompilerPass(new CompositeCompilerPass( - 'setono_sylius_peak_wms.data_mapper.sales_order.composite', - 'setono_sylius_peak_wms.sales_order_data_mapper', + 'setono_sylius_peak.data_mapper.sales_order.composite', + 'setono_sylius_peak.sales_order_data_mapper', )); $container->addCompilerPass(new CompositeCompilerPass( - 'setono_sylius_peak_wms.webhook_handler.composite', - 'setono_sylius_peak_wms.webhook_handler', + 'setono_sylius_peak.webhook_handler.composite', + 'setono_sylius_peak.webhook_handler', )); } diff --git a/src/Workflow/UploadOrderRequestWorkflow.php b/src/Workflow/UploadOrderRequestWorkflow.php index 2037b9b..8a77d45 100644 --- a/src/Workflow/UploadOrderRequestWorkflow.php +++ b/src/Workflow/UploadOrderRequestWorkflow.php @@ -11,7 +11,7 @@ final class UploadOrderRequestWorkflow { private const PROPERTY_NAME = 'state'; - final public const NAME = 'setono_sylius_peak_wms__upload_order_request'; + final public const NAME = 'setono_sylius_peak__upload_order_request'; final public const TRANSITION_PROCESS = 'process'; diff --git a/tests/Application/.env b/tests/Application/.env index 9fdf002..a57eea1 100644 --- a/tests/Application/.env +++ b/tests/Application/.env @@ -23,7 +23,7 @@ APP_SECRET=EDITME # Format described at https://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url # For a sqlite database, use: "sqlite:///%kernel.project_dir%/var/data.db" # Set "serverVersion" to your server version to avoid edge-case exceptions and extra database calls -DATABASE_URL=mysql://root@127.0.0.1/setono_sylius_peak_wms_%kernel.environment%?serverVersion=5.7 +DATABASE_URL=mysql://root@127.0.0.1/setono_sylius_peak_%kernel.environment%?serverVersion=5.7 ###< doctrine/doctrine-bundle ### ###> lexik/jwt-authentication-bundle ### diff --git a/tests/Application/Model/Order.php b/tests/Application/Model/Order.php index 7858c71..8ccff8b 100644 --- a/tests/Application/Model/Order.php +++ b/tests/Application/Model/Order.php @@ -5,8 +5,8 @@ namespace Tests\Setono\SyliusPeakPlugin\Application\Model; use Doctrine\ORM\Mapping as ORM; -use Setono\SyliusPeakPlugin\Model\OrderInterface as PeakWMSOrderInterface; -use Setono\SyliusPeakPlugin\Model\OrderTrait as PeakWMSOrderTrait; +use Setono\SyliusPeakPlugin\Model\OrderInterface as PeakOrderInterface; +use Setono\SyliusPeakPlugin\Model\OrderTrait as PeakOrderTrait; use Sylius\Component\Core\Model\Order as BaseOrder; /** @@ -14,7 +14,7 @@ * * @ORM\Table(name="sylius_order") */ -class Order extends BaseOrder implements PeakWMSOrderInterface +class Order extends BaseOrder implements PeakOrderInterface { - use PeakWMSOrderTrait; + use PeakOrderTrait; } diff --git a/tests/Application/config/routes/setono_sylius_peak_wms.yaml b/tests/Application/config/routes/setono_sylius_peak_wms.yaml index d2b6681..b9fe9ce 100644 --- a/tests/Application/config/routes/setono_sylius_peak_wms.yaml +++ b/tests/Application/config/routes/setono_sylius_peak_wms.yaml @@ -1,2 +1,2 @@ -setono_sylius_peak_wms: +setono_sylius_peak: resource: "@SetonoSyliusPeakPlugin/Resources/config/routes.yaml" diff --git a/tests/DependencyInjection/SetonoSyliusPeakWMSExtensionTest.php b/tests/DependencyInjection/SetonoSyliusPeakWMSExtensionTest.php index d32b54e..980a6b1 100644 --- a/tests/DependencyInjection/SetonoSyliusPeakWMSExtensionTest.php +++ b/tests/DependencyInjection/SetonoSyliusPeakWMSExtensionTest.php @@ -5,7 +5,7 @@ namespace Tests\Setono\SyliusPeakPlugin\DependencyInjection; use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase; -use Setono\SyliusPeakPlugin\DependencyInjection\SetonoSyliusPeakWMSExtension; +use Setono\SyliusPeakPlugin\DependencyInjection\SetonoSyliusPeakExtension; /** * See examples of tests and configuration options here: https://github.com/SymfonyTest/SymfonyDependencyInjectionTest @@ -15,7 +15,7 @@ final class SetonoSyliusPeakWMSExtensionTest extends AbstractExtensionTestCase protected function getContainerExtensions(): array { return [ - new SetonoSyliusPeakWMSExtension(), + new SetonoSyliusPeakExtension(), ]; } @@ -26,6 +26,6 @@ public function after_loading_the_correct_parameter_has_been_set(): void { $this->load(); - $this->assertContainerBuilderHasParameter('setono_sylius_peak_wms.api_key', '%env(PEAK_WMS_API_KEY)%'); + $this->assertContainerBuilderHasParameter('setono_sylius_peak.api_key', '%env(PEAK_WMS_API_KEY)%'); } }