Skip to content

Commit 043751e

Browse files
authored
RATESWSX-332: upgrade plugin to be compatible with SW 6.7.x.x
1 parent eb3ddd1 commit 043751e

File tree

61 files changed

+443
-438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+443
-438
lines changed

.github/workflows/php.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@ jobs:
1919
runs-on: 'ubuntu-latest'
2020
strategy:
2121
matrix:
22-
php-version: [ '8.2', '8.3' ]
22+
php-version: [ '8.2', '8.3', '8.4' ]
23+
composer-version: [ '2.2', '2.8' ]
2324
mysql-version: [ '8.0' ]
24-
shopware-version: [ 'v6.6.0.0', 'v6.6.1.0', 'v6.6.2.0', 'v6.6.3.0', 'v6.6.4.0' ]
25+
shopware-version: [ 'v6.7.0.0', 'v6.7.1.0', 'v6.7.2.0' ]
26+
exclude:
27+
- php-version: 8.2
28+
composer-version: 2.8
29+
- php-version: 8.3
30+
composer-version: 2.8
31+
- php-version: 8.4
32+
composer-version: 2.2
2533
fail-fast: false
2634
max-parallel: 10
2735
services:
@@ -39,7 +47,7 @@ jobs:
3947
with:
4048
php-version: ${{ matrix.php-version }}
4149
extensions: mbstring, xdebug, curl, dom, fileinfo, gd, iconv, intl, json, xml, mbstring, pdo, phar, zip, sodium, pdo_mysql
42-
tools: composer:2.2
50+
tools: composer:${{ matrix.composer-version }}
4351

4452
- name: "Check PHP Version"
4553
run: php -v

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
/var/cache/
44
composer.lock
55
__COMPOSER_HOME__
6-
node_modules/
6+
src/Resources/app/administration/node_modules

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## Version 8.0.0 - Released on 2025-09-18
4+
5+
* RATESWSX-332: add Shopware 6.7.x.x compatibility
6+
* RATESWSX-332: build tool: migration from Webpack to Vite
7+
* RATESWSX-332: upgrade code to be compatible with PHP 8.2, PHP 8.3 and PHP 8.4
8+
* RATESWSX-332: upgrade composer version to be compatible with PHP 8.4
9+
310
## Version 7.2.0 - Released on 2024-12-09
411

512
* RATESWSX-320: dfp: remove validation & improve user-identification

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Ratepay GmbH - Shopware 6 Payment Module
22

3-
| Module | Ratepay Payment Plugin for Shopware 6 |
4-
|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
5-
| Author | Interlutions GmbH |
6-
| Shop Version | `6.3.0.2 to 6.6.x.x` |
7-
| Link | http://www.ratepay.com |
8-
| Mail | integration@ratepay.com |
9-
| Full Documentation | [click here](https://docs.ratepay.com/docs/developer/shop_modules/shopware/shopware_6/ratepay_payment_plugin_for_shopware_6/) |
10-
| Legal Disclaimer | [click here](https://docs.ratepay.com/docs/developer/shop_modules/overview/) |
3+
| Module | Ratepay Payment Plugin for Shopware 6 |
4+
|--------------------|-------------------------------------------------------------------------------------------------------------------------------|
5+
| Author | Interlutions GmbH |
6+
| Shop Version | `6.3.0.2 to 6.7.x.x` |
7+
| Link | http://www.ratepay.com |
8+
| Mail | integration@ratepay.com |
9+
| Full Documentation | [click here](https://docs.ratepay.com/docs/developer/shop_modules/shopware/shopware_6/ratepay_payment_plugin_for_shopware_6/) |
10+
| Legal Disclaimer | [click here](https://docs.ratepay.com/docs/developer/shop_modules/overview/) |
1111

1212
## Installation via Shopware Store
1313

composer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ratepay/shopware6-module",
33
"description": "Ratepay payment methods for Shopware 6",
4-
"version": "7.2.0",
4+
"version": "8.0.0",
55
"license": "MIT",
66
"authors": [
77
{
@@ -41,9 +41,9 @@
4141
}
4242
},
4343
"require": {
44-
"php": "^8.1",
44+
"php": "^8.2",
4545
"ratepay/php-library": "^1.8",
46-
"shopware/core": "~6.6.0",
46+
"shopware/core": "~6.7.0",
4747
"ext-simplexml": "*",
4848
"ext-json": "*"
4949
},
@@ -73,5 +73,10 @@
7373
"rector/rector": "^1.1",
7474
"symplify/easy-coding-standard": "^12.2",
7575
"phpunit/phpunit": "^9.6"
76+
},
77+
"config": {
78+
"allow-plugins": {
79+
"symfony/runtime": false
80+
}
7681
}
7782
}

src/Components/AdminOrders/Service/DfpService.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ public function __construct(
2525
) {
2626
}
2727

28-
public function generatedDfpId(Request $request, SalesChannelContext $salesChannelContext, OrderEntity $orderEntity = null): ?string
28+
public function generatedDfpId(Request $request, SalesChannelContext $salesChannelContext, ?OrderEntity $orderEntity = null): ?string
2929
{
3030
return $this->isDfpRequired($salesChannelContext, $orderEntity) ? $this->decorated->generatedDfpId($request, $salesChannelContext, $orderEntity) : null;
3131
}
3232

33-
public function getDfpSnippet(Request $request, SalesChannelContext $salesChannelContext, OrderEntity $orderEntity = null): ?string
33+
public function getDfpSnippet(Request $request, SalesChannelContext $salesChannelContext, ?OrderEntity $orderEntity = null): ?string
3434
{
3535
return $this->isDfpRequired($salesChannelContext, $orderEntity) ? $this->decorated->getDfpSnippet($request, $salesChannelContext, $orderEntity) : null;
3636
}
3737

38-
public function isDfpRequired(SalesChannelContext $salesChannelContext, OrderEntity $orderEntity = null): bool
38+
public function isDfpRequired(SalesChannelContext $salesChannelContext, ?OrderEntity $orderEntity = null): bool
3939
{
4040
$session = $this->requestStack->getMainRequest()->getSession();
4141
if ($this->sessionService->isAdminSession($salesChannelContext, $session)) {

src/Components/AdminOrders/Service/SessionService.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ public function canLogout(SalesChannelContext $context, SessionInterface $sessio
3333

3434
public function isLoggedInAsCustomer(SalesChannelContext $context, SessionInterface $session): bool
3535
{
36-
// supported since SW 6.6.5.x - TODO remove this check if compatibility has been change to Shopware >= 6.6.5
37-
if (method_exists($context, 'getImitatingUserId') && $context->getImitatingUserId() !== null) {
38-
return true;
39-
}
40-
4136
if ($context->getCustomerId() === null) {
4237
return false;
4338
}
@@ -55,7 +50,7 @@ public function destroy(SessionInterface $session): void
5550
{
5651
$session->remove($this->sessionKey);
5752

58-
// make sure that the third-party modules did not left any data, which we will check
53+
// make sure that the third-party modules did not leave any data, which we will check
5954
foreach ($this->getThirdPartyLoginAsSessionKeys() as $key) {
6055
$session->remove($key);
6156
}

src/Components/AdminOrders/Subscriber/LoginSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(
2727
public static function getSubscribedEvents(): array
2828
{
2929
return [
30-
CustomerLogoutEvent::class => ['onLogout', -3000], // as late as possible to prioritize thirdparty modules
30+
CustomerLogoutEvent::class => ['onLogout', -3000], // as late as possible to prioritize third-party modules
3131
];
3232
}
3333

src/Components/Checkout/Controller/AbstractCheckoutController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ abstract class AbstractCheckoutController
1818
{
1919
abstract public function getDecorated(): self;
2020

21-
abstract public function getPaymentData(Request $request, SalesChannelContext $salesChannelContext, string $orderId = null): Response;
21+
abstract public function getPaymentData(Request $request, SalesChannelContext $salesChannelContext, ?string $orderId = null): Response;
2222
}

src/Components/Checkout/Controller/CheckoutController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(
4343
],
4444
methods: ['GET']
4545
)]
46-
public function getPaymentData(Request $request, SalesChannelContext $salesChannelContext, string $orderId = null): Response
46+
public function getPaymentData(Request $request, SalesChannelContext $salesChannelContext, ?string $orderId = null): Response
4747
{
4848
try {
4949
if ($orderId) {

0 commit comments

Comments
 (0)