Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEXT-37028 - IAP filter gateway #44

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"symfony/psr-http-message-bridge": "2.* || ^7.0",
"symfony/routing": "^6.2 || ^6.3 || ^6.4 || ^7.0",
"doctrine/orm": "^2.11",
"shopware/app-php-sdk": "^3.0",
"shopware/app-php-sdk": "dev-next-37028/iaf-filter-gateway",
"symfony/doctrine-bridge": "^6.2 || ^6.3 || ^6.4 || ^7.0",
"symfony/http-client": "^6.2 || ^6.3 || ^6.4 || ^7.0",
"nyholm/psr7": "^1.8"
Expand Down
4 changes: 4 additions & 0 deletions src/ArgumentValueResolver/ContextArgumentResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Shopware\App\SDK\Context\ActionButton\ActionButtonAction;
use Shopware\App\SDK\Context\ContextResolver;
use Shopware\App\SDK\Context\Gateway\Checkout\CheckoutGatewayAction;
use Shopware\App\SDK\Context\Gateway\InAppFeatures\FilterAction;
use Shopware\App\SDK\Context\Module\ModuleAction;
use Shopware\App\SDK\Context\Payment\PaymentCaptureAction;
use Shopware\App\SDK\Context\Payment\PaymentFinalizeAction;
Expand Down Expand Up @@ -41,6 +42,7 @@
RefundAction::class => true,
StorefrontAction::class => true,
CheckoutGatewayAction::class => true,
FilterAction::class => true,
];

private const SIGNING_REQUIRED_TYPES = [
Expand Down Expand Up @@ -68,6 +70,7 @@

/**
* @return iterable<object>
* @throws \JsonException|\RuntimeException
*/
public function resolve(Request $request, ArgumentMetadata $argument): iterable
{
Expand Down Expand Up @@ -118,6 +121,7 @@
RefundAction::class => yield $this->contextResolver->assemblePaymentRefund($psrRequest, $shop),
StorefrontAction::class => yield $this->contextResolver->assembleStorefrontRequest($psrRequest, $shop),
CheckoutGatewayAction::class => yield $this->contextResolver->assembleCheckoutGatewayRequest($psrRequest, $shop),
FilterAction::class => yield $this->contextResolver->assembleInAppFeatureFilterRequest($psrRequest, $shop),

Check failure on line 124 in src/ArgumentValueResolver/ContextArgumentResolver.php

View workflow job for this annotation

GitHub Actions / static-analyse

Call to an undefined method Shopware\App\SDK\Context\ContextResolver::assembleInAppFeatureFilterRequest().
default => throw new \RuntimeException(sprintf('Unsupported type %s', $type)),
};
}
Expand Down
2 changes: 2 additions & 0 deletions tests/ArgumentValueResolver/ContextArgumentResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Shopware\App\SDK\Context\ActionButton\ActionButtonAction;
use Shopware\App\SDK\Context\ContextResolver;
use Shopware\App\SDK\Context\Gateway\Checkout\CheckoutGatewayAction;
use Shopware\App\SDK\Context\Gateway\InAppFeatures\FilterAction;
use Shopware\App\SDK\Context\Module\ModuleAction;
use Shopware\App\SDK\Context\Payment\PaymentCaptureAction;
use Shopware\App\SDK\Context\Payment\PaymentFinalizeAction;
Expand Down Expand Up @@ -238,6 +239,7 @@ public static function provideActions(): \Generator
yield [RefundAction::class];
yield [StorefrontAction::class];
yield [CheckoutGatewayAction::class];
yield [FilterAction::class];
}

#[DataProvider('provideActions')]
Expand Down
Loading