diff --git a/composer.json b/composer.json index 365051996..23f1543f1 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "kiener/mollie-payments-plugin", "description": "Mollie Payments", - "version": "v4.7.1", + "version": "v4.7.2", "type": "shopware-platform-plugin", "license": "MIT", "authors": [ diff --git a/composer.lock b/composer.lock index 0f6325175..bc18e0984 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e7b7773a71b1b372a0b9201cb0a75927", + "content-hash": "68afe1030f48d2a2d7f67a55b4c2916d", "packages": [], "packages-dev": [ { diff --git a/polyfill/Shopware/Core/System/Snippet/Files/SnippetFileInterface.php b/polyfill/Shopware/Core/System/Snippet/Files/SnippetFileInterface.php new file mode 100644 index 000000000..ca5451347 --- /dev/null +++ b/polyfill/Shopware/Core/System/Snippet/Files/SnippetFileInterface.php @@ -0,0 +1,50 @@ +executeStatement($sql); + $utils->deleteColumn('mollie_subscription', 'currency'); } /** diff --git a/src/MolliePayments.php b/src/MolliePayments.php index 33170bec8..79de05928 100644 --- a/src/MolliePayments.php +++ b/src/MolliePayments.php @@ -24,7 +24,7 @@ class MolliePayments extends Plugin { - const PLUGIN_VERSION = '4.7.1'; + const PLUGIN_VERSION = '4.7.2'; /** diff --git a/src/Resources/config/services.xml b/src/Resources/config/services.xml index 3b1ba8c64..6687293a7 100644 --- a/src/Resources/config/services.xml +++ b/src/Resources/config/services.xml @@ -180,6 +180,7 @@ + @@ -207,6 +208,11 @@ + + %kernel.shopware_version% + + + diff --git a/src/Subscriber/KernelSubscriber.php b/src/Subscriber/KernelSubscriber.php index 269a48780..1947ce5af 100644 --- a/src/Subscriber/KernelSubscriber.php +++ b/src/Subscriber/KernelSubscriber.php @@ -3,6 +3,7 @@ namespace Kiener\MolliePayments\Subscriber; +use Kiener\MolliePayments\Compatibility\VersionCompare; use Shopware\Core\Framework\Routing\Annotation\RouteScope; use Shopware\Core\PlatformRequest; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -11,6 +12,20 @@ class KernelSubscriber implements EventSubscriberInterface { + /** + * @var VersionCompare + */ + private $versionCompare; + + /** + * @param VersionCompare $versionCompare + */ + public function __construct(VersionCompare $versionCompare) + { + $this->versionCompare = $versionCompare; + } + + public static function getSubscribedEvents(): array { return [ @@ -25,6 +40,11 @@ public static function getSubscribedEvents(): array */ public function onModifyRouteScope(ControllerEvent $event): void { + //there are cases where the class RouteScope still exists even in SW 6.5 + if ($this->versionCompare->gte('6.5.0.0')) { + return; + } + if (! class_exists(RouteScope::class)) { return; }