Skip to content

Commit

Permalink
minor #237 [Maintenance] Support release of sylius 1.11 (SirDomin)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.4 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | master
| Bug fix?        | no
| New feature?    | no
| Related tickets | 


Commits
-------
dceca02 [Maintenance] bump node version
ca43fc5 [Maintenance] bump sylius version to support 1.11 release
9b21621 [Build] add suites for 1.10
b9a80eb [GithubActions] support sylius 1.10 with php 7.4
30ae735 [Maintenance] rebase to 1.4, fix composer
  • Loading branch information
Zales0123 authored Apr 13, 2022
2 parents 1889c58 + 30ae735 commit d7b8776
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 6 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
fail-fast: false
matrix:
php: ["7.4", "8.0"]
node: ["10.x"]
node: ["14.x"]
mysql: ["5.7", "8.0"]
symfony: ["^4.4", "^5.4"]
sylius: ["~1.10.0", "^1.11.0-alpha"]
sylius: ["1.10.*", "1.11.*"]
exclude:
- php: "7.4"
sylius: "^1.11.0-alpha"
sylius: "1.11.*"
env:
APP_ENV: test
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=${{ matrix.mysql }}"
Expand Down Expand Up @@ -117,6 +117,12 @@ jobs:
name: Install JS dependencies
run: (cd tests/Application && yarn install)

-
name: Prepare configuration for Sylius 1.10
if: matrix.sylius == '1.10.*'
run: |
rm tests/Behat/Resources/suites.yml
cp tests/Behat/Resources/sylius-1.10/suites.yml tests/Behat/Resources
-
name: Prepare test application database
run: |
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"require": {
"php": "^7.4 || ^8.0",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"sylius/sylius": "^1.10",
"sylius/sylius": "~1.10.0 || ~1.11.0",
"phpseclib/phpseclib": "^2.0",
"sylius-labs/doctrine-migrations-extra-bundle": "^0.1.3",
"doctrine/doctrine-migrations-bundle": "^3.0"
Expand Down
8 changes: 8 additions & 0 deletions tests/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ public function getLogDir(): string
public function registerBundles(): iterable
{
$contents = require $this->getProjectDir() . '/config/bundles.php';

if (SyliusKernel::MINOR_VERSION > 10) {
$contents = array_merge(
['Sylius\Calendar\SyliusCalendarBundle' => ['all' => true]],
$contents
);
}

foreach ($contents as $class => $envs) {
if (isset($envs['all']) || isset($envs[$this->environment])) {
yield new $class();
Expand Down
4 changes: 2 additions & 2 deletions tests/Behat/Resources/suites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ default:
tags: "@managing_payment_methods && @ui"
ui_managing_orders:
contexts:
- sylius.behat.context.hook.calendar
- Sylius\Calendar\Tests\Behat\Context\Hook\CalendarContext
- sylius.behat.context.hook.doctrine_orm
- sylius.behat.context.hook.email_spool

- sylius.behat.context.setup.admin_security
- sylius.behat.context.setup.admin_user
- sylius.behat.context.setup.calendar
- Sylius\Calendar\Tests\Behat\Context\Setup\CalendarContext
- sylius.behat.context.setup.channel
- sylius.behat.context.setup.currency
- sylius.behat.context.setup.customer
Expand Down
163 changes: 163 additions & 0 deletions tests/Behat/Resources/sylius-1.10/suites.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# This file is part of the Sylius package.
# (c) Paweł Jędrzejewski

default:
suites:
ui_checkout:
contexts:
- sylius.behat.context.hook.doctrine_orm
- sylius.behat.context.hook.email_spool

- sylius.behat.context.transform.address
- sylius.behat.context.transform.country
- sylius.behat.context.transform.channel
- sylius.behat.context.transform.currency
- sylius.behat.context.transform.customer
- sylius.behat.context.transform.lexical
- sylius.behat.context.transform.locale
- sylius.behat.context.transform.order
- sylius.behat.context.transform.payment
- sylius.behat.context.transform.product
- sylius.behat.context.transform.product_option
- sylius.behat.context.transform.province
- sylius.behat.context.transform.shared_storage
- sylius.behat.context.transform.shipping_category
- sylius.behat.context.transform.shipping_method
- sylius.behat.context.transform.tax_category
- sylius.behat.context.transform.user
- sylius.behat.context.transform.zone

- sylius.behat.context.setup.address
- sylius.behat.context.setup.admin_user
- sylius.behat.context.setup.channel
- sylius.behat.context.setup.currency
- sylius.behat.context.setup.customer
- sylius.behat.context.setup.exchange_rate
- sylius.behat.context.setup.geographical
- sylius.behat.context.setup.locale
- sylius.behat.context.setup.payment
- sylius.behat.context.setup.product
- sylius.behat.context.setup.promotion
- sylius.behat.context.setup.shop_security
- sylius.behat.context.setup.shipping
- sylius.behat.context.setup.shipping_category
- sylius.behat.context.setup.taxation
- sylius.behat.context.setup.user
- sylius.behat.context.setup.zone
- Tests\Sylius\PayPalPlugin\Behat\Context\Setup\PaymentPayPalContext

- sylius.behat.context.ui.admin.managing_orders
- sylius.behat.context.ui.channel
- sylius.behat.context.ui.email
- sylius.behat.context.ui.shop.address_book
- sylius.behat.context.ui.shop.cart
- sylius.behat.context.ui.shop.checkout
- sylius.behat.context.ui.shop.checkout.addressing
- sylius.behat.context.ui.shop.checkout.complete
- sylius.behat.context.ui.shop.checkout.payment
- sylius.behat.context.ui.shop.checkout.shipping
- sylius.behat.context.ui.shop.checkout.thank_you
- sylius.behat.context.ui.shop.checkout.registration_after_checkout
- sylius.behat.context.ui.shop.currency
- sylius.behat.context.ui.shop.homepage
- sylius.behat.context.ui.shop.locale

filters:
tags: "@checkout && @ui"
ui_managing_payment_methods:
contexts:
- sylius.behat.context.hook.doctrine_orm

- sylius.behat.context.transform.address
- sylius.behat.context.transform.channel
- sylius.behat.context.transform.country
- sylius.behat.context.transform.customer
- sylius.behat.context.transform.order
- sylius.behat.context.transform.payment
- sylius.behat.context.transform.product
- sylius.behat.context.transform.shared_storage
- sylius.behat.context.transform.shipping_method
- sylius.behat.context.transform.zone
- sylius.behat.context.transform.lexical

- sylius.behat.context.setup.admin_security
- sylius.behat.context.setup.channel
- sylius.behat.context.setup.customer
- sylius.behat.context.setup.geographical
- sylius.behat.context.setup.order
- sylius.behat.context.setup.payment
- sylius.behat.context.setup.product
- sylius.behat.context.setup.shipping
- sylius.behat.context.setup.zone

- Tests\Sylius\PayPalPlugin\Behat\Context\Setup\PaymentPayPalContext

- sylius.behat.context.ui.admin.managing_payment_methods
- sylius.behat.context.ui.channel
- sylius.behat.context.ui.email
- sylius.behat.context.ui.shop.cart

- Tests\Sylius\PayPalPlugin\Behat\Context\Admin\ManagingPaymentMethodsContext
filters:
tags: "@managing_payment_methods && @ui"
ui_managing_orders:
contexts:
- sylius.behat.context.hook.calendar
- sylius.behat.context.hook.doctrine_orm
- sylius.behat.context.hook.email_spool

- sylius.behat.context.setup.admin_security
- sylius.behat.context.setup.admin_user
- sylius.behat.context.setup.calendar
- sylius.behat.context.setup.channel
- sylius.behat.context.setup.currency
- sylius.behat.context.setup.customer
- sylius.behat.context.setup.geographical
- sylius.behat.context.setup.locale
- sylius.behat.context.setup.order
- sylius.behat.context.setup.payment
- sylius.behat.context.setup.product
- sylius.behat.context.setup.product_taxon
- sylius.behat.context.setup.promotion
- sylius.behat.context.setup.shipping
- sylius.behat.context.setup.shop_security
- sylius.behat.context.setup.taxation
- sylius.behat.context.setup.taxonomy
- sylius.behat.context.setup.user
- sylius.behat.context.setup.zone

- Tests\Sylius\PayPalPlugin\Behat\Context\Setup\PaymentPayPalContext

- sylius.behat.context.transform.address
- sylius.behat.context.transform.channel
- sylius.behat.context.transform.country
- sylius.behat.context.transform.currency
- sylius.behat.context.transform.customer
- sylius.behat.context.transform.lexical
- sylius.behat.context.transform.locale
- sylius.behat.context.transform.order
- sylius.behat.context.transform.payment
- sylius.behat.context.transform.product
- sylius.behat.context.transform.product_variant
- sylius.behat.context.transform.promotion
- sylius.behat.context.transform.shipping_method
- sylius.behat.context.transform.tax_category
- sylius.behat.context.transform.taxon
- sylius.behat.context.transform.zone

- sylius.behat.context.transform.shared_storage

- sylius.behat.context.ui.admin.managing_orders
- sylius.behat.context.ui.admin.notification
- sylius.behat.context.ui.channel
- sylius.behat.context.ui.email
- sylius.behat.context.ui.shop.cart
- sylius.behat.context.ui.shop.checkout
- sylius.behat.context.ui.shop.checkout.addressing
- sylius.behat.context.ui.shop.checkout.complete
- sylius.behat.context.ui.shop.currency

- Tests\Sylius\PayPalPlugin\Behat\Context\Admin\ManagingOrdersContext

filters:
tags: "@managing_orders && @ui"

0 comments on commit d7b8776

Please sign in to comment.