Skip to content

Commit

Permalink
Merge pull request #75 from shopware/fix/add-ecs-job
Browse files Browse the repository at this point in the history
fix: add ecs job
  • Loading branch information
cyl3x authored Jan 29, 2025
2 parents 5ac3376 + c5859ec commit 7c0177a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/actions/setup-paypal/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ runs:
phpVersion: ${{ inputs.php-version }}
node-version: 18.x
npm-version: 9
keep-composer-tools: true
install: true
install-admin: ${{ inputs.install-admin }}
install-storefront: ${{ inputs.install-storefront }}
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- tests/**/*.php
- rector.php
- composer.json
- ecs.php
- phpstan.neon.dist
- phpstan-baseline.neon
workflow_dispatch:
workflow_call:

Expand Down Expand Up @@ -52,6 +55,18 @@ jobs:
- run: |
symfony composer -d custom/plugins/${{ github.event.repository.name }} run phpstan
ecs:
runs-on: ubuntu-latest
steps:
- name: Checkout SwagPayPal
uses: actions/checkout@v4
with:
path: custom/plugins/${{ github.event.repository.name }}
- name: Setup SwagPayPal
uses: ./custom/plugins/SwagPayPal/.github/actions/setup-paypal
- name: Run ecs
run: composer -d custom/plugins/${{ github.event.repository.name }} run ecs

validate-openapi-typescript:
runs-on: ubuntu-latest
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

namespace Swag\PayPal\Checkout\ExpressCheckout\SalesChannel;

use OpenApi\Attributes as OA;
use Shopware\Core\Content\Category\SalesChannel\AbstractCategoryRoute;
use Shopware\Core\Content\Category\SalesChannel\CategoryRouteResponse;
use Shopware\Core\Framework\Log\Package;
Expand All @@ -20,7 +19,6 @@
use Swag\PayPal\Setting\Settings;
use Swag\PayPal\Util\PaymentMethodUtil;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;

#[Package('checkout')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#[OA\Schema(
schema: 'swag_paypal_v1_payment_transaction_item_list_shipping_option',
properties: [], # so an empty object will be generated
properties: [], // so an empty object will be generated
)]
#[Package('checkout')]
class ShippingOption extends PayPalApiStruct
Expand Down
16 changes: 8 additions & 8 deletions src/Util/Lifecycle/Method/IdealMethodData.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ public function getMediaFileName(): ?string

public function validateCapability(MerchantIntegrations $merchantIntegrations): string
{
$capability = $merchantIntegrations->getSpecificCapability('IDEAL');
$capability = $merchantIntegrations->getSpecificCapability('IDEAL');

if ($capability === null) {
return self::CAPABILITY_INACTIVE;
}
if ($capability === null) {
return self::CAPABILITY_INACTIVE;
}

if ($capability->getStatus() === Capability::STATUS_ACTIVE) {
return self::CAPABILITY_ACTIVE;
}
if ($capability->getStatus() === Capability::STATUS_ACTIVE) {
return self::CAPABILITY_ACTIVE;
}

return self::CAPABILITY_INELIGIBLE;
return self::CAPABILITY_INELIGIBLE;
}
}

0 comments on commit 7c0177a

Please sign in to comment.