ratepay / shopware5-module

Ratepay Payment Module for Shopware 5. Supports 5.3.x up to 5.7.x
https://docs.ratepay.com/docs/developer/shop_modules/shopware/shopware_5/ratepay_payment_plugin_for_shopware/
2 stars 6 forks source link

Wrong namespaces used #30

Closed roman-1983 closed 4 years ago

roman-1983 commented 4 years ago

The plugin is not compatible with Shopware 5.6

IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- Plugins/Community/Frontend/RpayRatePay/Bootstrapping/Events/TemplateExtensionSubscriber.php (revision ad74abd88c66236b215bd91b9d26a940be75c5b9)
+++ Plugins/Community/Frontend/RpayRatePay/Bootstrapping/Events/TemplateExtensionSubscriber.php (date 1571059944562)
@@ -3,8 +3,8 @@
 namespace RpayRatePay\Bootstrapping\Events;

 use RpayRatePay\Component\Model\ShopwareCustomerWrapper;
-use Shopware\Plugins\Community\Frontend\RpayRatePay\Services\ConfigService;
-use Shopware\Plugins\Community\Frontend\RpayRatePay\Services\DfpService;
+use RpayRatePay\Services\ConfigService;
+use RpayRatePay\Services\DfpService;

 class TemplateExtensionSubscriber implements \Enlight\Event\SubscriberInterface
 {
Index: Plugins/Community/Frontend/RpayRatePay/Bootstrapping/Events/BackendOrderControllerSubscriber.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- Plugins/Community/Frontend/RpayRatePay/Bootstrapping/Events/BackendOrderControllerSubscriber.php    (revision ad74abd88c66236b215bd91b9d26a940be75c5b9)
+++ Plugins/Community/Frontend/RpayRatePay/Bootstrapping/Events/BackendOrderControllerSubscriber.php    (date 1571059929325)
@@ -8,7 +8,7 @@
 use RpayRatePay\Component\Service\Logger;
 use Shopware\Models\Order\Order;
 use RpayRatePay\Component\Service\ConfigLoader;
-use Shopware\Plugins\Community\Frontend\RpayRatePay\Services\DfpService;
+use RpayRatePay\Services\DfpService;

 class BackendOrderControllerSubscriber implements \Enlight\Event\SubscriberInterface
 {
Index: Plugins/Community/Frontend/RpayRatePay/Services/DfpService.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- Plugins/Community/Frontend/RpayRatePay/Services/DfpService.php  (revision ad74abd88c66236b215bd91b9d26a940be75c5b9)
+++ Plugins/Community/Frontend/RpayRatePay/Services/DfpService.php  (date 1571059913473)
@@ -1,7 +1,7 @@
 <?php

-namespace Shopware\Plugins\Community\Frontend\RpayRatePay\Services;
+namespace RpayRatePay\Services;

 use Shopware\Components\DependencyInjection\Container;
Index: Plugins/Community/Frontend/RpayRatePay/Services/ConfigService.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- Plugins/Community/Frontend/RpayRatePay/Services/ConfigService.php   (revision ad74abd88c66236b215bd91b9d26a940be75c5b9)
+++ Plugins/Community/Frontend/RpayRatePay/Services/ConfigService.php   (date 1571059900427)
@@ -1,15 +1,15 @@
 <?php

-namespace Shopware\Plugins\Community\Frontend\RpayRatePay\Services;
-
+namespace RpayRatePay\Services;

 class ConfigService
 {

     //TODO remove if plugin is moved to SW5.2 plugin engine
     private static $instance = null;
-    public static function getInstance(){
+    public static function getInstance()
+    {
         return self::$instance = (self::$instance ? : new self(Shopware()->Config()));
     }

@@ -20,10 +20,10 @@
         $this->_config = $config;
     }

-    public function getDfpSnippetId() {
+    public function getDfpSnippetId()
+    {
         $defaultValue = 'ratepay';
         $value = $this->_config->get('ratepay/dfp/snippet_id', $defaultValue);
         return strlen($value) ? $value : $defaultValue;
     }
-
 }
MartinKuhl commented 4 years ago

Could you provide any further information about your issue? Screenshot -> steps to reproduce your error etc.

philippuhr commented 4 years ago

Hey @MartinKuhl, if the plugin is installed, the home page will throw a fatal error. This pull request fixes wrong paths.

For example:

Fatal error: Uncaught Error: Class 'Shopware\Plugins\Community\Frontend\RpayRatePay\Services\ConfigService' not found in /project/Plugins/Community/Frontend/RpayRatePay/Bootstrapping/Events/TemplateExtensionSubscriber.php:29

MartinKuhl commented 4 years ago

Hey @MartinKuhl, if the plugin is installed, the home page will throw a fatal error. This pull request fixes wrong paths.

For example:

Fatal error: Uncaught Error: Class 'Shopware\Plugins\Community\Frontend\RpayRatePay\Services\ConfigService' not found in /project/Plugins/Community/Frontend/RpayRatePay/Bootstrapping/Events/TemplateExtensionSubscriber.php:29

Hi Phillipp which pull request are you referring to?

philippuhr commented 4 years ago

Sorry, i pushed my pull request right now. https://github.com/ratepay/shopware5-module/pull/39

rommelfreddy commented 4 years ago

Hello @philippuhr hello @roman-1983

we have fixed this issue in the last releases. @roman-1983 thank you for contributing!