diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 685ecef..0000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,53 +0,0 @@ -name: Continuous Integration - -on: - push: ~ - pull_request: ~ - release: - types: [created] - workflow_dispatch: ~ - -jobs: - tests: - runs-on: ubuntu-latest - - name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}" - - strategy: - fail-fast: false - matrix: - php: ["8.2", "8.3"] - symfony: ["^6.4", "^7.1"] - sylius: ["^2.0-dev"] - node: ["20.x"] - mysql: ["8.0"] - - env: - APP_ENV: test - DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}" - - steps: - - - uses: actions/checkout@v4 - - - name: Build application - uses: SyliusLabs/BuildTestAppAction@v2.2.1 - with: - 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@v4 - if: failure() - with: - name: Logs - path: | - var/log/ - if-no-files-found: ignore diff --git a/composer.json b/composer.json index 18fbf72..e225e97 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,8 @@ "symfony/web-profiler-bundle": "^6.4|^7.1", "spaze/phpstan-stripe": "^3.2", "nyholm/psr7": "^1.8", - "mockery/mockery": "^1.6" + "mockery/mockery": "^1.6", + "phpstan/phpstan-mockery": "^1.1" }, "suggest": { "sylius/shop-bundle": "Use the Sylius default front shop", diff --git a/src/Manager/Checkout/ExpireManager.php b/src/Manager/Checkout/ExpireManager.php index a7e0b64..6e70d8f 100644 --- a/src/Manager/Checkout/ExpireManager.php +++ b/src/Manager/Checkout/ExpireManager.php @@ -20,10 +20,11 @@ final class ExpireManager implements ExpireManagerInterface use StripeClientAwareManagerTrait; public function __construct( - private ClientFactoryInterface $stripeClientFactory, + ClientFactoryInterface $stripeClientFactory, private ?ParamsProviderInterface $paramsProvider = null, private ?OptsProviderInterface $optsProvider = null, ) { + $this->stripeClientFactory = $stripeClientFactory; } public function expire(PaymentRequestInterface $paymentRequest, string $id): Session diff --git a/src/Manager/WebElements/CancelManager.php b/src/Manager/WebElements/CancelManager.php index 365564b..f19f6a0 100644 --- a/src/Manager/WebElements/CancelManager.php +++ b/src/Manager/WebElements/CancelManager.php @@ -20,10 +20,11 @@ final class CancelManager implements CancelManagerInterface use StripeClientAwareManagerTrait; public function __construct( - private ClientFactoryInterface $stripeClientFactory, + ClientFactoryInterface $stripeClientFactory, private ?ParamsProviderInterface $paramsProvider = null, private ?OptsProviderInterface $optsProvider = null, ) { + $this->stripeClientFactory = $stripeClientFactory; } public function cancel(PaymentRequestInterface $paymentRequest, string $id): PaymentIntent diff --git a/src/Manager/WebElements/CaptureManager.php b/src/Manager/WebElements/CaptureManager.php index 6682f42..4d639c3 100644 --- a/src/Manager/WebElements/CaptureManager.php +++ b/src/Manager/WebElements/CaptureManager.php @@ -20,10 +20,11 @@ final class CaptureManager implements CaptureManagerInterface use StripeClientAwareManagerTrait; public function __construct( - private ClientFactoryInterface $stripeClientFactory, + ClientFactoryInterface $stripeClientFactory, private ?ParamsProviderInterface $paramsProvider = null, private ?OptsProviderInterface $optsProvider = null, ) { + $this->stripeClientFactory = $stripeClientFactory; } public function capture(PaymentRequestInterface $paymentRequest, string $id): PaymentIntent