From f5493647753d6eaa0a2aede53b26ded96dd1a53d Mon Sep 17 00:00:00 2001 From: Jacob Tobiasz Date: Thu, 5 Sep 2024 11:43:26 +0200 Subject: [PATCH 1/6] Add a configured CI split into PR/daily --- .github/workflows/_matrix.json | 26 +++++++++++++++++ .github/workflows/ci.yaml | 50 ++++++++++++++++++-------------- .github/workflows/ci__daily.yaml | 18 ++++++++++++ .github/workflows/ci__pr.yaml | 22 ++++++++++++++ 4 files changed, 94 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/_matrix.json create mode 100644 .github/workflows/ci__daily.yaml create mode 100644 .github/workflows/ci__pr.yaml diff --git a/.github/workflows/_matrix.json b/.github/workflows/_matrix.json new file mode 100644 index 00000000..e14d1a4d --- /dev/null +++ b/.github/workflows/_matrix.json @@ -0,0 +1,26 @@ +{ + "pr": { + "ci": { + "include": [ + { + "php": "8.0", + "sylius": "1.12.*", + "symfony": "5.4.*", + "mysql": "8.0" + }, + { + "php": "8.3", + "sylius": "1.13.*", + "symfony": "6.4.*", + "mysql": "8.0" + } + ] + }, + "daily": { + "php": ["8.0", "8.3"], + "sylius": ["1.12.*", "1.13.*"], + "symfony": ["5.4.*", "6.4.*"], + "mysql": ["8.0"] + } + } +} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0a004cf9..ce15db04 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,26 +1,42 @@ name: Continuous Integration on: - push: ~ - pull_request: ~ - release: - types: [created] workflow_dispatch: ~ + workflow_call: + inputs: + type: + description: "Type of the build" + required: true + type: string jobs: + get-matrix: + runs-on: ubuntu-latest + name: "Get matrix" + outputs: + matrix: ${{ steps.matrix.outputs.prop }} + steps: + - name: "Checkout" + uses: actions/checkout@v4 + + - + name: "Get matrix" + id: matrix + uses: notiz-dev/github-action-json-property@release + with: + path: '.github/workflows/_matrix.json' + prop_path: '${{ inputs.type }}.ci' + tests: + needs: get-matrix + runs-on: ubuntu-latest name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}" strategy: fail-fast: false - matrix: - php: ["8.0", "8.1"] - symfony: ["5.4.*", "^6.0"] - sylius: ["^1.12"] - node: ["16.x"] - mysql: ["5.7", "8.0"] + matrix: ${{ fromJson(needs.get-matrix.outputs.matrix) }} env: APP_ENV: test @@ -36,18 +52,8 @@ jobs: build_type: "plugin" cache_key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-sylius-${{ matrix.sylius }}-symfony-${{ matrix.symfony }}" cache_restore_key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-sylius-${{ matrix.sylius }}-symfony-${{ matrix.symfony }}" - e2e: "yes" - e2e_js: "yes" database_version: ${{ matrix.mysql }} php_version: ${{ matrix.php }} symfony_version: ${{ matrix.symfony }} - - - - name: Upload logs - uses: actions/upload-artifact@v3 - if: failure() - with: - name: Logs - path: | - var/log/ - if-no-files-found: ignore + sylius_version: ${{ matrix.sylius }} + e2e_js: true diff --git a/.github/workflows/ci__daily.yaml b/.github/workflows/ci__daily.yaml new file mode 100644 index 00000000..0c108892 --- /dev/null +++ b/.github/workflows/ci__daily.yaml @@ -0,0 +1,18 @@ +name: Continuous Integration (Daily) + +on: + schedule: + - + cron: "0 3 * * *" # Run every day at 3am + workflow_dispatch: ~ + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }}-minimal + cancel-in-progress: true + +jobs: + ci: + name: CI + uses: ./.github/workflows/ci.yaml + with: + type: "daily" diff --git a/.github/workflows/ci__pr.yaml b/.github/workflows/ci__pr.yaml new file mode 100644 index 00000000..f5b65eb5 --- /dev/null +++ b/.github/workflows/ci__pr.yaml @@ -0,0 +1,22 @@ +name: Continuous Integration (PR) + +on: + pull_request: + paths-ignore: + - ".platform/**" + - "*.md" + push: + branches: + - main + workflow_dispatch: ~ + +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }}-minimal + cancel-in-progress: true + +jobs: + ci: + name: CI + uses: ./.github/workflows/ci.yaml + with: + type: "pr" From ebd797cf5cb28dfb09a5f04176fb76dedbda76eb Mon Sep 17 00:00:00 2001 From: Jacob Tobiasz Date: Thu, 5 Sep 2024 11:57:28 +0200 Subject: [PATCH 2/6] Replace alphpaca/monocle-constraint with symfony/flex --- composer.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index e76f0fd4..5c09974b 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,6 @@ "sylius/sylius": "<1.12" }, "require-dev": { - "alphpaca/monocle-constraint": "^0.1", "phpspec/prophecy-phpunit": "^2.2", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.8.1", @@ -38,6 +37,7 @@ "symfony/browser-kit": "^5.4 || ^6.0", "symfony/debug-bundle": "^5.4 || ^6.0", "symfony/dotenv": "^5.4 || ^6.0", + "symfony/flex": "^2.4", "symfony/intl": "^5.4 || ^6.0", "symfony/monolog-bundle": "^3.10", "symfony/web-profiler-bundle": "^5.4 || ^6.0" @@ -45,9 +45,9 @@ "config": { "sort-packages": true, "allow-plugins": { - "alphpaca/monocle-constraint": true, "dealerdirect/phpcodesniffer-composer-installer": false, "phpstan/extension-installer": true, + "symfony/flex": true, "symfony/runtime": true } }, @@ -55,10 +55,8 @@ "branch-alias": { "dev-main": "1.0-dev" }, - "monocle": { - "constraint": { - "symfony/symfony": "5.4.*" - } + "symfony": { + "require": "5.4.*" } }, "scripts": { From b97a9267d14747db72561db25ff44f54c9055c4c Mon Sep 17 00:00:00 2001 From: Jacob Tobiasz Date: Thu, 5 Sep 2024 13:11:50 +0200 Subject: [PATCH 3/6] Stop using AbstractBundle not being a part of Symfony 5.4 --- src/CommerceWeaversSyliusTpayPlugin.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/CommerceWeaversSyliusTpayPlugin.php b/src/CommerceWeaversSyliusTpayPlugin.php index 8d94d5ff..173dfa12 100644 --- a/src/CommerceWeaversSyliusTpayPlugin.php +++ b/src/CommerceWeaversSyliusTpayPlugin.php @@ -5,9 +5,19 @@ namespace CommerceWeavers\SyliusTpayPlugin; use Sylius\Bundle\CoreBundle\Application\SyliusPluginTrait; -use Symfony\Component\HttpKernel\Bundle\AbstractBundle; +use Symfony\Component\HttpKernel\Bundle\Bundle; -final class CommerceWeaversSyliusTpayPlugin extends AbstractBundle +final class CommerceWeaversSyliusTpayPlugin extends Bundle { use SyliusPluginTrait; + + public function getPath(): string + { + if (!isset($this->path)) { + $reflected = new \ReflectionObject($this); + $this->path = \dirname($reflected->getFileName(), 2); + } + + return $this->path; + } } From 424b58b2714f39aeb01aefb0550b0c2f366820e6 Mon Sep 17 00:00:00 2001 From: Jacob Tobiasz Date: Thu, 5 Sep 2024 13:30:54 +0200 Subject: [PATCH 4/6] Add running QA tools in CI --- .github/workflows/ci.yaml | 13 +++++++++++++ composer-dependency-analyser.php | 14 ++++++++++++++ composer.json | 14 +++++++++++--- 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 composer-dependency-analyser.php diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ce15db04..d1968c6b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -57,3 +57,16 @@ jobs: symfony_version: ${{ matrix.symfony }} sylius_version: ${{ matrix.sylius }} e2e_js: true + + - name: Check dependencies + continue-on-error: true + run: vendor/bin/composer-dependency-analyser + + - name: Static analysis + run: vendor/bin/phpstan + + - name: Check coding standard + run: vendor/bin/ecs check + + - name: Run tests + run: vendor/bin/phpunit diff --git a/composer-dependency-analyser.php b/composer-dependency-analyser.php new file mode 100644 index 00000000..82f21604 --- /dev/null +++ b/composer-dependency-analyser.php @@ -0,0 +1,14 @@ +addPathToScan(__DIR__ . '/src', isDev: false) + ->disableComposerAutoloadPathScan() // disable automatic scan of autoload & autoload-dev paths from composer.json + ->ignoreErrorsOnPackage('sylius/sylius', [ErrorType::DEV_DEPENDENCY_IN_PROD]) + ->ignoreErrorsOnPackage('sylius/core-bundle', [ErrorType::UNUSED_DEPENDENCY]) +; diff --git a/composer.json b/composer.json index 5c09974b..6992ef6b 100644 --- a/composer.json +++ b/composer.json @@ -5,8 +5,7 @@ "license": "MIT", "autoload": { "psr-4": { - "CommerceWeavers\\SyliusTpayPlugin\\": "src/", - "Tests\\CommerceWeavers\\SyliusTpayPlugin\\Behat\\": "tests/Behat" + "CommerceWeavers\\SyliusTpayPlugin\\": "src/" } }, "autoload-dev": { @@ -18,7 +17,15 @@ "require": { "php": "^8.0", "sylius/core-bundle": "^1.12", - "tpay-com/tpay-openapi-php": "^1.8" + "tpay-com/tpay-openapi-php": "^1.8", + "payum/core": "^1.7", + "sylius/resource-bundle": "^1.10", + "symfony/config": "5.4.* || ^6.0", + "symfony/dependency-injection": "5.4.* || ^6.0", + "symfony/form": "5.4.* || ^6.0", + "symfony/http-foundation": "5.4.* || ^6.0", + "symfony/http-kernel": "5.4.* || ^6.0", + "symfony/routing": "5.4.* || ^6.0" }, "conflict": { "sylius/sylius": "<1.12" @@ -32,6 +39,7 @@ "phpstan/phpstan-webmozart-assert": "^1.2.0", "phpunit/phpunit": "^9.5", "polishsymfonycommunity/symfony-mocker-container": "^1.0", + "shipmonk/composer-dependency-analyser": "^1.7", "sylius-labs/coding-standard": "^4.2", "sylius/sylius": "^1.12", "symfony/browser-kit": "^5.4 || ^6.0", From 94522713e741414bcf22fa264a5876ca5aee1a23 Mon Sep 17 00:00:00 2001 From: Jacob Tobiasz Date: Thu, 5 Sep 2024 13:59:18 +0200 Subject: [PATCH 5/6] Fix PHPStan errors --- phpstan.neon | 7 +++---- src/Controller/PaymentNotificationAction.php | 2 +- src/Payum/Action/Api/CreateTransactionAction.php | 13 +++++++++++-- src/Payum/Action/Api/NotifyAction.php | 1 + src/Payum/Action/GetStatusAction.php | 6 +++--- src/Payum/Factory/TpayGatewayFactory.php | 2 +- src/Payum/Request/Api/Notify.php | 6 ++++++ 7 files changed, 26 insertions(+), 11 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index dac1f4c0..fd47037e 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -5,12 +5,11 @@ parameters: paths: - src - excludes_analyse: - # Makes PHPStan crash + excludePaths: + - 'src/CommerceWeaversSyliusTpayPlugin.php' - 'src/DependencyInjection/Configuration.php' - - # Test dependencies - 'tests/Application/src/**.php' ignoreErrors: - '/Parameter #1 \$configuration of method Symfony\\Component\\DependencyInjection\\Extension\\Extension::processConfiguration\(\) expects Symfony\\Component\\Config\\Definition\\ConfigurationInterface, Symfony\\Component\\Config\\Definition\\ConfigurationInterface\|null given\./' + - '/Parameter \#1 \$request \([^)]+\) of method [^:]+::execute\(\) should be contravariant with parameter \$request \(mixed\) of method Payum\\Core\\Action\\ActionInterface::execute\(\)/' diff --git a/src/Controller/PaymentNotificationAction.php b/src/Controller/PaymentNotificationAction.php index 34f49ecf..0c99f703 100644 --- a/src/Controller/PaymentNotificationAction.php +++ b/src/Controller/PaymentNotificationAction.php @@ -34,7 +34,7 @@ public function __invoke(Request $request): Response return new Response('TRUE'); } catch (HttpResponse $reply) { - return new Response($reply->getCode(), $reply->getStatusCode(), $reply->getHeaders()); + return new Response((string) $reply->getCode(), $reply->getStatusCode(), $reply->getHeaders()); } catch (ReplyInterface $reply) { throw new \LogicException('Unsupported reply', previous: $reply); } diff --git a/src/Payum/Action/Api/CreateTransactionAction.php b/src/Payum/Action/Api/CreateTransactionAction.php index aaea2858..71b459f3 100644 --- a/src/Payum/Action/Api/CreateTransactionAction.php +++ b/src/Payum/Action/Api/CreateTransactionAction.php @@ -12,6 +12,7 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\RouterInterface; use Tpay\OpenApi\Api\TpayApi; +use Webmozart\Assert\Assert; /** * @property TpayApi $api @@ -37,16 +38,24 @@ public function execute($request): void /** @var PaymentInterface $model */ $model = $request->getModel(); $details = $model->getDetails(); + $token = $request->getToken(); + Assert::notNull($token); $order = $model->getOrder(); + Assert::notNull($order); $localeCode = $order->getLocaleCode(); + Assert::notNull($localeCode); $customer = $order->getCustomer(); + Assert::notNull($customer); $billingAddress = $order->getBillingAddress(); + Assert::notNull($billingAddress); + $amount = $model->getAmount(); + Assert::notNull($amount); - $notifyToken = $this->createNotifyToken($model, $request->getToken(), $localeCode); + $notifyToken = $this->createNotifyToken($model, $token, $localeCode); $response = $this->api->transactions()->createTransaction([ - 'amount' => number_format($model->getAmount() / 100, 2, thousands_separator: ''), + 'amount' => number_format($amount / 100, 2, thousands_separator: ''), 'description' => sprintf('zamówienie #%s', $order->getNumber()), // TODO: Introduce translations 'payer' => [ 'email' => $customer->getEmail(), diff --git a/src/Payum/Action/Api/NotifyAction.php b/src/Payum/Action/Api/NotifyAction.php index a3265823..2a7d2adb 100644 --- a/src/Payum/Action/Api/NotifyAction.php +++ b/src/Payum/Action/Api/NotifyAction.php @@ -22,6 +22,7 @@ public function execute($request): void $model = $request->getModel(); $details = $model->getDetails(); + /** @var array{tr_status?: string} $notificationData */ $notificationData = $request->getData(); $status = $notificationData['tr_status'] ?? ''; diff --git a/src/Payum/Action/GetStatusAction.php b/src/Payum/Action/GetStatusAction.php index 0ccd3e56..15a8232f 100644 --- a/src/Payum/Action/GetStatusAction.php +++ b/src/Payum/Action/GetStatusAction.php @@ -7,7 +7,7 @@ use Payum\Core\Action\ActionInterface; use Payum\Core\GatewayAwareInterface; use Payum\Core\GatewayAwareTrait; -use Payum\Core\Request\GetStatusInterface; +use Sylius\Bundle\PayumBundle\Request\GetStatus; use Sylius\Component\Payment\Model\PaymentInterface; final class GetStatusAction implements ActionInterface, GatewayAwareInterface @@ -15,7 +15,7 @@ final class GetStatusAction implements ActionInterface, GatewayAwareInterface use GatewayAwareTrait; /** - * @param GetStatusInterface $request + * @param GetStatus $request */ public function execute($request): void { @@ -45,6 +45,6 @@ public function execute($request): void public function supports($request): bool { - return $request instanceof GetStatusInterface && $request->getFirstModel() instanceof PaymentInterface; + return $request instanceof GetStatus && $request->getFirstModel() instanceof PaymentInterface; } } diff --git a/src/Payum/Factory/TpayGatewayFactory.php b/src/Payum/Factory/TpayGatewayFactory.php index fa6117a2..ad682764 100644 --- a/src/Payum/Factory/TpayGatewayFactory.php +++ b/src/Payum/Factory/TpayGatewayFactory.php @@ -20,7 +20,7 @@ protected function populateConfig(ArrayObject $config): void ]); $config['payum.api'] = function (ArrayObject $config): TpayApi { - /** @var array{clientId?: string, clientSecret?: string} $config */ + /** @var array{client_id?: string, client_secret?: string, production_mode?: bool} $config */ $clientId = $config['client_id'] ?? null; $clientSecret = $config['client_secret'] ?? null; $productionMode = $config['production_mode'] ?? false; diff --git a/src/Payum/Request/Api/Notify.php b/src/Payum/Request/Api/Notify.php index 77b054ef..3cd4f2cd 100644 --- a/src/Payum/Request/Api/Notify.php +++ b/src/Payum/Request/Api/Notify.php @@ -9,6 +9,9 @@ class Notify extends BaseNotify { + /** + * @param ArrayAccess $data + */ public function __construct ( mixed $model, private \ArrayAccess $data, @@ -16,6 +19,9 @@ public function __construct ( parent::__construct($model); } + /** + * @return ArrayAccess + */ public function getData(): ArrayAccess { return $this->data; From 6b633550fb7a63785a58f72266b6f52efd80fef7 Mon Sep 17 00:00:00 2001 From: Jacob Tobiasz Date: Thu, 5 Sep 2024 13:59:44 +0200 Subject: [PATCH 6/6] Apply ECS fixes --- ecs.php | 1 - src/Controller/PaymentNotificationAction.php | 2 +- .../PreventSavingEmptyClientSecretListener.php | 2 +- src/Form/Type/TpayGatewayConfigurationType.php | 6 +++--- src/Payum/Action/Api/CreateTransactionAction.php | 2 +- src/Payum/Action/Api/NotifyAction.php | 2 +- src/Payum/Action/CaptureAction.php | 2 +- src/Payum/Action/GetStatusAction.php | 4 ++++ src/Payum/Request/Api/CreateTransaction.php | 2 +- src/Payum/Request/Api/Notify.php | 2 +- 10 files changed, 14 insertions(+), 11 deletions(-) diff --git a/ecs.php b/ecs.php index 9d4afcdf..24afb8eb 100644 --- a/ecs.php +++ b/ecs.php @@ -2,7 +2,6 @@ declare(strict_types=1); -use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer; use Symplify\EasyCodingStandard\Config\ECSConfig; return static function (ECSConfig $ecsConfig): void { diff --git a/src/Controller/PaymentNotificationAction.php b/src/Controller/PaymentNotificationAction.php index 0c99f703..e1a928d0 100644 --- a/src/Controller/PaymentNotificationAction.php +++ b/src/Controller/PaymentNotificationAction.php @@ -16,7 +16,7 @@ final class PaymentNotificationAction { - public function __construct ( + public function __construct( private Payum $payum, private NotifyFactoryInterface $notifyFactory, ) { diff --git a/src/Form/EventListener/PreventSavingEmptyClientSecretListener.php b/src/Form/EventListener/PreventSavingEmptyClientSecretListener.php index e87b88ab..1be0629e 100644 --- a/src/Form/EventListener/PreventSavingEmptyClientSecretListener.php +++ b/src/Form/EventListener/PreventSavingEmptyClientSecretListener.php @@ -23,7 +23,7 @@ public function __invoke(PreSubmitEvent $preSubmitEvent): void [ 'label' => 'commerce_weavers_sylius_tpay.admin.gateway_configuration.client_secret', 'mapped' => false, - ] + ], ); } } diff --git a/src/Form/Type/TpayGatewayConfigurationType.php b/src/Form/Type/TpayGatewayConfigurationType.php index 98aba139..4e0d0c84 100644 --- a/src/Form/Type/TpayGatewayConfigurationType.php +++ b/src/Form/Type/TpayGatewayConfigurationType.php @@ -14,7 +14,7 @@ final class TpayGatewayConfigurationType extends AbstractType { - public function __construct ( + public function __construct( private PreventSavingEmptyClientSecretListener $preventSavingEmptyClientSecretListener, ) { } @@ -37,7 +37,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void PasswordType::class, [ 'label' => 'commerce_weavers_sylius_tpay.admin.gateway_configuration.client_secret', - ] + ], ) ->add( 'production_mode', @@ -45,7 +45,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void [ 'label' => 'commerce_weavers_sylius_tpay.admin.gateway_configuration.production_mode', 'value' => false, - ] + ], ) ; diff --git a/src/Payum/Action/Api/CreateTransactionAction.php b/src/Payum/Action/Api/CreateTransactionAction.php index 71b459f3..e05e0107 100644 --- a/src/Payum/Action/Api/CreateTransactionAction.php +++ b/src/Payum/Action/Api/CreateTransactionAction.php @@ -21,7 +21,7 @@ final class CreateTransactionAction extends BaseApiAwareAction implements Generi { use GenericTokenFactoryAwareTrait; - public function __construct ( + public function __construct( private RouterInterface $router, private string $successRoute, private string $errorRoute, diff --git a/src/Payum/Action/Api/NotifyAction.php b/src/Payum/Action/Api/NotifyAction.php index 2a7d2adb..093e1a22 100644 --- a/src/Payum/Action/Api/NotifyAction.php +++ b/src/Payum/Action/Api/NotifyAction.php @@ -26,7 +26,7 @@ public function execute($request): void $notificationData = $request->getData(); $status = $notificationData['tr_status'] ?? ''; - $details['tpay']['status'] = match(true) { + $details['tpay']['status'] = match (true) { str_contains($status, 'TRUE') => PaymentInterface::STATE_COMPLETED, str_contains($status, 'CHARGEBACK') => PaymentInterface::STATE_REFUNDED, default => PaymentInterface::STATE_FAILED, diff --git a/src/Payum/Action/CaptureAction.php b/src/Payum/Action/CaptureAction.php index 82c616b6..7cb1d5bc 100644 --- a/src/Payum/Action/CaptureAction.php +++ b/src/Payum/Action/CaptureAction.php @@ -16,7 +16,7 @@ final class CaptureAction implements ActionInterface, GatewayAwareInterface { use GatewayAwareTrait; - public function __construct ( + public function __construct( private CreateTransactionFactoryInterface $createTransactionFactory, ) { } diff --git a/src/Payum/Action/GetStatusAction.php b/src/Payum/Action/GetStatusAction.php index 15a8232f..ff2beecb 100644 --- a/src/Payum/Action/GetStatusAction.php +++ b/src/Payum/Action/GetStatusAction.php @@ -27,18 +27,22 @@ public function execute($request): void case 'correct': case PaymentInterface::STATE_COMPLETED: $request->markCaptured(); + break; case 'pending': case PaymentInterface::STATE_PROCESSING: $request->markPending(); + break; case 'refund': case PaymentInterface::STATE_REFUNDED: $request->markRefunded(); + break; case 'failed': case PaymentInterface::STATE_FAILED: $request->markFailed(); + break; } } diff --git a/src/Payum/Request/Api/CreateTransaction.php b/src/Payum/Request/Api/CreateTransaction.php index c3c713f0..25484876 100644 --- a/src/Payum/Request/Api/CreateTransaction.php +++ b/src/Payum/Request/Api/CreateTransaction.php @@ -8,7 +8,7 @@ class CreateTransaction extends Generic { - public function __construct ( + public function __construct( mixed $model, ) { parent::__construct($model); diff --git a/src/Payum/Request/Api/Notify.php b/src/Payum/Request/Api/Notify.php index 3cd4f2cd..bf702281 100644 --- a/src/Payum/Request/Api/Notify.php +++ b/src/Payum/Request/Api/Notify.php @@ -12,7 +12,7 @@ class Notify extends BaseNotify /** * @param ArrayAccess $data */ - public function __construct ( + public function __construct( mixed $model, private \ArrayAccess $data, ) {