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

Launch Sylius 1.13 branch 🚀 #949

Merged
merged 18 commits into from
Feb 28, 2024
Merged
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
24 changes: 16 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,10 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.0", "8.1"]
php: ["8.1", "8.2"]
symfony: ["^5.4", "^6.4"]
node: ["16.x"]
mysql: ["5.7", "8.0"]
exclude:
-
php: "8.0"
symfony: "^6.4"
node: ["20.x"]
mysql: ["8.3"]

env:
APP_ENV: test_cached
Expand All @@ -61,6 +57,13 @@ jobs:
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.4"
composer config extra.symfony.require "${{ matrix.symfony }}"

# These dependencies since Sylius 1.13 have been shifted to dev ones: https://github.com/Sylius/Sylius/pull/15485
-
name: Add Payum dependencies
run: |
composer require --dev --no-update --no-progress --no-scripts --no-plugins "payum/paypal-express-checkout-nvp:^1.7.3"
composer require --dev --no-update --no-progress --no-scripts --no-plugins "payum/stripe:^1.7.3"

-
name: Setup Node
uses: actions/setup-node@v2
Expand Down Expand Up @@ -161,7 +164,9 @@ jobs:

-
name: Validate composer.json
run: composer validate --ansi --strict --no-check-publish
run: composer validate --ansi --strict --no-check-all
# Restore before Sylius 1.13 release
# run: composer validate --ansi --strict --no-check-publish

-
name: Run security check
Expand All @@ -187,6 +192,9 @@ jobs:
name: Run PHPUnit
run: vendor/bin/phpunit --colors=always

- name: Install Behat driver
run: vendor/bin/bdi detect drivers

-
name: Run managing catalog promotion scenarios
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&@managing_catalog_promotions"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
/behat.yml
/phpspec.yml

/drivers/

/docker-compose.override.yaml
/docker-compose.override.yml
/docker/mysql/data/
Expand Down
19 changes: 19 additions & 0 deletions behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ default:

extensions:
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
Robertfausk\Behat\PantherExtension: ~

FriendsOfBehat\MinkDebugExtension:
directory: etc/build
Expand All @@ -24,6 +25,10 @@ default:
sessions:
symfony:
symfony: ~
chromedriver:
chrome:
api_url: http://127.0.0.1:9222
validate_certificate: false
chrome_headless:
chrome:
api_url: http://127.0.0.1:9222
Expand All @@ -50,6 +55,18 @@ default:
firefox:
selenium2:
browser: firefox
panther:
panther:
manager_options:
connection_timeout_in_ms: 5000
request_timeout_in_ms: 120000
chromedriver_arguments:
- --log-path=etc/build/chromedriver.log
- --verbose
capabilities:
acceptSslCerts: true
acceptInsecureCerts: true
unexpectedAlertBehaviour: accept
show_auto: false

FriendsOfBehat\SymfonyExtension: ~
Expand All @@ -61,6 +78,8 @@ default:
- "vendor/sylius/sylius/features"
- "features"

SyliusLabs\SuiteTagsExtension: ~

gherkin:
filters:
tags: "~@todo&&~@cli" # CLI is excluded as it registers an error handler that mutes fatal errors
12 changes: 7 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
}
],
"require": {
"php": "^8.0",
"sylius/paypal-plugin": "^1.5",
"sylius/sylius": "^1.12.11",
"php": "^8.1",
"sylius/sylius": "1.13.x-dev",
"symfony/dotenv": "^5.4 || ^6.4",
"symfony/runtime": "^5.4 || ^6.4",
"symfony/flex": "^2.4"
},
"require-dev": {
"behat/behat": "^3.7",
"behat/mink-selenium2-driver": "^1.4",
"dbrekelmans/bdi": "^1.1",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.7",
"friends-of-behat/mink": "^1.8",
Expand All @@ -50,10 +50,12 @@
"phpstan/phpstan": "^1.8.4",
"phpstan/phpstan-doctrine": "^1.3.2",
"phpstan/phpstan-webmozart-assert": "^1.1",
"phpunit/phpunit": "^8.5",
"phpunit/phpunit": "^9.6",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"stripe/stripe-php": "^6.43",
"robertfausk/behat-panther-extension": "^1.1",
"stripe/stripe-php": "^7.0 || ^8.0",
"sylius-labs/coding-standard": "^4.0",
"sylius-labs/suite-tags-extension": "^0.1.0",
"sylius/sylius-rector": "^1.0",
"symfony/browser-kit": "^5.4 || ^6.4",
"symfony/debug-bundle": "^5.4 || ^6.4",
Expand Down
3 changes: 2 additions & 1 deletion config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class => ['all' => true],
Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true],
Sylius\Bundle\OrderBundle\SyliusOrderBundle::class => ['all' => true],
Sylius\Bundle\MoneyBundle\SyliusMoneyBundle::class => ['all' => true],
Expand Down Expand Up @@ -56,7 +57,7 @@
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Sylius\Bundle\ApiBundle\SyliusApiBundle::class => ['all' => true],
SyliusLabs\DoctrineMigrationsExtraBundle\SyliusLabsDoctrineMigrationsExtraBundle::class => ['all' => true],
Sylius\PayPalPlugin\SyliusPayPalPlugin::class => ['all' => true],
// Sylius\PayPalPlugin\SyliusPayPalPlugin::class => ['all' => true], // Restore before Sylius 1.13 release
SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Expand Down
10 changes: 9 additions & 1 deletion config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ imports:
- { resource: "@SyliusApiBundle/Resources/config/app/config.yaml" }

- { resource: "@SyliusShopBundle/Resources/config/app/config.yml" }
- { resource: "@SyliusPayPalPlugin/Resources/config/config.yaml" }

# Restore before Sylius 1.13 release
# - { resource: "@SyliusPayPalPlugin/Resources/config/config.yaml" }
- { resource: "../parameters.yaml" }

parameters:
Expand Down Expand Up @@ -65,6 +67,12 @@ sylius_core:
channel_pricing:
classes:
model: App\Entity\Channel\ChannelPricing
channel_price_history_config:
classes:
model: App\Entity\Channel\ChannelPriceHistoryConfig
channel_pricing_log_entry:
classes:
model: App\Entity\Channel\ChannelPricingLogEntry

sylius_currency:
resources:
Expand Down
11 changes: 11 additions & 0 deletions config/packages/nyholm_psr7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
services:
# Register nyholm/psr7 services for autowiring with PSR-17 (HTTP factories)
Psr\Http\Message\RequestFactoryInterface: '@nyholm.psr7.psr17_factory'
Psr\Http\Message\ResponseFactoryInterface: '@nyholm.psr7.psr17_factory'
Psr\Http\Message\ServerRequestFactoryInterface: '@nyholm.psr7.psr17_factory'
Psr\Http\Message\StreamFactoryInterface: '@nyholm.psr7.psr17_factory'
Psr\Http\Message\UploadedFileFactoryInterface: '@nyholm.psr7.psr17_factory'
Psr\Http\Message\UriFactoryInterface: '@nyholm.psr7.psr17_factory'

nyholm.psr7.psr17_factory:
class: Nyholm\Psr7\Factory\Psr17Factory
2 changes: 2 additions & 0 deletions config/packages/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
framework:
workflows: null
5 changes: 3 additions & 2 deletions config/routes.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
sylius_paypal_webhook:
resource: "@SyliusPayPalPlugin/Resources/config/webhook_routing.yaml"
# Restore before Sylius 1.13 release
#sylius_paypal_webhook:
# resource: "@SyliusPayPalPlugin/Resources/config/webhook_routing.yaml"
7 changes: 4 additions & 3 deletions config/routes/sylius_admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ sylius_admin:
resource: "@SyliusAdminBundle/Resources/config/routing.yml"
prefix: '/%sylius_admin.path_name%'

sylius_paypal_admin:
resource: "@SyliusPayPalPlugin/Resources/config/admin_routing.yml"
prefix: '/%sylius_admin.path_name%'
# Restore before Sylius 1.13 release
#sylius_paypal_admin:
# resource: "@SyliusPayPalPlugin/Resources/config/admin_routing.yml"
# prefix: '/%sylius_admin.path_name%'
11 changes: 6 additions & 5 deletions config/routes/sylius_shop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ sylius_shop_default_locale:
defaults:
_controller: sylius.controller.shop.locale_switch::switchAction

sylius_paypal:
resource: "@SyliusPayPalPlugin/Resources/config/shop_routing.yaml"
prefix: /{_locale}
requirements:
_locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$
# Restore before Sylius 1.13 release
#sylius_paypal:
# resource: "@SyliusPayPalPlugin/Resources/config/shop_routing.yaml"
# prefix: /{_locale}
# requirements:
# _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$

# see https://web.dev/change-password-url/
sylius_shop_request_password_reset_token_redirect:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ services:
mysql:
container_name: mysql
# in production, we may want to use a managed database service
image: mysql:5.7 # Sylius is fully working on mysql 8.0 version
image: mysql:8.3
environment:
MYSQL_RANDOM_ROOT_PASSWORD: true
MYSQL_DATABASE: sylius_prod
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:

mysql:
container_name: mysql
image: mysql:5.7 # Sylius is fully working on mysql 8.0 version
image: mysql:8.3
platform: linux/amd64
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-nopassword}
Expand Down
18 changes: 18 additions & 0 deletions src/Entity/Channel/ChannelPriceHistoryConfig.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

namespace App\Entity\Channel;

use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\ChannelPriceHistoryConfig as BaseChannelPriceHistoryConfig;

/**
* @ORM\Entity
* @ORM\Table(name="sylius_channel_price_history_config")
*/
#[ORM\Entity]
#[ORM\Table(name: 'sylius_channel_price_history_config')]
class ChannelPriceHistoryConfig extends BaseChannelPriceHistoryConfig
{
}
18 changes: 18 additions & 0 deletions src/Entity/Channel/ChannelPricingLogEntry.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

namespace App\Entity\Channel;

use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\ChannelPricingLogEntry as BaseChannelPricingLogEntry;

/**
* @ORM\Entity
* @ORM\Table(name="sylius_channel_pricing_log_entry")
*/
#[ORM\Entity]
#[ORM\Table(name: 'sylius_channel_pricing_log_entry')]
class ChannelPricingLogEntry extends BaseChannelPricingLogEntry
{
}
42 changes: 33 additions & 9 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,18 @@
"ref": "5ef2976310e8f9621c1a722a73bfbe115c1559a3"
}
},
"nyholm/psr7": {
"version": "1.8",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "1.0",
"ref": "4a8c0345442dcca1d8a2c65633dcf0285dd5a5a2"
},
"files": [
"config/packages/nyholm_psr7.yaml"
]
},
"openlss/lib-array2xml": {
"version": "0.0.10"
},
Expand Down Expand Up @@ -344,9 +356,6 @@
"phpdocumentor/type-resolver": {
"version": "0.4.0"
},
"phpseclib/phpseclib": {
"version": "2.0.30"
},
"phpspec/php-diff": {
"version": "v1.1.0"
},
Expand Down Expand Up @@ -383,9 +392,6 @@
"phpunit/php-timer": {
"version": "1.0.9"
},
"phpunit/php-token-stream": {
"version": "2.0.2"
},
"phpunit/phpunit": {
"version": "4.7",
"recipe": {
Expand Down Expand Up @@ -527,9 +533,6 @@
"sylius/mailer-bundle": {
"version": "v1.4.4"
},
"sylius/paypal-plugin": {
"version": "v1.0.1"
},
"sylius/registry": {
"version": "v1.4.1"
},
Expand Down Expand Up @@ -689,6 +692,15 @@
"symfony/options-resolver": {
"version": "v4.1.3"
},
"symfony/panther": {
"version": "2.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "1.0",
"ref": "292a3236e81f55b545b09b9954ab097248972ab3"
}
},
"symfony/password-hasher": {
"version": "v5.3.2"
},
Expand Down Expand Up @@ -831,6 +843,18 @@
"webpack.config.js"
]
},
"symfony/workflow": {
"version": "6.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "3.3",
"ref": "3b2f8ca32a07fcb00f899649053943fa3d8bbfb6"
},
"files": [
"config/packages/workflow.yaml"
]
},
"symfony/yaml": {
"version": "v4.1.3"
},
Expand Down
Loading
Loading