mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
Resolve conflicts between 1.12 and 1.13
This commit is contained in:
commit
66d6a047d8
2362 changed files with 74543 additions and 17512 deletions
|
|
@ -1,6 +1,6 @@
|
|||
FROM sylius/standard:1.11-traditional
|
||||
|
||||
RUN apt-get update && apt-get install php8.0-xdebug && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
||||
RUN apt-get update && apt-get install curl php8.0-xdebug -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
||||
|
||||
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
|
||||
&& architecture=$(uname -m) \
|
||||
|
|
|
|||
40
.github/workflows/ci__full.yaml
vendored
40
.github/workflows/ci__full.yaml
vendored
|
|
@ -1,6 +1,9 @@
|
|||
name: Continuous Integration (Full)
|
||||
|
||||
on:
|
||||
schedule:
|
||||
-
|
||||
cron: "0 2 * * *" # Run every day at 2am
|
||||
workflow_dispatch: ~
|
||||
|
||||
concurrency:
|
||||
|
|
@ -9,37 +12,62 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
static-checks:
|
||||
name: Static checks
|
||||
strategy:
|
||||
matrix:
|
||||
branch: [ "1.12", "1.13" ]
|
||||
name: "[${{ matrix.branch }}] Static checks"
|
||||
uses: ./.github/workflows/ci_static-checks.yaml
|
||||
with:
|
||||
branch: ${{ matrix.branch }}
|
||||
type: full
|
||||
e2e-mariadb:
|
||||
name: End-to-end tests (MariaDB)
|
||||
strategy:
|
||||
matrix:
|
||||
branch: [ "1.12", "1.13" ]
|
||||
name: "[${{ matrix.branch }}] End-to-end tests (MariaDB)"
|
||||
needs: static-checks
|
||||
uses: ./.github/workflows/ci_e2e-mariadb.yaml
|
||||
with:
|
||||
branch: ${{ matrix.branch }}
|
||||
type: full
|
||||
e2e-mysql:
|
||||
name: End-to-end tests (MySQL)
|
||||
strategy:
|
||||
matrix:
|
||||
branch: [ "1.12", "1.13" ]
|
||||
name: "[${{ matrix.branch }}] End-to-end tests (MySQL)"
|
||||
needs: static-checks
|
||||
uses: ./.github/workflows/ci_e2e-mysql.yaml
|
||||
with:
|
||||
branch: ${{ matrix.branch }}
|
||||
type: full
|
||||
e2e-pgsql:
|
||||
name: End-to-end tests (PostgreSQL)
|
||||
strategy:
|
||||
matrix:
|
||||
branch: [ "1.12", "1.13" ]
|
||||
name: "[${{ matrix.branch }}] End-to-end tests (PostgreSQL)"
|
||||
needs: static-checks
|
||||
uses: ./.github/workflows/ci_e2e-pgsql.yaml
|
||||
with:
|
||||
branch: ${{ matrix.branch }}
|
||||
type: full
|
||||
e2e-custom:
|
||||
name: End-to-end tests (Custom)
|
||||
strategy:
|
||||
matrix:
|
||||
branch: [ "1.12", "1.13" ]
|
||||
name: "[${{ matrix.branch }}] End-to-end tests (Custom)"
|
||||
needs: static-checks
|
||||
uses: ./.github/workflows/ci_e2e-custom.yaml
|
||||
with:
|
||||
branch: ${{ matrix.branch }}
|
||||
packages:
|
||||
name: Packages
|
||||
strategy:
|
||||
matrix:
|
||||
branch: [ "1.12", "1.13" ]
|
||||
name: "[${{ matrix.branch }}] Packages"
|
||||
needs: static-checks
|
||||
uses: ./.github/workflows/ci_packages.yaml
|
||||
with:
|
||||
branch: ${{ matrix.branch }}
|
||||
type: full
|
||||
unstable:
|
||||
name: Unstable
|
||||
|
|
|
|||
1
.github/workflows/ci__minimal.yaml
vendored
1
.github/workflows/ci__minimal.yaml
vendored
|
|
@ -9,6 +9,7 @@ on:
|
|||
workflow_dispatch: ~
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
- 'upmerge/**'
|
||||
|
||||
concurrency:
|
||||
|
|
|
|||
31
.github/workflows/ci_e2e-custom.yaml
vendored
31
.github/workflows/ci_e2e-custom.yaml
vendored
|
|
@ -2,7 +2,13 @@ name: End-to-End (Custom)
|
|||
|
||||
on:
|
||||
workflow_dispatch: ~
|
||||
workflow_call: ~
|
||||
workflow_call:
|
||||
inputs:
|
||||
branch:
|
||||
description: "Branch"
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
|
||||
jobs:
|
||||
behat-no-js-unstable-symfony:
|
||||
|
|
@ -22,7 +28,25 @@ jobs:
|
|||
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?charset=utf8mb4&serverVersion=${{ matrix.mysql }}"
|
||||
|
||||
steps:
|
||||
-
|
||||
- name: Set variables
|
||||
shell: bash
|
||||
env:
|
||||
BRANCH: ${{ inputs.branch }}
|
||||
run: |
|
||||
if [ "$BRANCH" == "1.12" ]; then
|
||||
echo "USE_LEGACY_POSTGRES_SETUP=yes" >> $GITHUB_ENV
|
||||
else
|
||||
echo "USE_LEGACY_POSTGRES_SETUP=no" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: "Checkout (With Branch)"
|
||||
if: "${{ inputs.branch != '' }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: "Checkout"
|
||||
if: "${{ inputs.branch == '' }}"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Change minimum-stability to dev
|
||||
|
|
@ -31,13 +55,14 @@ jobs:
|
|||
composer config prefer-stable true
|
||||
|
||||
- name: Build application
|
||||
uses: SyliusLabs/BuildTestAppAction@v2.0
|
||||
uses: SyliusLabs/BuildTestAppAction@v2.2
|
||||
with:
|
||||
build_type: "sylius"
|
||||
cache_key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-"
|
||||
cache_restore_key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-"
|
||||
e2e: "yes"
|
||||
database_version: ${{ matrix.mysql }}
|
||||
legacy_postgresql_setup: ${{ env.USE_LEGACY_POSTGRES_SETUP }}
|
||||
php_version: ${{ matrix.php }}
|
||||
symfony_version: ${{ matrix.symfony }}
|
||||
|
||||
|
|
|
|||
50
.github/workflows/ci_e2e-mariadb.yaml
vendored
50
.github/workflows/ci_e2e-mariadb.yaml
vendored
|
|
@ -4,6 +4,11 @@ on:
|
|||
workflow_dispatch: ~
|
||||
workflow_call:
|
||||
inputs:
|
||||
branch:
|
||||
description: "Branch"
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
type:
|
||||
description: "Type of the build"
|
||||
required: true
|
||||
|
|
@ -16,9 +21,17 @@ jobs:
|
|||
outputs:
|
||||
matrix: ${{ steps.matrix.outputs.prop }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
-
|
||||
name: "Get matrix"
|
||||
- name: "Checkout (With Branch)"
|
||||
if: "${{ inputs.branch != '' }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v3
|
||||
if: "${{ inputs.branch == '' }}"
|
||||
|
||||
- name: "Get matrix"
|
||||
id: matrix
|
||||
uses: notiz-dev/github-action-json-property@release
|
||||
with:
|
||||
|
|
@ -28,7 +41,7 @@ jobs:
|
|||
behat-no-js:
|
||||
needs: get-matrix
|
||||
runs-on: ubuntu-latest
|
||||
name: "Non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MariaDB ${{ matrix.mariadb }}, DBAL ${{ matrix.dbal }}"
|
||||
name: "Non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MariaDB ${{ matrix.mariadb }}"
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
@ -39,15 +52,29 @@ jobs:
|
|||
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?charset=utf8mb4&serverVersion=mariadb-${{ matrix.mariadb }}"
|
||||
|
||||
steps:
|
||||
-
|
||||
- name: Set variables
|
||||
shell: bash
|
||||
env:
|
||||
BRANCH: ${{ inputs.branch }}
|
||||
run: |
|
||||
if [ "$BRANCH" == "1.12" ]; then
|
||||
echo "USE_LEGACY_POSTGRES_SETUP=yes" >> $GITHUB_ENV
|
||||
else
|
||||
echo "USE_LEGACY_POSTGRES_SETUP=no" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: "Checkout (With Branch)"
|
||||
if: "${{ inputs.branch != '' }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: "Checkout"
|
||||
if: "${{ inputs.branch == '' }}"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Restrict packages
|
||||
if: matrix.dbal == '^2.7'
|
||||
run: composer require --no-update --no-scripts --no-interaction "doctrine/dbal:${{ matrix.dbal }}"
|
||||
|
||||
- name: Build application
|
||||
uses: SyliusLabs/BuildTestAppAction@v2.0
|
||||
uses: SyliusLabs/BuildTestAppAction@v2.2
|
||||
with:
|
||||
build_type: "sylius"
|
||||
cache_key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-"
|
||||
|
|
@ -55,6 +82,7 @@ jobs:
|
|||
e2e: "yes"
|
||||
database: "mariadb"
|
||||
database_version: ${{ matrix.mariadb }}
|
||||
legacy_postgresql_setup: ${{ env.USE_LEGACY_POSTGRES_SETUP }}
|
||||
php_version: ${{ matrix.php }}
|
||||
symfony_version: ${{ matrix.symfony }}
|
||||
|
||||
|
|
@ -74,7 +102,7 @@ jobs:
|
|||
uses: actions/upload-artifact@v3
|
||||
if: failure()
|
||||
with:
|
||||
name: "Logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MariaDB ${{ matrix.mariadb }}), DBAL ${{ matrix.dbal }}"
|
||||
name: "Logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MariaDB ${{ matrix.mariadb }})"
|
||||
path: |
|
||||
etc/build/
|
||||
var/log
|
||||
|
|
|
|||
68
.github/workflows/ci_e2e-mysql.yaml
vendored
68
.github/workflows/ci_e2e-mysql.yaml
vendored
|
|
@ -4,6 +4,11 @@ on:
|
|||
workflow_dispatch: ~
|
||||
workflow_call:
|
||||
inputs:
|
||||
branch:
|
||||
description: "Branch"
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
type:
|
||||
description: "Type of the build"
|
||||
required: true
|
||||
|
|
@ -16,7 +21,15 @@ jobs:
|
|||
outputs:
|
||||
matrix: ${{ steps.matrix.outputs.prop }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: "Checkout (With Branch)"
|
||||
if: "${{ inputs.branch != '' }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v3
|
||||
if: "${{ inputs.branch == '' }}"
|
||||
-
|
||||
name: "Get matrix"
|
||||
id: matrix
|
||||
|
|
@ -28,7 +41,7 @@ jobs:
|
|||
behat-no-js:
|
||||
needs: get-matrix
|
||||
runs-on: ubuntu-latest
|
||||
name: "Non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, Twig ${{ matrix.twig }}, DBAL ${{ matrix.dbal }}.x, API Platform ${{ matrix.api-platform }}"
|
||||
name: "Non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, Twig ${{ matrix.twig }}, API Platform ${{ matrix.api-platform }}"
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
@ -39,25 +52,40 @@ jobs:
|
|||
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?charset=utf8mb4&serverVersion=${{ matrix.mysql }}"
|
||||
|
||||
steps:
|
||||
-
|
||||
- name: Set variables
|
||||
shell: bash
|
||||
env:
|
||||
BRANCH: ${{ inputs.branch }}
|
||||
run: |
|
||||
if [ "$BRANCH" == "1.12" ]; then
|
||||
echo "USE_LEGACY_POSTGRES_SETUP=yes" >> $GITHUB_ENV
|
||||
else
|
||||
echo "USE_LEGACY_POSTGRES_SETUP=no" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: "Checkout (With Branch)"
|
||||
if: "${{ inputs.branch != '' }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: "Checkout"
|
||||
if: "${{ inputs.branch == '' }}"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Restrict Twig
|
||||
if: matrix.twig == '^2.12'
|
||||
run: composer require --no-update --no-scripts --no-interaction "twig/twig:${{ matrix.twig }}"
|
||||
|
||||
- name: Restrict DBAL
|
||||
if: matrix.dbal == '^2.7'
|
||||
run: composer require --no-update --no-scripts --no-interaction "doctrine/dbal:${{ matrix.dbal }}"
|
||||
|
||||
- name: Build application
|
||||
uses: SyliusLabs/BuildTestAppAction@v2.0
|
||||
uses: SyliusLabs/BuildTestAppAction@v2.2
|
||||
with:
|
||||
build_type: "sylius"
|
||||
cache_key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}-api-platform-${{ matrix.api-platform }}"
|
||||
cache_restore_key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}-api-platform-${{ matrix.api-platform }}"
|
||||
e2e: "yes"
|
||||
database_version: ${{ matrix.mysql }}
|
||||
legacy_postgresql_setup: ${{ env.USE_LEGACY_POSTGRES_SETUP }}
|
||||
php_version: ${{ matrix.php }}
|
||||
symfony_version: ${{ matrix.symfony }}
|
||||
|
||||
|
|
@ -80,7 +108,7 @@ jobs:
|
|||
uses: actions/upload-artifact@v3
|
||||
if: failure()
|
||||
with:
|
||||
name: "Logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}), ApiPlatform ${{ matrix.api-platform }}, Twig ${{ matrix.twig }}, MySQL ${{ matrix.mysql }}, DBAL ${{ matrix.dbal }}"
|
||||
name: "Logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}), ApiPlatform ${{ matrix.api-platform }}, Twig ${{ matrix.twig }}, MySQL ${{ matrix.mysql }}"
|
||||
path: |
|
||||
etc/build/
|
||||
var/log
|
||||
|
|
@ -89,7 +117,7 @@ jobs:
|
|||
behat-ui-js:
|
||||
needs: get-matrix
|
||||
runs-on: ubuntu-latest
|
||||
name: "JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, Twig ${{ matrix.twig }}, DBAL ${{ matrix.dbal }}, API Platform ${{ matrix.api-platform }}"
|
||||
name: "JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, Twig ${{ matrix.twig }}, API Platform ${{ matrix.api-platform }}"
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
@ -100,6 +128,17 @@ jobs:
|
|||
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?charset=utf8mb4&serverVersion=${{ matrix.mysql }}"
|
||||
|
||||
steps:
|
||||
- name: Set variables
|
||||
shell: bash
|
||||
env:
|
||||
BRANCH: ${{ inputs.branch }}
|
||||
run: |
|
||||
if [ "$BRANCH" == "1.12" ]; then
|
||||
echo "USE_LEGACY_POSTGRES_SETUP=yes" >> $GITHUB_ENV
|
||||
else
|
||||
echo "USE_LEGACY_POSTGRES_SETUP=no" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
-
|
||||
uses: actions/checkout@v3
|
||||
|
||||
|
|
@ -118,12 +157,8 @@ jobs:
|
|||
if: matrix.twig == '^2.12'
|
||||
run: composer require --no-update --no-scripts --no-interaction "twig/twig:${{ matrix.twig }}"
|
||||
|
||||
- name: Restrict DBAL
|
||||
if: matrix.dbal == '^2.7'
|
||||
run: composer require --no-update --no-scripts --no-interaction "doctrine/dbal:${{ matrix.dbal }}"
|
||||
|
||||
- name: Build application
|
||||
uses: jakubtobiasz/SyliusBuildTestAppAction@v2.0
|
||||
uses: SyliusLabs/BuildTestAppAction@v2.2
|
||||
with:
|
||||
build_type: "sylius"
|
||||
cache_key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}-api-platform-${{ matrix.api-platform }}"
|
||||
|
|
@ -131,6 +166,7 @@ jobs:
|
|||
e2e: "yes"
|
||||
e2e_js: "yes"
|
||||
database_version: ${{ matrix.mysql }}
|
||||
legacy_postgresql_setup: ${{ env.USE_LEGACY_POSTGRES_SETUP }}
|
||||
php_version: ${{ matrix.php }}
|
||||
symfony_version: ${{ matrix.symfony }}
|
||||
|
||||
|
|
@ -147,7 +183,7 @@ jobs:
|
|||
uses: actions/upload-artifact@v3
|
||||
if: failure()
|
||||
with:
|
||||
name: "Logs (JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, ApiPlatform ${{ matrix.api-platform }}, Twig ${{ matrix.twig }}, MySQL ${{ matrix.mysql }}, DBAL ${{ matrix.dbal }})"
|
||||
name: "Logs (JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, ApiPlatform ${{ matrix.api-platform }}, Twig ${{ matrix.twig }}, MySQL ${{ matrix.mysql }})"
|
||||
path: |
|
||||
etc/build/
|
||||
var/log
|
||||
|
|
|
|||
28
.github/workflows/ci_e2e-pgsql.yaml
vendored
28
.github/workflows/ci_e2e-pgsql.yaml
vendored
|
|
@ -4,6 +4,11 @@ on:
|
|||
workflow_dispatch: ~
|
||||
workflow_call:
|
||||
inputs:
|
||||
branch:
|
||||
description: "Branch"
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
type:
|
||||
description: "Type of the build"
|
||||
required: true
|
||||
|
|
@ -38,11 +43,29 @@ jobs:
|
|||
DATABASE_URL: "pgsql://postgres:postgres@127.0.0.1/sylius?charset=utf8&serverVersion=${{ matrix.postgres }}"
|
||||
|
||||
steps:
|
||||
-
|
||||
- name: Set variables
|
||||
shell: bash
|
||||
env:
|
||||
BRANCH: ${{ inputs.branch }}
|
||||
run: |
|
||||
if [ "$BRANCH" == "1.12" ]; then
|
||||
echo "USE_LEGACY_POSTGRES_SETUP=yes" >> $GITHUB_ENV
|
||||
else
|
||||
echo "USE_LEGACY_POSTGRES_SETUP=no" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: "Checkout (With Branch)"
|
||||
if: "${{ inputs.branch != '' }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: "Checkout"
|
||||
if: "${{ inputs.branch == '' }}"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build application
|
||||
uses: SyliusLabs/BuildTestAppAction@v2.0
|
||||
uses: SyliusLabs/BuildTestAppAction@v2.2
|
||||
with:
|
||||
build_type: "sylius"
|
||||
cache_key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-"
|
||||
|
|
@ -50,6 +73,7 @@ jobs:
|
|||
e2e: "yes"
|
||||
database: "postgresql"
|
||||
database_version: ${{ matrix.postgres }}
|
||||
legacy_postgresql_setup: ${{ env.USE_LEGACY_POSTGRES_SETUP }}
|
||||
php_version: ${{ matrix.php }}
|
||||
symfony_version: ${{ matrix.symfony }}
|
||||
|
||||
|
|
|
|||
2
.github/workflows/ci_e2e-unstable.yaml
vendored
2
.github/workflows/ci_e2e-unstable.yaml
vendored
|
|
@ -37,7 +37,7 @@ jobs:
|
|||
composer config prefer-stable false
|
||||
|
||||
- name: Build application
|
||||
uses: SyliusLabs/BuildTestAppAction@v2.0
|
||||
uses: SyliusLabs/BuildTestAppAction@v2.2
|
||||
with:
|
||||
build_type: "sylius"
|
||||
cache_key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-"
|
||||
|
|
|
|||
45
.github/workflows/ci_packages.yaml
vendored
45
.github/workflows/ci_packages.yaml
vendored
|
|
@ -4,6 +4,11 @@ on:
|
|||
workflow_dispatch: ~
|
||||
workflow_call:
|
||||
inputs:
|
||||
branch:
|
||||
description: "Branch"
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
type:
|
||||
description: "Type of the build"
|
||||
required: true
|
||||
|
|
@ -16,7 +21,16 @@ jobs:
|
|||
outputs:
|
||||
matrix: ${{ steps.matrix.outputs.prop }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: "Checkout (With Branch)"
|
||||
if: "${{ inputs.branch != '' }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: "Checkout"
|
||||
if: "${{ inputs.branch == '' }}"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: "Get matrix"
|
||||
id: matrix
|
||||
uses: notiz-dev/github-action-json-property@release
|
||||
|
|
@ -30,7 +44,16 @@ jobs:
|
|||
outputs:
|
||||
matrix: ${{ steps.matrix.outputs.prop }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: "Checkout (With Branch)"
|
||||
if: "${{ inputs.branch != '' }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: "Checkout"
|
||||
if: "${{ inputs.branch == '' }}"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: "Get matrix"
|
||||
id: matrix
|
||||
uses: notiz-dev/github-action-json-property@release
|
||||
|
|
@ -54,7 +77,14 @@ jobs:
|
|||
UNSTABLE: "no"
|
||||
|
||||
steps:
|
||||
-
|
||||
- name: "Checkout (With Branch)"
|
||||
if: "${{ inputs.branch != '' }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: "Checkout"
|
||||
if: "${{ inputs.branch == '' }}"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP
|
||||
|
|
@ -107,7 +137,14 @@ jobs:
|
|||
PACKAGES: '["Bundle/CoreBundle", "Bundle/ApiBundle", "Bundle/AdminBundle"]'
|
||||
|
||||
steps:
|
||||
-
|
||||
- name: "Checkout (With Branch)"
|
||||
if: "${{ inputs.branch != '' }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: "Checkout"
|
||||
if: "${{ inputs.branch == '' }}"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup PHP
|
||||
|
|
|
|||
29
.github/workflows/ci_static-checks.yaml
vendored
29
.github/workflows/ci_static-checks.yaml
vendored
|
|
@ -4,6 +4,11 @@ on:
|
|||
workflow_dispatch: ~
|
||||
workflow_call:
|
||||
inputs:
|
||||
branch:
|
||||
description: "Branch"
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
type:
|
||||
description: "Type of the build"
|
||||
required: true
|
||||
|
|
@ -16,7 +21,16 @@ jobs:
|
|||
outputs:
|
||||
matrix: ${{ steps.matrix.outputs.prop }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: "Checkout (With Branch)"
|
||||
if: "${{ inputs.branch != '' }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: "Checkout"
|
||||
if: "${{ inputs.branch == '' }}"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
-
|
||||
name: "Get matrix"
|
||||
id: matrix
|
||||
|
|
@ -36,7 +50,14 @@ jobs:
|
|||
APP_ENV: test_cached
|
||||
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?charset=utf8mb4&serverVersion=8.0"
|
||||
steps:
|
||||
-
|
||||
- name: "Checkout (With Branch)"
|
||||
if: "${{ inputs.branch != '' }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
|
||||
- name: "Checkout"
|
||||
if: "${{ inputs.branch == '' }}"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: "Setup PHP"
|
||||
|
|
@ -70,6 +91,10 @@ jobs:
|
|||
${{ steps.composer-cache.outputs.dir }}
|
||||
key: ${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}-api-platform-${{ matrix.api-platform }}
|
||||
|
||||
- name: "Require ext-random"
|
||||
if: matrix.php == '8.2'
|
||||
run: composer require ext-random --no-update --no-scripts --no-interaction
|
||||
|
||||
- name: "Install dependencies"
|
||||
run: composer update --no-interaction --no-scripts
|
||||
|
||||
|
|
|
|||
66
.github/workflows/matrix.json
vendored
66
.github/workflows/matrix.json
vendored
|
|
@ -8,7 +8,7 @@
|
|||
"api-platform": "^2.7.10"
|
||||
},
|
||||
{
|
||||
"php": "8.1",
|
||||
"php": "8.2",
|
||||
"symfony": "^6.4",
|
||||
"api-platform": "^2.7.10"
|
||||
}
|
||||
|
|
@ -19,11 +19,10 @@
|
|||
{
|
||||
"php": "8.0",
|
||||
"symfony": "^5.4",
|
||||
"mariadb": "10.4.10",
|
||||
"dbal": "^2.7"
|
||||
"mariadb": "10.4.10"
|
||||
},
|
||||
{
|
||||
"php": "8.1",
|
||||
"php": "8.2",
|
||||
"symfony": "^6.4",
|
||||
"mariadb": "10.4.10",
|
||||
"dbal": "^3.0"
|
||||
|
|
@ -37,16 +36,14 @@
|
|||
"symfony": "^5.4",
|
||||
"api-platform": "^2.7.10",
|
||||
"mysql": "5.7",
|
||||
"twig": "^2.12",
|
||||
"dbal": "^2.7"
|
||||
"twig": "^2.12"
|
||||
},
|
||||
{
|
||||
"php": "8.1",
|
||||
"php": "8.2",
|
||||
"symfony": "^6.4",
|
||||
"api-platform": "^2.7.10",
|
||||
"mysql": "8.0",
|
||||
"twig": "^3.3",
|
||||
"dbal": "^3.0"
|
||||
"twig": "^3.3"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -58,7 +55,7 @@
|
|||
"postgres": "13.9"
|
||||
},
|
||||
{
|
||||
"php": "8.1",
|
||||
"php": "8.2",
|
||||
"symfony": "^6.4",
|
||||
"postgres": "14.6"
|
||||
}
|
||||
|
|
@ -71,7 +68,7 @@
|
|||
"symfony": "^5.4"
|
||||
},
|
||||
{
|
||||
"php": "8.1",
|
||||
"php": "8.2",
|
||||
"symfony": "^6.4"
|
||||
}
|
||||
]
|
||||
|
|
@ -87,7 +84,7 @@
|
|||
},
|
||||
"full": {
|
||||
"static-checks": {
|
||||
"php": [ "8.0", "8.1" ],
|
||||
"php": [ "8.0", "8.1", "8.2" ],
|
||||
"symfony": [ "^5.4", "^6.4" ],
|
||||
"api-platform": [ "^2.7.10" ],
|
||||
"exclude": [
|
||||
|
|
@ -98,10 +95,9 @@
|
|||
]
|
||||
},
|
||||
"e2e-mariadb": {
|
||||
"php": [ "8.0", "8.1" ],
|
||||
"php": [ "8.0", "8.1", "8.2" ],
|
||||
"symfony": [ "^5.4", "^6.4" ],
|
||||
"mariadb": [ "10.4.10" ],
|
||||
"dbal": [ "^2.7", "^3.0" ],
|
||||
"exclude": [
|
||||
{
|
||||
"php": "8.0",
|
||||
|
|
@ -110,52 +106,18 @@
|
|||
]
|
||||
},
|
||||
"e2e-mysql": {
|
||||
"php": [ "8.0", "8.1" ],
|
||||
"php": [ "8.0", "8.1", "8.2" ],
|
||||
"symfony": [ "^5.4", "^6.4" ],
|
||||
"api-platform": [ "^2.7.10" ],
|
||||
"mysql": [ "5.7", "8.0" ],
|
||||
"twig": [ "^3.3" ],
|
||||
"dbal": [ "^3.0" ],
|
||||
"include": [
|
||||
{
|
||||
"php": "8.0",
|
||||
"symfony": "^5.4",
|
||||
"api-platform": "^2.7.10",
|
||||
"mysql": "5.7",
|
||||
"twig": "^2.12",
|
||||
"dbal": "^3.0"
|
||||
},
|
||||
{
|
||||
"php": "8.0",
|
||||
"symfony": "^5.4",
|
||||
"api-platform": "^2.7.10",
|
||||
"mysql": "5.7",
|
||||
"twig": "^2.12",
|
||||
"dbal": "^2.7"
|
||||
},
|
||||
{
|
||||
"php": "8.1",
|
||||
"symfony": "^5.4",
|
||||
"api-platform": "^2.7.10",
|
||||
"mysql": "8.0",
|
||||
"twig": "^3.3",
|
||||
"dbal": "^3.0"
|
||||
},
|
||||
{
|
||||
"php": "8.1",
|
||||
"symfony": "~6.3.0",
|
||||
"api-platform": "^2.7.10",
|
||||
"mysql": "8.0",
|
||||
"twig": "^3.3",
|
||||
"dbal": "^3.0"
|
||||
},
|
||||
{
|
||||
"php": "8.1",
|
||||
"symfony": "^6.4",
|
||||
"api-platform": "^2.7.10",
|
||||
"mysql": "8.0",
|
||||
"twig": "^3.3",
|
||||
"dbal": "^3.0"
|
||||
"twig": "^2.12"
|
||||
}
|
||||
],
|
||||
"exclude": [
|
||||
|
|
@ -166,7 +128,7 @@
|
|||
]
|
||||
},
|
||||
"e2e-pgsql": {
|
||||
"php": [ "8.0", "8.1" ],
|
||||
"php": [ "8.0", "8.1", "8.2" ],
|
||||
"symfony": [ "^5.4", "^6.4" ],
|
||||
"postgres": [ "13.9", "14.6" ],
|
||||
"exclude": [
|
||||
|
|
@ -177,7 +139,7 @@
|
|||
]
|
||||
},
|
||||
"packages": {
|
||||
"php": [ "8.0", "8.1" ],
|
||||
"php": [ "8.0", "8.1", "8.2" ],
|
||||
"symfony": [ "^5.4", "^6.4" ],
|
||||
"exclude": [
|
||||
{
|
||||
|
|
|
|||
4
.github/workflows/refactor.yaml
vendored
4
.github/workflows/refactor.yaml
vendored
|
|
@ -3,7 +3,7 @@ name: Refactor
|
|||
on:
|
||||
schedule:
|
||||
-
|
||||
cron: "0 2 * * MON" # Run at 2am every Monday
|
||||
cron: "0 2 * * *" # Run every day at 2am
|
||||
workflow_dispatch: ~
|
||||
|
||||
jobs:
|
||||
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branch: ["1.11", "1.12", "1.13"]
|
||||
branch: ["1.12", "1.13"]
|
||||
|
||||
steps:
|
||||
-
|
||||
|
|
|
|||
66
.github/workflows/upmerge_pr.yaml
vendored
Normal file
66
.github/workflows/upmerge_pr.yaml
vendored
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
name: Upmerge PR
|
||||
|
||||
on:
|
||||
schedule:
|
||||
-
|
||||
cron: "0 2 * * *"
|
||||
workflow_dispatch: ~
|
||||
|
||||
jobs:
|
||||
upmerge:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'Sylius/Sylius'
|
||||
name: "Upmerge PR"
|
||||
timeout-minutes: 5
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
-
|
||||
base_branch: "1.12"
|
||||
target_branch: "1.13"
|
||||
-
|
||||
base_branch: "1.13"
|
||||
target_branch: "2.0"
|
||||
|
||||
steps:
|
||||
-
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ matrix.target_branch }}
|
||||
|
||||
-
|
||||
name: Reset upmerge branch
|
||||
run: |
|
||||
git fetch origin ${{ matrix.base_branch }}:${{ matrix.base_branch }}
|
||||
git reset --hard ${{ matrix.base_branch }}
|
||||
|
||||
-
|
||||
name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
token: ${{ secrets.SYLIUS_BOT_PAT }}
|
||||
title: '[UPMERGE] ${{ matrix.base_branch }} -> ${{ matrix.target_branch }}'
|
||||
body: |
|
||||
This PR has been generated automatically.
|
||||
For more details see [upmerge_pr.yaml](/Sylius/Sylius/blob/1.13/.github/workflows/upmerge_pr.yaml).
|
||||
|
||||
**Remember!** The upmerge should always be merged with using `Merge pull request` button.
|
||||
|
||||
In case of conflicts, please resolve them manually with usign the following commands:
|
||||
```
|
||||
git fetch upstream
|
||||
gh pr checkout ${{ github.event.number }}
|
||||
git merge upstream/${{ matrix.target_branch }} --no-commit
|
||||
```
|
||||
|
||||
If you use other name for the upstream remote, please replace `upstream` with the name of your remote pointing to the `Sylius/Sylius` repository.
|
||||
|
||||
Once the conflicts are resolved, please run `git merge --continue` and change the commit title to
|
||||
```
|
||||
Resolve conflicts between ${{ matrix.base_branch }} and ${{ matrix.target_branch }}
|
||||
```
|
||||
branch: "upmerge/${{ matrix.base_branch }}_${{ matrix.target_branch }}"
|
||||
delete-branch: true
|
||||
branch-suffix: "short-commit-hash"
|
||||
base: ${{ matrix.target_branch }}
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -60,4 +60,5 @@ docker-compose.override.yml
|
|||
/public/build/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
yarn.lock
|
||||
###< symfony/webpack-encore-bundle ###
|
||||
|
|
|
|||
1
.npmignore
Normal file
1
.npmignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
**/**
|
||||
36
CONFLICTS.md
36
CONFLICTS.md
|
|
@ -3,42 +3,6 @@
|
|||
This document explains why certain conflicts were added to `composer.json` and
|
||||
references related issues.
|
||||
|
||||
- `doctrine/doctrine-bundle:2.3.0`:
|
||||
|
||||
This version makes Gedmo Doctrine Extensions fail (tree and position behaviour mostly).
|
||||
|
||||
References: https://github.com/doctrine/DoctrineBundle/issues/1305
|
||||
|
||||
- `jms/serializer-bundle:4.1.0`:
|
||||
|
||||
This version contains service with a wrong constructor arguments:
|
||||
`Invalid definition for service ".container.private.profiler": argument 4 of "JMS\SerializerBundle\Debug\DataCollector::__construct()" accepts "JMS\SerializerBundle\Debug\TraceableDriver", "JMS\SerializerBundle\Debug\TraceableMetadataFactory" passed.`
|
||||
|
||||
References: https://github.com/schmittjoh/JMSSerializerBundle/issues/902
|
||||
|
||||
- `symfony/dependency-injection:5.4.5`:
|
||||
|
||||
This version is causing a problem with mink session:
|
||||
`InvalidArgumentException: Specify session name to get in vendor/friends-of-behat/mink/src/Mink.php:198`,
|
||||
|
||||
- `symfony/framework-bundle:5.4.5`:
|
||||
|
||||
This version is causing a problem with returning null as token from `Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage`
|
||||
which leads to wrong solving path prefix by `Sylius\Bundle\ApiBundle\Provider\PathPrefixProvider` in API scenarios
|
||||
|
||||
- `api-platform/core:2.7.0`:
|
||||
|
||||
The FQCN of `ApiPlatform\Core\Metadata\Resource\ResourceNameCollection` has changed to:
|
||||
`ApiPlatform\Metadata\Resource\ResourceNameCollection` and due to this fact
|
||||
`Sylius\Bundle\ApiBundle\Swagger\AcceptLanguageHeaderDocumentationNormalizer`
|
||||
references this class throws an exception
|
||||
`Class "ApiPlatform\Core\Metadata\Resource\ResourceNameCollection" not found`
|
||||
|
||||
- `doctrine/migrations:3.5.3`:
|
||||
|
||||
This version is causing a problem with migrations and results in throwing a `Doctrine\Migrations\Exception\MetadataStorageError` exception e.g. when executing `sylius:install` command.
|
||||
References: https://github.com/doctrine/migrations/issues/1302
|
||||
|
||||
- `lexik/jwt-authentication-bundle: ^2.18`
|
||||
|
||||
After bumping to this version ApiBundle starts failing due to requesting a non-existing `api_platform.openapi.factory.legacy` service.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<h1 align="center">
|
||||
<a href="https://sylius.com/github-readme/link/" target="_blank">
|
||||
<img src="https://sylius.com/assets/github-readme.png?sylius-days" />
|
||||
<img src="https://sylius.com/assets/github-readme.png?course" />
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
|
|
|
|||
317
UPGRADE-1.13.md
Normal file
317
UPGRADE-1.13.md
Normal file
|
|
@ -0,0 +1,317 @@
|
|||
# UPGRADE FROM `v1.12.X` TO `v1.13.0`
|
||||
|
||||
1. There has been a naw parameter added to specify the validation groups for given gateway factory.
|
||||
If you have any custom validation groups for your factory, you need to add them to your `config/packages/_sylius.yaml` file.
|
||||
Also, if you have your own gateway factory and want to add your validation groups you can add another entry to the `validation_groups` configuration node.
|
||||
It is handled by `GatewayConfigGroupsGenerator` and it resolves the groups based on the passed factory name.
|
||||
```yaml
|
||||
sylius_payum:
|
||||
gateway_config:
|
||||
validation_groups:
|
||||
paypal_express_checkout:
|
||||
- 'sylius'
|
||||
- 'sylius_paypal_express_checkout'
|
||||
stripe_checkout:
|
||||
- 'sylius'
|
||||
- 'sylius_stripe_checkout'
|
||||
your_gateway:
|
||||
- 'sylius'
|
||||
- 'your_custom_validation_group'
|
||||
```
|
||||
|
||||
1. There have been a naw parameters added to specify the validation groups for given shipping method rule and calculator.
|
||||
If you have any custom validation groups for your calculator or rules, you need to add them to your `config/packages/_sylius.yaml` file.
|
||||
Also, if you have your own shipping method rule or calculator and want to add your validation groups you can add another key to the `validation_groups` parameter.
|
||||
|
||||
```yaml
|
||||
sylius_shipping:
|
||||
shipping_method_rule:
|
||||
validation_groups:
|
||||
total_weight_greater_than_or_equal:
|
||||
- 'sylius'
|
||||
- 'sylius_shipping_method_rule_total_weight'
|
||||
order_total_greater_than_or_equal:
|
||||
- 'sylius'
|
||||
- 'sylius_shipping_method_rule_order_total'
|
||||
your_shipping_method_rule:
|
||||
- 'sylius'
|
||||
- 'your_custom_validation_group'
|
||||
shipping_method_calculator:
|
||||
validation_groups:
|
||||
flat_rate:
|
||||
- 'sylius'
|
||||
- 'sylius_shipping_method_calculator_rate'
|
||||
per_unit_rate:
|
||||
- 'sylius'
|
||||
- 'sylius_shipping_method_calculator_rate'
|
||||
your_shipping_method_calculator:
|
||||
- 'sylius'
|
||||
- 'your_custom_validation_group'
|
||||
```
|
||||
|
||||
1. Class `Sylius\Component\Core\Promotion\Updater\Rule\TotalOfItemsFromTaxonRuleUpdater` has been deprecated, as it is no more used.
|
||||
|
||||
1. Class `Sylius\Component\Core\Promotion\Updater\Rule\ContainsProductRuleUpdater` has been deprecated, as it is no more used.
|
||||
|
||||
1. Class `Sylius\Bundle\ProductBundle\Form\Type\ProductOptionChoiceType` has been deprecated.
|
||||
Use `Sylius\Bundle\ProductBundle\Form\Type\ProductOptionAutocompleteType` instead.
|
||||
|
||||
1. Using `parentId` query parameter to generate slug in `Sylius\Bundle\TaxonomyBundle\Controller\TaxonSlugController` has been deprecated.
|
||||
Use the `parentCode` query parameter instead.
|
||||
|
||||
1. Starting with Sylius 1.13, the `SyliusPriceHistoryPlugin` is included.
|
||||
If you are currently using the plugin in your project, we recommend following the upgrade guide located [here](UPGRADE-FROM-1.12-WITH-PRICE-HISTORY-PLUGIN-TO-1.13.md).
|
||||
|
||||
1. The `Sylius\Bundle\CoreBundle\CatalogPromotion\Command\RemoveInactiveCatalogPromotion` command and its handler
|
||||
`Sylius\Bundle\CoreBundle\CatalogPromotion\CommandHandler\RemoveInactiveCatalogPromotionHandler` have been deprecated.
|
||||
Use `Sylius\Bundle\CoreBundle\CatalogPromotion\Command\RemoveCatalogPromotion` command instead.
|
||||
|
||||
1. Passing `Symfony\Component\Messenger\MessageBusInterface` to `Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\CatalogPromotionRemovalProcessor`
|
||||
as a second and third argument is deprecated.
|
||||
|
||||
1. Not passing `Sylius\Bundle\CoreBundle\CatalogPromotion\Announcer\CatalogPromotionRemovalAnnouncerInterface` to `Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\CatalogPromotionRemovalProcessor`
|
||||
as a second argument is deprecated.
|
||||
|
||||
1. Not passing `Doctrine\Persistence\ObjectManager` to `Sylius\Component\Core\Updater\UnpaidOrdersStateUpdater`
|
||||
as a fifth argument is deprecated.
|
||||
|
||||
1. To ease customization we've introduces attributes for some services in `1.13`:
|
||||
- `Sylius\Bundle\OrderBundle\Attribute\AsCartContext` for cart contexts
|
||||
- `Sylius\Bundle\OrderBundle\Attribute\AsOrderProcessor` for order processors
|
||||
- `Sylius\Bundle\ProductBundle\Attribute\AsProductVariantResolver` for product variant resolvers
|
||||
|
||||
By default, Sylius still configures them using interfaces, but this way you cannot define a priority.
|
||||
If you want to define a priority, you need to set the following configuration in your `_sylius.yaml` file:
|
||||
```yaml
|
||||
sylius_core:
|
||||
autoconfigure_with_attributes: true
|
||||
```
|
||||
and use one of the new attributes accordingly to the type of your class, e.g.:
|
||||
```php
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\OrderProcessor;
|
||||
|
||||
use Sylius\Bundle\OrderBundle\Attribute\AsOrderProcessor;
|
||||
use Sylius\Component\Order\Model\OrderInterface;
|
||||
use Sylius\Component\Order\Processor\OrderProcessorInterface;
|
||||
|
||||
#[AsOrderProcessor(/*priority: 10*/)] //priority is optional
|
||||
final class OrderProcessorWithAttributeStub implements OrderProcessorInterface
|
||||
{
|
||||
public function process(OrderInterface $order): void
|
||||
{
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
1. Not passing `Sylius\Component\Core\Checker\ProductVariantLowestPriceDisplayCheckerInterface`
|
||||
to `Sylius\Component\Core\Calculator\ProductVariantPriceCalculator`
|
||||
as a first argument is deprecated.
|
||||
|
||||
1. Not passing an instance of `Symfony\Component\PropertyAccess\PropertyAccessorInterface`
|
||||
to `Sylius\Bundle\CoreBundle\Validator\Constraints\HasEnabledEntityValidator`
|
||||
as the second argument is deprecated.
|
||||
|
||||
1. Not passing an instance of `Sylius\Component\Core\Payment\Remover\OrderPaymentsRemoverInterface`
|
||||
and a collection of unprocessable order states to `Sylius\Component\Core\OrderProcessing\OrderPaymentProcessor`
|
||||
as the third and fourth arguments respectively is deprecated.
|
||||
|
||||
1. Not passing an instance of `Sylius\Component\Core\Distributor\ProportionalIntegerDistributorInterface`
|
||||
to `Sylius\Component\Core\Taxation\Applicator\OrderItemsTaxesApplicator` and to `Sylius\Component\Core\Taxation\Applicator\OrderItemUnitsTaxesApplicator`
|
||||
as the last argument is deprecated.
|
||||
|
||||
1. Class `\Sylius\Bundle\ShopBundle\Calculator\OrderItemsSubtotalCalculator` has been deprecated. Order items subtotal calculation
|
||||
is now available on the Order model `\Sylius\Component\Core\Model\Order::getItemsSubtotal`.
|
||||
|
||||
1. The way of getting variants prices based on options has been changed,
|
||||
as such the following services were deprecated, please use their new counterpart.
|
||||
* instead of `Sylius\Component\Core\Provider\ProductVariantsPricesProviderInterface` use `Sylius\Component\Core\Provider\ProductVariantMap\ProductVariantsMapProviderInterface`
|
||||
* instead of `Sylius\Component\Core\Provider\ProductVariantsPricesProvider` use `Sylius\Component\Core\Provider\ProductVariantMap\ProductVariantsPricesMapProvider`
|
||||
* instead of `Sylius\Bundle\CoreBundle\Templating\Helper\ProductVariantsPricesHelper` use `Sylius\Component\Core\Provider\ProductVariantMap\ProductVariantsPricesMapProvider`
|
||||
* instead of `Sylius\Bundle\CoreBundle\Twig\ProductVariantsPricesExtension` use `Sylius\Bundle\CoreBundle\Twig\ProductVariantsMapExtension`
|
||||
|
||||
Subsequently, the `sylius_product_variant_prices` twig function is deprecated, use `sylius_product_variants_map` instead.
|
||||
|
||||
To add more data per variant create a service implementing the `Sylius\Component\Core\Provider\ProductVariantMap\ProductVariantMapProviderInterface` and tag it with `sylius.product_variant_data_map_provider`.
|
||||
|
||||
1. Using Guzzle 6 has been deprecated in favor of Symfony HTTP Client. If you want to still use Guzzle 6 or Guzzle 7,
|
||||
you need to install `composer require php-http/guzzle6-adapter` or `composer require php-http/guzzle7-adapter`
|
||||
depending on your Guzzle version.
|
||||
Subsequently, you need to register the adapter as a `Psr\Http\Client\ClientInterface` service as the following:
|
||||
```yaml
|
||||
services:
|
||||
Psr\Http\Client\ClientInterface:
|
||||
class: Http\Adapter\Guzzle7\Client # for Guzzle 6 use Http\Adapter\Guzzle6\Client instead
|
||||
```
|
||||
|
||||
1. The constructor of `Sylius\Bundle\AdminBundle\Controller\NotificationController` has been changed:
|
||||
|
||||
```diff
|
||||
public function __construct(
|
||||
- private ClientInterface $client,
|
||||
- private MessageFactory $messageFactory,
|
||||
+ private ClientInterface|DeprecatedClientInterface $client,
|
||||
+ private RequestFactoryInterface|MessageFactory $requestFactory,
|
||||
private string $hubUri,
|
||||
private string $environment,
|
||||
+ private ?StreamFactoryInterface $streamFactory = null,
|
||||
) {
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
1. The `sylius.http_message_factory` service has been deprecated. Use `Psr\Http\Message\RequestFactoryInterface` instead.
|
||||
|
||||
1. The `sylius.http_client` has become an alias to `psr18.http_client` service.
|
||||
|
||||
1. The `sylius.payum.http_client` has become a service ID of newly created `Sylius\Bundle\PayumBundle\HttpClient\HttpClient`.
|
||||
|
||||
1. Validation translation key `sylius.review.rating.range` has been replaced by `sylius.review.rating.not_in_range` in all places used by Sylius. The `sylius.review.rating.range` has been left for backward compatibility and will be removed in Sylius 2.0.
|
||||
|
||||
1. The `payum/payum` package has been replaced by concrete packages like `payum/core`, `payum/offline` or `payum/paypal-express-checkout-nvp`. If you need any other component so far provided by `payum/payum` package, you need to install it explicitly.
|
||||
|
||||
1. PostgreSQL migration support has been introduced. If you are using PostgreSQL, we assume that you have already created a database schema in some way.
|
||||
All you need to do is run migrations, which will mark all migrations created before Sylius 1.13 as executed.
|
||||
|
||||
1. Not passing an `$entityManager` and passing a `$doctrineRegistry` to `Sylius\Bundle\CoreBundle\Installer\Provider\DatabaseSetupCommandsProvider` constructor is deprecated and will be prohibited in Sylius 2.0.
|
||||
|
||||
1. Product variants resolving has been refactored for better extendability.
|
||||
The tag `sylius.product_variant_resolver.default` has been removed as it was never used.
|
||||
|
||||
All internal usages of service `sylius.product_variant_resolver.default` have been switched to `Sylius\Component\Product\Resolver\ProductVariantResolverInterface`, if you have been using the
|
||||
`sylius.product_variant_resolver.default` service apply this change accordingly.
|
||||
|
||||
1. Due to optimizations of the Order's grid the `Sylius\Component\Core\Repository\OrderRepositoryInterface::createSearchListQueryBuilder` method bas been deprecated in both the interface and the class, and replaced by `Sylius\Component\Core\Repository\OrderRepositoryInterface::createCriteriaAwareSearchListQueryBuilder`.
|
||||
Also `Sylius\Component\Core\Repository\OrderRepositoryInterface::createByCustomerIdQueryBuilder` has been deprecated in both the interface and the class, and replaced by `Sylius\Component\Core\Repository\OrderRepositoryInterface::createByCustomerIdCriteriaAwareQueryBuilder` for the same reason. Both changes affect
|
||||
`sylius_admin_order` and `sylius_admin_customer_order` grids configuration.
|
||||
|
||||
1. We have explicitly added relationships between product and reviews and between product and attributes in XML mappings.
|
||||
Because of that, the subscribers `Sylius\Bundle\AttributeBundle\Doctrine\ORM\Subscriber\LoadMetadataSubscriber`
|
||||
and `Sylius\Bundle\ReviewBundle\Doctrine\ORM\Subscriber\LoadMetadataSubscriber` have changed so that it does not add
|
||||
a relationship if one already exists. If you have overwritten or decorated it, there may be a need to update it.
|
||||
|
||||
1. Passing an instance of `Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface` as the first argument
|
||||
to `Sylius\Bundle\AttributeBundle\Form\Type\AttributeType\Configuration\SelectAttributeChoicesCollectionType` has been deprecated.
|
||||
|
||||
1. The `sylius_admin_ajax_taxon_move` route has been deprecated. If you're relaying on it, consider migrating to new
|
||||
`sylius_admin_ajax_taxon_move_up` and `sylius_admin_ajax_taxon_move_down` routes.
|
||||
|
||||
1. Not passing a `$fileLocator` to `Sylius\Bundle\CoreBundle\Fixture\Factory\ProductExampleFactory` constructor is deprecated and will be prohibited in Sylius 2.0.
|
||||
|
||||
1. Interface `Sylius\Bundle\ShopBundle\Calculator\OrderItemsSubtotalCalculatorInterface` and class `Sylius\Bundle\ShopBundle\Twig\OrderItemsSubtotalExtension` responsible for the `sylius_order_items_subtotal` twig function have been deprecated and will be removed in Sylius 2.0.
|
||||
Use the `::getItemsSubtotal()` method from the `Order` class instead.
|
||||
|
||||
1. The `Sylius\Bundle\CoreBundle\Fixture\Factory\PaymentFixture` has been deprecated. Use `Sylius\Bundle\CoreBundle\Fixture\PaymentFixture` instead.
|
||||
|
||||
1. Not passing a `$router` to `Sylius\Bundle\AdminBundle\Controller\ImpersonateUserController` as the fourth argument is deprecated and will be prohibited in Sylius 2.0.
|
||||
|
||||
1. The `Sylius\Bundle\CoreBundle\Provider\SessionProvider` has been deprecated and will be removed in Sylius 2.0.
|
||||
|
||||
1. Interface `Sylius\Component\Core\Promotion\Updater\Rule\ProductAwareRuleUpdaterInterface` has been deprecated and will be removed in Sylius 2.0.
|
||||
|
||||
1. Both `getCreatedByGuest` and `setCreatedByGuest` methods were deprecated on `\Sylius\Component\Core\Model\OrderInterface`.
|
||||
Please use `isCreatedByGuest` instead of the first one. The latter is a part of the `setCustomerWithAuthorization` logic
|
||||
and should be used only this way.
|
||||
|
||||
1. The `Sylius\Bundle\ShippingBundle\Provider\Calendar` and `Sylius\Bundle\ShippingBundle\Provider\DateTimeProvider` have been deprecated and will be removed in Sylius 2.0. Use `Symfony\Component\Clock\Clock` instead. Note: this class is available since Symfony 6.2.
|
||||
|
||||
1. In the `sylius_payment` state machine of `PaymentBundle`, there has been a change in the state name:
|
||||
- State name change:
|
||||
- From: `void`
|
||||
- To: `unknown`
|
||||
|
||||
1. In the `sylius_payment` state machine of `PaymentBundle`, a new state `authorized` has been introduced, along with a new transition:
|
||||
- Transition `authorize`:
|
||||
- From states: [`new`, `processing`]
|
||||
- To state: `authorized`
|
||||
|
||||
Due to that the following transitions have been updated:
|
||||
- Transition `complete`:
|
||||
- From states: [`new`, `processing`, `authorized`]
|
||||
- To state: `completed`
|
||||
- Transition `fail`:
|
||||
- From states: [`new`, `processing`, `authorized`]
|
||||
- To state: `failed`
|
||||
- Transition `cancel`:
|
||||
- From states: [`new`, `processing`, `authorized`]
|
||||
- To state: `cancelled`
|
||||
- Transition `void`:
|
||||
- From states: [`new`, `processing`, `authorized`]
|
||||
- To state: `unknown`
|
||||
|
||||
1. The `sylius_payment` state machine of `CoreBundle` has been updated to allow failing an authorized payment:
|
||||
```diff
|
||||
fail:
|
||||
- from: [new, processing]
|
||||
+ from: [new, processing, authorized]
|
||||
to: failed
|
||||
```
|
||||
|
||||
1. Change in the `Sylius\Bundle\CoreBundle\Fixture\Factory\PromotionExampleFactory` constructor:
|
||||
Added the `$localeRepository` argument to the constructor of the `PromotionExampleFactory` class. Not passing an instance of `RepositoryInterface` for the `locale` entity repository in `$localeRepository` was marked as deprecated and will be prohibited in Sylius 2.0.
|
||||
|
||||
1. The `Regex` constraint has been removed from `Sylius\Component\Addressing\Model\Country` in favour of the `Country` constraint.
|
||||
Due to that, it's translation message `sylius.country.code.regex` was also removed.
|
||||
|
||||
1. The `redirectToCartSummary` protected method of `Sylius\Bundle\OrderBundle\Controller\OrderController` has been deprecated as it was never used and will be removed in Sylius 2.0.
|
||||
|
||||
1. Interface `Sylius\Component\Promotion\Generator\PromotionCouponGeneratorInstructionInterface` has been refactored and is now deprecated. It now extends a new interface `Sylius\Component\Promotion\Generator\PromotionCouponGeneratorInstructionReadInterface`, which contains only getter methods.
|
||||
- If your services or custom implementations previously relied on `PromotionCouponGeneratorInstructionInterface` for read operations, you should now use `PromotionCouponGeneratorInstructionReadInterface` for better clarity and separation of concerns.
|
||||
- This change is backward compatible as long as your implementations or services were using only the getter methods from `PromotionCouponGeneratorInstructionInterface`. However, if you also utilized setter methods, you should continue using `PromotionCouponGeneratorInstructionInterface`.
|
||||
|
||||
1. A new parameter has been added to specify the validation groups for a given promotion action.
|
||||
If you have any custom validation groups for your promotion action, you need to add them to your `config/packages/_sylius.yaml` file.
|
||||
Additionally, if you have your own promotion action and want to add your validation groups, you can add another key to the `promotion_action.validation_groups` parameter.
|
||||
This is handled by `Sylius\Bundle\PromotionBundle\Validator\PromotionActionGroupValidator` and it resolves the groups based on the type of the passed promotion action.
|
||||
|
||||
```yaml
|
||||
sylius_promotion:
|
||||
promotion_action:
|
||||
validation_groups:
|
||||
order_percentage_discount:
|
||||
- 'sylius'
|
||||
- 'sylius_promotion_action_order_percentage_discount'
|
||||
shipping_percentage_discount:
|
||||
- 'sylius'
|
||||
- 'sylius_promotion_action_shipping_percentage_discount'
|
||||
your_promotion_action:
|
||||
- 'sylius'
|
||||
- 'your_custom_validation_group'
|
||||
```
|
||||
Along with this update, constraints have been removed from specific action form types. The affected form types include:
|
||||
- `Sylius\Bundle\PromotionBundle\Form\Type\Action\FixedDiscountConfigurationType`
|
||||
- `Sylius\Bundle\PromotionBundle\Form\Type\Action\PercentageDiscountConfigurationType`
|
||||
- `Sylius\Bundle\PromotionBundle\Form\Type\Action\UnitFixedDiscountConfigurationType`
|
||||
- `Sylius\Bundle\PromotionBundle\Form\Type\Action\UnitPercentageDiscountConfigurationType`
|
||||
|
||||
The constraints previously defined in these forms are now in `src/Sylius/Bundle/CoreBundle/Resources/config/validation/PromotionAction.xml` and managed via the new validation groups parameters in the configuration.
|
||||
|
||||
1. A new parameter has been added to specify the validation groups for a given promotion rule.
|
||||
If you have any custom validation groups for your promotion rule, you need to add them to your `config/packages/_sylius.yaml` file.
|
||||
Additionally, if you have your own promotion rule and want to add your validation groups, you can add another key to the `promotion_rule.validation_groups` parameter.
|
||||
This is handled by `Sylius\Bundle\PromotionBundle\Validator\PromotionRuleGroupValidator` and it resolves the groups based on the type of the passed promotion rule.
|
||||
|
||||
```yaml
|
||||
sylius_promotion:
|
||||
promotion_rule:
|
||||
validation_groups:
|
||||
cart_quantity:
|
||||
- 'sylius'
|
||||
- 'sylius_promotion_rule_cart_quantity'
|
||||
customer_group:
|
||||
- 'sylius'
|
||||
- 'sylius_promotion_rule_customer_group'
|
||||
your_promotion_rule:
|
||||
- 'sylius'
|
||||
- 'your_custom_validation_group'
|
||||
```
|
||||
Along with this update, constraints have been removed from specific rule form types. The affected form types include:
|
||||
- `Sylius\Bundle\CoreBundle\Form\Type\Promotion\Rule\ContainsProductConfigurationType`
|
||||
- `Sylius\Bundle\CoreBundle\Form\Type\Promotion\Rule\NthOrderConfigurationType`
|
||||
- `Sylius\Bundle\PromotionBundle\Form\Type\Rule\CartQuantityConfigurationType`
|
||||
- `Sylius\Bundle\PromotionBundle\Form\Type\Rule\ItemTotalConfigurationType`
|
||||
|
||||
The constraints previously defined in these forms are now in `src/Sylius/Bundle/CoreBundle/Resources/config/validation/PromotionRule.xml` and managed via the new validation groups parameters in the configuration.
|
||||
130
UPGRADE-API-1.13.md
Normal file
130
UPGRADE-API-1.13.md
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
# UPGRADE FROM `v1.12.x` TO `v1.13.0`
|
||||
|
||||
1. The constructor of `Sylius\Bundle\ApiBundle\Serializer\ChannelDenormalizer` has been changed:
|
||||
|
||||
```diff
|
||||
public function __construct(
|
||||
private FactoryInterface $channelPriceHistoryConfigFactory,
|
||||
+ private FactoryInterface $shopBillingDataFactory
|
||||
) {
|
||||
}
|
||||
```
|
||||
|
||||
1. The constructor of `Sylius\Bundle\ApiBundle\EventSubscriber\TaxonDeletionEventSubscriber` has changed:
|
||||
|
||||
````diff
|
||||
public function __construct(
|
||||
private ChannelRepositoryInterface $channelRepository,
|
||||
+ private TaxonInPromotionRuleCheckerInterface $taxonInPromotionRuleChecker,
|
||||
) {
|
||||
}
|
||||
````
|
||||
|
||||
1. The signature of constructor of `Sylius\Bundle\ApiBundle\Command\Cart\ChangeItemQuantityInCart` command changed:
|
||||
|
||||
````diff
|
||||
public function __construct(
|
||||
- public int $quantity,
|
||||
+ public ?int $quantity,
|
||||
) {
|
||||
}
|
||||
````
|
||||
|
||||
1. The constructor signature of `Sylius\Bundle\ApiBundle\Command\Cart\AddItemToCart` changed:
|
||||
|
||||
````diff
|
||||
public function __construct(
|
||||
- public string $productCode,
|
||||
+ public ?string $productCode,
|
||||
- public int $quantity,
|
||||
+ public ?int $quantity,
|
||||
) {
|
||||
}
|
||||
````
|
||||
|
||||
1. The constructor signature of `Sylius\Bundle\ApiBundle\Command\Catalog\AddProductReview` changed:
|
||||
|
||||
````diff
|
||||
public function __construct(
|
||||
public ?string $title,
|
||||
public ?int $rating,
|
||||
public ?string $comment,
|
||||
- public string $productCode,
|
||||
+ public ?string $productCode,
|
||||
public ?string $email = null,
|
||||
) {
|
||||
}
|
||||
````
|
||||
|
||||
1. The constructor signature of `Sylius\Bundle\ApiBundle\Command\Account\VerifyCustomerAccount` changed:
|
||||
|
||||
````diff
|
||||
public function __construct(
|
||||
- public $token,
|
||||
+ public string $token,
|
||||
+ public ?string $channelCode = null,
|
||||
+ public ?string $localeCode = null,
|
||||
) {
|
||||
}
|
||||
````
|
||||
|
||||
1. The item operation paths for ProductVariantTranslation resource changed:
|
||||
|
||||
- `GET /admin/product-variant-translation/{id}` -> `GET /admin/product-variant-translations/{id}`
|
||||
- `GET /shop/product-variant-translation/{id}` -> `GET /shop/product-variant-translations/{id}`
|
||||
|
||||
1. Typo in the constraint validator's alias returned by `Sylius\Bundle\ApiBundle\Validator\Constraints\ChangedItemQuantityInCartValidator::validatedBy` has been fixed.
|
||||
Previously it was `sylius_api_validator_changed_item_guantity_in_cart` and now it is `sylius_api_validator_changed_item_quantity_in_cart`.
|
||||
|
||||
1. The `ApiPlatform\Core\Bridge\Symfony\Bundle\Action\SwaggerUiAction` controller has been removed.
|
||||
Therefore, the `api_platform.swagger.action.ui` service ID points to the API Platform's `SwaggerUiAction` controller.
|
||||
|
||||
1. The following services have been removed:
|
||||
* `Sylius\Bundle\ApiBundle\Swagger\AdminAuthenticationTokenDocumentationNormalizer`
|
||||
* `Sylius\Bundle\ApiBundle\Swagger\ShopAuthenticationTokenDocumentationNormalizer`
|
||||
* `Sylius\Bundle\ApiBundle\Swagger\ProductDocumentationNormalizer`
|
||||
* `Sylius\Bundle\ApiBundle\Swagger\ProductImageDocumentationNormalizer`
|
||||
* `Sylius\Bundle\ApiBundle\Swagger\ProductSlugDocumentationNormalizer`
|
||||
* `Sylius\Bundle\ApiBundle\Swagger\ProductVariantDocumentationNormalizer`
|
||||
* `Sylius\Bundle\ApiBundle\Swagger\ShippingMethodDocumentationNormalizer`
|
||||
* `Sylius\Bundle\ApiBundle\Swagger\PathHiderDocumentationNormalizer`
|
||||
* `Sylius\Bundle\ApiBundle\Swagger\AcceptLanguageHeaderDocumentationNormalizer`
|
||||
|
||||
Responsibility of these services has been moved to the corresponding services tagged with `sylius.open_api.modifier`:
|
||||
* `Sylius\Bundle\ApiBundle\OpenApi\Documentation\AdminAuthenticationTokenDocumentationModifier`
|
||||
* `Sylius\Bundle\ApiBundle\OpenApi\Documentation\ShopAuthenticationTokenDocumentationModifier`
|
||||
* `Sylius\Bundle\ApiBundle\OpenApi\Documentation\ProductDocumentationModifier`
|
||||
* `Sylius\Bundle\ApiBundle\OpenApi\Documentation\ProductImageDocumentationModifier`
|
||||
* `Sylius\Bundle\ApiBundle\OpenApi\Documentation\ProductSlugDocumentationModifier`
|
||||
* `Sylius\Bundle\ApiBundle\OpenApi\Documentation\ProductVariantDocumentationModifier`
|
||||
* `Sylius\Bundle\ApiBundle\OpenApi\Documentation\ShippingMethodDocumentationModifier`
|
||||
* `Sylius\Bundle\ApiBundle\OpenApi\Documentation\PathHiderDocumentationModifier`
|
||||
* `Sylius\Bundle\ApiBundle\OpenApi\Documentation\AcceptLanguageHeaderDocumentationModifier`
|
||||
|
||||
1. All usages of `ApiPlatform\Core\Api\IriConverterInterface` have been switched to its non-deprecated counterpart `ApiPlatform\Api\IriConverterInterface`.
|
||||
Due to that, the constructor and usage in the following classes have been changed accordingly:
|
||||
* `Sylius\Bundle\ApiBundle\Controller\GetProductBySlugAction`
|
||||
* `Sylius\Bundle\ApiBundle\Controller\UploadAvatarImageAction`
|
||||
* `Sylius\Bundle\ApiBundle\EventListener\AdminAuthenticationSuccessListener`
|
||||
* `Sylius\Bundle\ApiBundle\EventListener\AuthenticationSuccessListener`
|
||||
* `Sylius\Bundle\ApiBundle\Filter\Doctrine\CatalogPromotionChannelFilter`
|
||||
* `Sylius\Bundle\ApiBundle\Filter\Doctrine\ProductVariantCatalogPromotionFilter`
|
||||
* `Sylius\Bundle\ApiBundle\Filter\Doctrine\ProductVariantOptionValueFilter`
|
||||
* `Sylius\Bundle\ApiBundle\Filter\Doctrine\ProductVariantOptionValueFilter`
|
||||
* `Sylius\Bundle\ApiBundle\Filter\Doctrine\TaxonFilter`
|
||||
* `Sylius\Bundle\ApiBundle\Serializer\ChannelPriceHistoryConfigDenormalizer`
|
||||
* `Sylius\Bundle\ApiBundle\Serializer\ProductNormalizer`
|
||||
* `Sylius\Bundle\ApiBundle\Serializer\ProductVariantNormalizer`
|
||||
* `Sylius\Bundle\ApiBundle\Serializer\ZoneDenormalizer`
|
||||
|
||||
1. The `Sylius\Bundle\ApiBundle\Filter\Doctrine\CatalogPromotionChannelFilter` service and class has been renamed to `Sylius\Bundle\ApiBundle\Filter\Doctrine\ChannelsAwareChannelFilter`.
|
||||
|
||||
1. The `sylius.api.product_taxon_filter` filter has been removed and its functionality has been superseded by the `sylius.api.search_filter.taxon.code` filter. The usage stays the same.
|
||||
|
||||
1. Update in Translations Handling
|
||||
|
||||
The process for creating or updating translations via the API has been refined. Now, the locale for each translation
|
||||
is determined directly from its key, making the explicit transmission of the `locale` field redundant. Although the API
|
||||
continues to support the explicit sending of the `locale` field, it is essential that this explicitly sent locale matches
|
||||
the key in the translation array. In cases of a mismatch between the key and an explicitly sent locale, the API will
|
||||
respond with a `Sylius\Bundle\ApiBundle\Exception\TranslationLocaleMismatchException`.
|
||||
156
UPGRADE-FROM-1.12-WITH-PRICE-HISTORY-PLUGIN-TO-1.13-LEGACY.md
Normal file
156
UPGRADE-FROM-1.12-WITH-PRICE-HISTORY-PLUGIN-TO-1.13-LEGACY.md
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
⚙️ Upgrade from Sylius 1.12 with PriceHistoryPlugin to Sylius 1.13
|
||||
==================================================================
|
||||
|
||||
We encourage you to use the upgrade instructions based on Rector as it is more convenient and faster to accomplish.
|
||||
The rector installation guide is available [here](UPGRADE-FROM-1.12-WITH-PRICE-HISTORY-PLUGIN-TO-1.13.md).
|
||||
|
||||
Legacy upgrade
|
||||
--------------
|
||||
|
||||
1. Remove the PriceHistoryPlugin from composer.json by running:
|
||||
|
||||
```bash
|
||||
|
||||
composer remove sylius/price-history-plugin --no-scripts
|
||||
|
||||
```
|
||||
|
||||
1. Make sure to remove the following config from your `config/packages/sylius_price_history_plugin.yaml` file:
|
||||
|
||||
```diff
|
||||
|
||||
- - { resource: "@SyliusPriceHistoryPlugin/config/config.yaml" }
|
||||
|
||||
```
|
||||
|
||||
And the route from your `config/routes/sylius_price_history_plugin.yaml`:
|
||||
|
||||
```diff
|
||||
|
||||
- sylius_price_history_admin:
|
||||
- resource: '@SyliusPriceHistoryPlugin/config/admin_routing.yaml'
|
||||
- prefix: '/%sylius_admin.path_name%'
|
||||
|
||||
```
|
||||
|
||||
And also remove the plugin from your `packages/bundles.php` file:
|
||||
|
||||
```diff
|
||||
|
||||
- Sylius\PriceHistoryPlugin\SyliusPriceHistoryPlugin::class => ['all' => true],
|
||||
|
||||
```
|
||||
|
||||
1. Update the `Channel` entity to use interface from `Core`:
|
||||
|
||||
```diff
|
||||
|
||||
- use Sylius\PriceHistoryPlugin\Domain\Model\ChannelInterface;
|
||||
+ use Sylius\Component\Core\Model\ChannelInterface;
|
||||
|
||||
```
|
||||
|
||||
Then remove the trait:
|
||||
|
||||
```diff
|
||||
|
||||
- use ChannelPriceHistoryConfigAwareTrait;
|
||||
|
||||
```
|
||||
|
||||
1. Update the `ChannelPricing` entity to use interface from `Core`:
|
||||
|
||||
```diff
|
||||
|
||||
- use Sylius\PriceHistoryPlugin\Domain\Model\ChannelPricingInterface;
|
||||
+ use Sylius\Component\Core\Model\ChannelPricingInterface;
|
||||
|
||||
```
|
||||
Then remove the trait:
|
||||
|
||||
```diff
|
||||
|
||||
- use LowestPriceBeforeDiscountAwareTrait;
|
||||
|
||||
```
|
||||
|
||||
1. Update your resources configuration for `ChannelPricingLogEntry` and `ChannelPriceHistoryConfig` if you have changed them in your project:
|
||||
|
||||
```diff
|
||||
|
||||
- sylius_price_history:
|
||||
- batch_size: 100
|
||||
+ sylius_core:
|
||||
+ price_history:
|
||||
+ batch_size: 100
|
||||
resources:
|
||||
channel_price_history_config:
|
||||
classes:
|
||||
model: App\Entity\ChannelPriceHistoryConfig
|
||||
...
|
||||
channel_pricing_log_entry:
|
||||
classes:
|
||||
model: App\Entity\ChannelPricingLogEntry
|
||||
...
|
||||
|
||||
```
|
||||
|
||||
1. The class `Sylius\PriceHistoryPlugin\Infrastructure\EventSubscriber\ChannelPricingLogEntryEventSubscriber` has been replaced by `Sylius\Bundle\CoreBundle\PriceHistory\EventListener\ChannelPricingLogEntryEventListener`.
|
||||
|
||||
1. Change namespaces from the plugin to correct ones:
|
||||
|
||||
```
|
||||
|
||||
Sylius\PriceHistoryPlugin\Application\Checker\ProductVariantLowestPriceDisplayChecker => Sylius\Component\Core\Checker\ProductVariantLowestPriceDisplayChecker
|
||||
Sylius\PriceHistoryPlugin\Application\Checker\ProductVariantLowestPriceDisplayCheckerInterface => Sylius\Component\Core\Checker\ProductVariantLowestPriceDisplayCheckerInterface
|
||||
Sylius\PriceHistoryPlugin\Application\Command\ApplyLowestPriceOnChannelPricings => Sylius\Bundle\CoreBundle\PriceHistory\Command\ApplyLowestPriceOnChannelPricings
|
||||
Sylius\PriceHistoryPlugin\Application\CommandDispatcher\BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher => Sylius\Bundle\CoreBundle\PriceHistory\CommandDispatcher\BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher
|
||||
Sylius\PriceHistoryPlugin\Application\CommandDispatcher\ApplyLowestPriceOnChannelPricingsCommandDispatcherInterface => Sylius\Bundle\CoreBundle\PriceHistory\CommandDispatcher\ApplyLowestPriceOnChannelPricingsCommandDispatcherInterface
|
||||
Sylius\PriceHistoryPlugin\Application\CommandHandler\ApplyLowestPriceOnChannelPricingsHandler => Sylius\Bundle\CoreBundle\PriceHistory\CommandHandler\ApplyLowestPriceOnChannelPricingsHandler
|
||||
Sylius\PriceHistoryPlugin\Application\Logger\PriceChangeLogger => Sylius\Bundle\CoreBundle\PriceHistory\Logger\PriceChangeLogger
|
||||
Sylius\PriceHistoryPlugin\Application\Logger\PriceChangeLoggerInterface => Sylius\Bundle\CoreBundle\PriceHistory\Logger\PriceChangeLoggerInterface
|
||||
Sylius\PriceHistoryPlugin\Application\Processor\ProductLowestPriceBeforeDiscountProcessor => Sylius\Bundle\CoreBundle\PriceHistory\Processor\ProductLowestPriceBeforeDiscountProcessor
|
||||
Sylius\PriceHistoryPlugin\Application\Processor\ProductLowestPriceBeforeDiscountProcessorInterface => Sylius\Bundle\CoreBundle\PriceHistory\Processor\ProductLowestPriceBeforeDiscountProcessorInterface
|
||||
Sylius\PriceHistoryPlugin\Application\Remover\ChannelPricingLogEntriesRemoverInterface => Sylius\Bundle\CoreBundle\PriceHistory\Remover\ChannelPricingLogEntriesRemoverInterface
|
||||
Sylius\PriceHistoryPlugin\Application\Templating\Helper\PriceHelper => Sylius\Bundle\CoreBundle\Templating\Helper\PriceHelper
|
||||
Sylius\PriceHistoryPlugin\Application\Validator\ResourceInputDataPropertiesValidatorInterface => Sylius\Bundle\ApiBundle\Validator\ResourceInputDataPropertiesValidatorInterface
|
||||
Sylius\PriceHistoryPlugin\Domain\Factory\ChannelFactory => Sylius\Component\Core\Factory\ChannelFactory
|
||||
Sylius\PriceHistoryPlugin\Domain\Factory\ChannelPricingLogEntryFactory => Sylius\Component\Core\Factory\ChannelPricingLogEntryFactory
|
||||
Sylius\PriceHistoryPlugin\Domain\Factory\ChannelPricingLogEntryFactoryInterface => Sylius\Component\Core\Factory\ChannelPricingLogEntryFactoryInterface
|
||||
Sylius\PriceHistoryPlugin\Domain\Model\ChannelInterface => Sylius\Component\Core\Model\ChannelInterface
|
||||
Sylius\PriceHistoryPlugin\Domain\Model\ChannelPriceHistoryConfig => Sylius\Component\Core\Model\ChannelPriceHistoryConfig
|
||||
Sylius\PriceHistoryPlugin\Domain\Model\ChannelPricingLogEntry => Sylius\Component\Core\Model\ChannelPricingLogEntry
|
||||
Sylius\PriceHistoryPlugin\Domain\Model\ChannelPriceHistoryConfigInterface => Sylius\Component\Core\Model\ChannelPriceHistoryConfigInterface
|
||||
Sylius\PriceHistoryPlugin\Domain\Model\ChannelPricingInterface => Sylius\Component\Core\Model\ChannelPricingInterface
|
||||
Sylius\PriceHistoryPlugin\Domain\Model\ChannelPricingLogEntryInterface => Sylius\Component\Core\Model\ChannelPricingLogEntryInterface
|
||||
Sylius\PriceHistoryPlugin\Domain\Model\LowestPriceBeforeDiscountAwareInterface => Sylius\Component\Core\Model\ChannelPricingInterface
|
||||
Sylius\PriceHistoryPlugin\Domain\Repository\ChannelPricingLogEntryRepositoryInterface => Sylius\Component\Core\Repository\ChannelPricingLogEntryRepositoryInterface
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Cli\Command\ClearPriceHistoryCommand => Sylius\Bundle\CoreBundle\PriceHistory\Cli\Command\ClearPriceHistoryCommand
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Doctrine\ORM\ChannelPricingLogEntryRepository => Sylius\Component\Core\Repository\ChannelPricingLogEntryRepository
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Doctrine\ORM\ChannelPricingLogEntryRepositoryInterface => Sylius\Component\Core\Repository\ChannelPricingLogEntryRepositoryInterface
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\EntityObserver\CreateLogEntryOnPriceChangeObserver => Sylius\Bundle\CoreBundle\PriceHistory\EntityObserver\CreateLogEntryOnPriceChangeObserver
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\EntityObserver\EntityObserverInterface => Sylius\Bundle\CoreBundle\PriceHistory\EntityObserver\EntityObserverInterface
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\EntityObserver\ProcessLowestPricesOnChannelChangeObserver => Sylius\Bundle\CoreBundle\PriceHistory\EntityObserver\ProcessLowestPricesOnChannelChangeObserver
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\EntityObserver\ProcessLowestPricesOnChannelPriceHistoryConfigChangeObserver => Sylius\Bundle\CoreBundle\PriceHistory\EntityObserver\ProcessLowestPricesOnChannelPriceHistoryConfigChangeObserver
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Event\OldChannelPricingLogEntriesEvents => Sylius\Bundle\CoreBundle\PriceHistory\Event\OldChannelPricingLogEntriesEvents
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\EventListener\OnFlushEntityObserverListener => Sylius\Bundle\CoreBundle\PriceHistory\EventListener\OnFlushEntityObserverListener
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\EventSubscriber\ChannelPricingLogEntryEventSubscriber => Sylius\Bundle\CoreBundle\PriceHistory\EventListener\ChannelPricingLogEntryEventListener
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Form\Extension\ChannelTypeExtension => Sylius\Bundle\CoreBundle\Form\Extension\ChannelTypeExtension
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Form\Type\ChannelPriceHistoryConfigType => Sylius\Bundle\CoreBundle\Form\Type\ChannelPriceHistoryConfigType
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Provider\ProductVariantsPricesProvider => Sylius\Component\Core\Provider\ProductVariantsPricesProvider
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Remover\ChannelPricingLogEntriesRemover' => 'Sylius\Bundle\CoreBundle\PriceHistory\Remover\ChannelPricingLogEntriesRemover'
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Serializer\ChannelDenormalizer => Sylius\Bundle\ApiBundle\Serializer\ChannelDenormalizer
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Serializer\ChannelPriceHistoryConfigDenormalizer => Sylius\Bundle\ApiBundle\Serializer\ChannelPriceHistoryConfigDenormalizer
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Serializer\ProductVariantNormalizer => Sylius\Bundle\ApiBundle\Serializer\ProductVariantNormalizer
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Twig\PriceExtension => Sylius\Bundle\CoreBundle\Twig\PriceExtension
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Twig\SyliusVersionExtension => Sylius\Bundle\CoreBundle\Twig\SyliusVersionExtension
|
||||
Sylius\PriceHistoryPlugin\Infrastructure\Validator\ResourceApiInputDataPropertiesValidator => Sylius\Bundle\ApiBundle\Validator\ResourceApiInputDataPropertiesValidator
|
||||
|
||||
```
|
||||
|
||||
1. The `Sylius\PriceHistoryPlugin\Application\Calculator\ProductVariantLowestPriceCalculator` class along with its interface has been removed.
|
||||
If you have used it in your project, you should also remove it from your code.
|
||||
|
||||
Use `Sylius\Component\Core\Calculator\ProductVariantPriceCalculator` instead, as it has been extended with the `calculateLowestPrice` method.
|
||||
|
||||
1. Go through the rest of the [Sylius 1.13 upgrade file](UPGRADE-1.13.md).
|
||||
86
UPGRADE-FROM-1.12-WITH-PRICE-HISTORY-PLUGIN-TO-1.13.md
Normal file
86
UPGRADE-FROM-1.12-WITH-PRICE-HISTORY-PLUGIN-TO-1.13.md
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
⚙️ Upgrade from Sylius 1.12 with PriceHistoryPlugin to Sylius 1.13
|
||||
==================================================================
|
||||
|
||||
We encourage you to use the upgrade instructions based on Rector as it is more convenient and faster to accomplish.
|
||||
The legacy installation guide is available [here](UPGRADE-FROM-1.12-WITH-PRICE-HISTORY-PLUGIN-TO-1.13-LEGACY.md).
|
||||
|
||||
Upgrade with Rector
|
||||
-------------------
|
||||
|
||||
1. Remove the PriceHistoryPlugin from composer.json by running:
|
||||
|
||||
```bash
|
||||
|
||||
composer remove sylius/price-history-plugin --no-scripts
|
||||
|
||||
```
|
||||
|
||||
1. Update your `<project_root>/rector.php` file:
|
||||
|
||||
```diff
|
||||
|
||||
+ use Sylius\SyliusRector\Set\SyliusPriceHistory;
|
||||
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
// ...
|
||||
- $rectorConfig->sets([SyliusPriceHistory::PRICE_HISTORY_PLUGIN])
|
||||
+ $rectorConfig->sets([SyliusPriceHistory::UPGRADE_SYLIUS_1_12_WITH_PRICE_HISTORY_PLUGIN_TO_SYLIUS_1_13]);
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
1. Run:
|
||||
|
||||
```bash
|
||||
|
||||
vendor/bin/rector
|
||||
|
||||
```
|
||||
|
||||
1. Make sure to remove the following config from your `config/packages/sylius_price_history_plugin.yaml` file:
|
||||
|
||||
```diff
|
||||
|
||||
- - { resource: "@SyliusPriceHistoryPlugin/config/config.yaml" }
|
||||
|
||||
```
|
||||
|
||||
And also the route from your `config/routes/sylius_price_history_plugin.yaml`:
|
||||
|
||||
```diff
|
||||
|
||||
- sylius_price_history_admin:
|
||||
- resource: '@SyliusPriceHistoryPlugin/config/admin_routing.yaml'
|
||||
- prefix: '/%sylius_admin.path_name%'
|
||||
|
||||
```
|
||||
|
||||
1. Update your resources configuration for `ChannelPricingLogEntry` and `ChannelPriceHistoryConfig` if you have changed them in your project:
|
||||
|
||||
```diff
|
||||
|
||||
- sylius_price_history:
|
||||
- batch_size: 100
|
||||
+ sylius_core:
|
||||
+ price_history:
|
||||
+ batch_size: 100
|
||||
resources:
|
||||
channel_price_history_config:
|
||||
classes:
|
||||
model: App\Entity\ChannelPriceHistoryConfig
|
||||
...
|
||||
channel_pricing_log_entry:
|
||||
classes:
|
||||
model: App\Entity\ChannelPricingLogEntry
|
||||
...
|
||||
|
||||
```
|
||||
|
||||
1. The class `Sylius\PriceHistoryPlugin\Infrastructure\EventSubscriber\ChannelPricingLogEntryEventSubscriber` has been replaced by `Sylius\Bundle\CoreBundle\PriceHistory\EventListener\ChannelPricingLogEntryEventListener`.
|
||||
|
||||
1. The `Sylius\PriceHistoryPlugin\Application\Calculator\ProductVariantLowestPriceCalculator` class along with its interface has been removed.
|
||||
If you have used it in your project, you should also remove it from your code.
|
||||
|
||||
Use `Sylius\Component\Core\Calculator\ProductVariantPriceCalculator` instead, as it has been extended with the `calculateLowestPrice` method.
|
||||
|
||||
1. Go through the rest of the [Sylius 1.13 upgrade file](UPGRADE-1.13.md).
|
||||
|
|
@ -15,6 +15,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
@trigger_error('The "TestAppKernel" class located at "app/TestAppKernel.php" is deprecated since Sylius 1.3. Use "Kernel" class located at "src/Kernel.php" instead.', \E_USER_DEPRECATED);
|
||||
trigger_deprecation(
|
||||
'sylius/sylius',
|
||||
'1.3',
|
||||
'The "TestAppKernel" class located at "app/TestAppKernel.php" is deprecated. Use "Kernel" class located at "src/Kernel.php" instead.',
|
||||
);
|
||||
|
||||
class_alias(Kernel::class, TestAppKernel::class);
|
||||
|
|
|
|||
|
|
@ -15,4 +15,8 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
@trigger_error('Importing files from Sylius/Sylius\'s "app/config" directory is deprecated since Sylius 1.3.', \E_USER_DEPRECATED);
|
||||
trigger_deprecation(
|
||||
'sylius/sylius',
|
||||
'1.3',
|
||||
'Importing files from Sylius/Sylius\'s "app/config" directory is deprecated.',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ declare(strict_types=1);
|
|||
|
||||
use Symfony\Component\Routing\RouteCollection;
|
||||
|
||||
@trigger_error('Importing files from Sylius/Sylius\'s "app/config" directory is deprecated since Sylius 1.3.', \E_USER_DEPRECATED);
|
||||
trigger_deprecation(
|
||||
'sylius/sylius',
|
||||
'1.3',
|
||||
'Importing files from Sylius/Sylius\'s "app/config" directory is deprecated.',
|
||||
);
|
||||
|
||||
return new RouteCollection();
|
||||
|
|
|
|||
|
|
@ -23,13 +23,44 @@
|
|||
"Behat\\Testwork\\Tester\\Setup\\Teardown",
|
||||
"Doctrine\\DBAL\\Platforms\\MySqlPlatform",
|
||||
"Doctrine\\DBAL\\Platforms\\MySQLPlatform",
|
||||
"Http\\Client\\HttpClient",
|
||||
"HWI\\Bundle\\OAuthBundle\\Connect\\AccountConnectorInterface",
|
||||
"HWI\\Bundle\\OAuthBundle\\OAuth\\Response\\UserResponseInterface",
|
||||
"HWI\\Bundle\\OAuthBundle\\Security\\Core\\User\\OAuthAwareUserProviderInterface",
|
||||
"League\\Flysystem\\FilesystemOperator",
|
||||
"Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface",
|
||||
"Payum\\Core\\Action\\ActionInterface",
|
||||
"Payum\\Core\\Action\\GatewayAwareAction",
|
||||
"Payum\\Core\\Bridge\\Spl\\ArrayObject",
|
||||
"Payum\\Core\\Exception\\RequestNotSupportedException",
|
||||
"Payum\\Core\\Extension\\Context",
|
||||
"Payum\\Core\\Extension\\ExtensionInterface",
|
||||
"Payum\\Core\\HttpClientInterface",
|
||||
"Payum\\Core\\Model\\GatewayConfig",
|
||||
"Payum\\Core\\Model\\GatewayConfigInterface",
|
||||
"Payum\\Core\\Model\\Identity",
|
||||
"Payum\\Core\\Model\\Payment",
|
||||
"Payum\\Core\\Model\\PaymentInterface",
|
||||
"Payum\\Core\\Payum",
|
||||
"Payum\\Core\\Request\\Authorize",
|
||||
"Payum\\Core\\Request\\BaseGetStatus",
|
||||
"Payum\\Core\\Request\\Capture",
|
||||
"Payum\\Core\\Request\\Convert",
|
||||
"Payum\\Core\\Request\\Generic",
|
||||
"Payum\\Core\\Request\\GetStatusInterface",
|
||||
"Payum\\Core\\Request\\Notify",
|
||||
"Payum\\Core\\Security\\CryptedInterface",
|
||||
"Payum\\Core\\Security\\GenericTokenFactoryInterface",
|
||||
"Payum\\Core\\Security\\HttpRequestVerifierInterface",
|
||||
"Payum\\Core\\Security\\TokenInterface",
|
||||
"Payum\\Core\\Security\\Util\\Random",
|
||||
"Payum\\Core\\Storage\\AbstractStorage",
|
||||
"Payum\\Paypal\\ExpressCheckout\\Nvp\\PaypalExpressCheckoutGatewayFactory",
|
||||
"Payum\\Stripe\\StripeCheckoutGatewayFactory",
|
||||
"PHPUnit\\Framework\\ExpectationFailedException",
|
||||
"Stripe\\Stripe"
|
||||
"Psr\\Container\\ContainerInterface",
|
||||
"Psr\\Http\\Message\\RequestFactoryInterface",
|
||||
"Psr\\Http\\Message\\StreamFactoryInterface",
|
||||
"Symfony\\Component\\Security\\Core\\Encoder\\EncoderFactoryInterface"
|
||||
],
|
||||
"php-core-extensions" : [
|
||||
"Core",
|
||||
|
|
|
|||
135
composer.json
135
composer.json
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "sylius/sylius",
|
||||
"type": "library",
|
||||
"version": "v1.12.14-dev",
|
||||
"version": "v1.13.0-dev",
|
||||
"description": "E-Commerce platform for PHP, based on Symfony framework.",
|
||||
"homepage": "https://sylius.com",
|
||||
"license": "MIT",
|
||||
|
|
@ -29,28 +29,29 @@
|
|||
"ext-hash": "*",
|
||||
"ext-intl": "*",
|
||||
"ext-json": "*",
|
||||
"api-platform/core": "^2.6",
|
||||
"ext-simplexml": "*",
|
||||
"api-platform/core": "^2.7.10",
|
||||
"babdev/pagerfanta-bundle": "^3.0",
|
||||
"behat/transliterator": "^1.3",
|
||||
"doctrine/collections": "^1.6",
|
||||
"doctrine/common": "^3.2",
|
||||
"doctrine/dbal": "^2.7 || ^3.0",
|
||||
"doctrine/doctrine-bundle": "^1.12 || ^2.0",
|
||||
"doctrine/dbal": "^3.0",
|
||||
"doctrine/doctrine-bundle": "^1.12 || ^2.3.1",
|
||||
"doctrine/doctrine-migrations-bundle": "^3.0.1",
|
||||
"doctrine/event-manager": "^1.1",
|
||||
"doctrine/inflector": "^1.4 || ^2.0",
|
||||
"doctrine/migrations": "^3.0",
|
||||
"doctrine/migrations": "^3.5.5",
|
||||
"doctrine/orm": "^2.13",
|
||||
"doctrine/persistence": "^2.3 || ^3.0",
|
||||
"egulias/email-validator": "^3.1",
|
||||
"enshrined/svg-sanitize": "^0.15.4 || ^0.16",
|
||||
"enshrined/svg-sanitize": "^0.16",
|
||||
"fakerphp/faker": "^1.10",
|
||||
"friendsofphp/proxy-manager-lts": "^1.0.7",
|
||||
"friendsofsymfony/rest-bundle": "^3.0",
|
||||
"gedmo/doctrine-extensions": "^3.2",
|
||||
"guzzlehttp/guzzle": "^6.5",
|
||||
"guzzlehttp/psr7": "^1.8",
|
||||
"jms/serializer-bundle": "^4.0",
|
||||
"guzzlehttp/guzzle": "^6.5 || ^7.0",
|
||||
"guzzlehttp/psr7": "^2.5",
|
||||
"jms/serializer-bundle": "^4.2",
|
||||
"knplabs/gaufrette": "^0.10 || ^0.11",
|
||||
"knplabs/knp-gaufrette-bundle": "^0.7 || ^0.8",
|
||||
"knplabs/knp-menu": "^3.1",
|
||||
|
|
@ -58,23 +59,26 @@
|
|||
"laminas/laminas-stdlib": "^3.3.1",
|
||||
"league/flysystem-bundle": "^2.4",
|
||||
"lexik/jwt-authentication-bundle": "^2.11",
|
||||
"liip/imagine-bundle": "^2.3",
|
||||
"liip/imagine-bundle": "^2.10",
|
||||
"nyholm/psr7": "^1.6",
|
||||
"pagerfanta/pagerfanta": "^3.0",
|
||||
"payum/payum": "^1.7.2",
|
||||
"payum/offline": "^1.7.3",
|
||||
"payum/payum-bundle": "^2.5",
|
||||
"php-http/guzzle6-adapter": "^2.0",
|
||||
"php-http/httplug": "^2.4",
|
||||
"php-http/message-factory": "^1.0",
|
||||
"psr/cache": "^2.0",
|
||||
"psr/http-client": "^1.0",
|
||||
"psr/http-message": "^1.0",
|
||||
"psr/log": "^2.0",
|
||||
"ramsey/uuid": "^4.0",
|
||||
"sonata-project/block-bundle": "^4.2",
|
||||
"sonata-project/block-bundle": "^4.2 || ^5.0",
|
||||
"stof/doctrine-extensions-bundle": "^1.4",
|
||||
"sylius-labs/association-hydrator": "^1.1 || ^1.2",
|
||||
"sylius-labs/doctrine-migrations-extra-bundle": "^0.1.4 || ^0.2",
|
||||
"sylius-labs/polyfill-symfony-event-dispatcher": "^1.0.1",
|
||||
"sylius-labs/polyfill-symfony-framework-bundle": "^1.0 || ^1.1",
|
||||
"sylius-labs/polyfill-symfony-security": "^1.1",
|
||||
"sylius/calendar": "^0.3 || ^0.4",
|
||||
"sylius/calendar": "^0.3 || ^0.4 || ^0.5",
|
||||
"sylius/fixtures-bundle": "^1.7",
|
||||
"sylius/grid": "^1.11",
|
||||
"sylius/grid-bundle": "^1.11",
|
||||
|
|
@ -84,50 +88,52 @@
|
|||
"sylius/resource": "^1.9",
|
||||
"sylius/resource-bundle": "^1.9",
|
||||
"sylius/theme-bundle": "^2.1.1 || ^2.3",
|
||||
"symfony/asset": "^5.4 || ^6.0",
|
||||
"symfony/config": "^5.4 || ^6.0",
|
||||
"symfony/console": "^5.4 || ^6.0",
|
||||
"symfony/dependency-injection": "^5.4 || ^6.0",
|
||||
"symfony/asset": "^5.4.21 || ^6.0",
|
||||
"symfony/config": "^5.4.21 || ^6.0",
|
||||
"symfony/console": "^5.4.21 || ^6.0",
|
||||
"symfony/dependency-injection": "^5.4.21 || ^6.0",
|
||||
"symfony/deprecation-contracts": "^2.5",
|
||||
"symfony/doctrine-bridge": "^5.4 || ^6.0",
|
||||
"symfony/doctrine-messenger": "^5.4 || ^6.0",
|
||||
"symfony/event-dispatcher": "^5.4 || ^6.0",
|
||||
"symfony/expression-language": "^5.4 || ^6.0",
|
||||
"symfony/filesystem": "^5.4 || ^6.0",
|
||||
"symfony/finder": "^5.4 || ^6.0",
|
||||
"symfony/form": "^5.4 || ^6.0",
|
||||
"symfony/framework-bundle": "^5.4 || ^6.0",
|
||||
"symfony/http-foundation": "^5.4 || ^6.0",
|
||||
"symfony/http-kernel": "^5.4 || ^6.0",
|
||||
"symfony/intl": "^5.4 || ^6.0",
|
||||
"symfony/mailer": "^5.4 || ^6.0",
|
||||
"symfony/messenger": "^5.4 || ^6.0",
|
||||
"symfony/doctrine-bridge": "^5.4.21 || ^6.0",
|
||||
"symfony/doctrine-messenger": "^5.4.21 || ^6.0",
|
||||
"symfony/event-dispatcher": "^5.4.21 || ^6.0",
|
||||
"symfony/expression-language": "^5.4.21 || ^6.0",
|
||||
"symfony/filesystem": "^5.4.21 || ^6.0",
|
||||
"symfony/finder": "^5.4.21 || ^6.0",
|
||||
"symfony/form": "^5.4.21 || ^6.0",
|
||||
"symfony/framework-bundle": "^5.4.21 || ^6.0",
|
||||
"symfony/http-client": "^5.4.21 || ^6.0",
|
||||
"symfony/http-foundation": "^5.4.21 || ^6.0",
|
||||
"symfony/http-kernel": "^5.4.21 || ^6.0",
|
||||
"symfony/intl": "^5.4.21 || ^6.0",
|
||||
"symfony/mailer": "^5.4.21 || ^6.0",
|
||||
"symfony/messenger": "^5.4.21 || ^6.0",
|
||||
"symfony/monolog-bundle": "^3.5",
|
||||
"symfony/options-resolver": "^5.4 || ^6.0",
|
||||
"symfony/password-hasher": "^5.4 || ^6.0",
|
||||
"symfony/options-resolver": "^5.4.21 || ^6.0",
|
||||
"symfony/password-hasher": "^5.4.21 || ^6.0",
|
||||
"symfony/polyfill-iconv": "^1.17",
|
||||
"symfony/polyfill-intl-icu": "^1.22",
|
||||
"symfony/polyfill-mbstring": "^1.17",
|
||||
"symfony/polyfill-php80": "^1.17",
|
||||
"symfony/process": "^5.4 || ^6.0",
|
||||
"symfony/property-access": "^5.4 || ^6.0",
|
||||
"symfony/property-info": "^5.4 || ^6.0",
|
||||
"symfony/proxy-manager-bridge": "^5.4 || ^6.0",
|
||||
"symfony/routing": "^5.4 || ^6.0",
|
||||
"symfony/security-bundle": "^5.4 || ^6.0",
|
||||
"symfony/security-core": "^5.4 || ^6.0",
|
||||
"symfony/security-csrf": "^5.4 || ^6.0",
|
||||
"symfony/security-http": "^5.4 || ^6.0",
|
||||
"symfony/serializer": "^5.4 || ^6.0",
|
||||
"symfony/process": "^5.4.21 || ^6.0",
|
||||
"symfony/property-access": "^5.4.21 || ^6.0",
|
||||
"symfony/property-info": "^5.4.21 || ^6.0",
|
||||
"symfony/proxy-manager-bridge": "^5.4.21 || ^6.0",
|
||||
"symfony/routing": "^5.4.21 || ^6.0",
|
||||
"symfony/security-bundle": "^5.4.21 || ^6.0",
|
||||
"symfony/security-core": "^5.4.21 || ^6.0",
|
||||
"symfony/security-csrf": "^5.4.21 || ^6.0",
|
||||
"symfony/security-http": "^5.4.21 || ^6.0",
|
||||
"symfony/serializer": "^5.4.21 || ^6.0",
|
||||
"symfony/service-contracts": "^2.5 || ^3.0",
|
||||
"symfony/string": "^5.4 || ^6.0",
|
||||
"symfony/templating": "^5.4 || ^6.0",
|
||||
"symfony/translation": "^5.4 || ^6.0",
|
||||
"symfony/string": "^5.4.21 || ^6.0",
|
||||
"symfony/templating": "^5.4.21 || ^6.0",
|
||||
"symfony/translation": "^5.4.21 || ^6.0",
|
||||
"symfony/translation-contracts": "^2.5",
|
||||
"symfony/twig-bundle": "^5.4 || ^6.0",
|
||||
"symfony/validator": "^5.4 || ^6.0",
|
||||
"symfony/twig-bundle": "^5.4.21 || ^6.0",
|
||||
"symfony/validator": "^5.4.21 || ^6.0",
|
||||
"symfony/webpack-encore-bundle": "^1.15",
|
||||
"symfony/yaml": "^5.4 || ^6.0",
|
||||
"symfony/workflow": "^5.4.21 || ^6.0",
|
||||
"symfony/yaml": "^5.4.21 || ^6.0",
|
||||
"twig/intl-extra": "^2.12 || ^3.4",
|
||||
"twig/twig": "^2.12 || ^3.3",
|
||||
"webmozart/assert": "^1.9",
|
||||
|
|
@ -179,17 +185,11 @@
|
|||
"sylius/user-bundle": "self.version"
|
||||
},
|
||||
"conflict": {
|
||||
"api-platform/core": "2.7.0",
|
||||
"doctrine/doctrine-bundle": "2.3.0",
|
||||
"doctrine/migrations": "3.5.3",
|
||||
"doctrine/orm": ">= 2.16.0",
|
||||
"jms/serializer-bundle": "4.1.0",
|
||||
"lexik/jwt-authentication-bundle": "^2.18",
|
||||
"stof/doctrine-extensions-bundle": "1.8.0",
|
||||
"symfony/dependency-injection": "5.4.5",
|
||||
"symfony/framework-bundle": "5.4.5 || 6.2.8",
|
||||
"symfony/validator": "5.4.25 || 6.2.12 || 6.3.1",
|
||||
"liip/imagine-bundle": "2.7.0"
|
||||
"symfony/framework-bundle": "6.2.8",
|
||||
"symfony/validator": "5.4.25 || 6.2.12 || 6.3.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"behat/behat": "^3.6.1",
|
||||
|
|
@ -198,7 +198,7 @@
|
|||
"consolidation/robo": "^3.0|^4.0",
|
||||
"dmore/behat-chrome-extension": "^1.3",
|
||||
"dmore/chrome-mink-driver": "^2.7",
|
||||
"doctrine/cache": "^1.10",
|
||||
"doctrine/cache": "^2.2",
|
||||
"doctrine/data-fixtures": "^1.4",
|
||||
"friends-of-behat/mink": "^1.8",
|
||||
"friends-of-behat/mink-browserkit-driver": "^1.4",
|
||||
|
|
@ -214,26 +214,29 @@
|
|||
"matthiasnoback/symfony-dependency-injection-test": "^4.2",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"mockery/mockery": "^1.4",
|
||||
"payum/paypal-express-checkout-nvp": "^1.7.3",
|
||||
"payum/stripe": "^1.7.3",
|
||||
"phparkitect/phparkitect": "^0.2.9",
|
||||
"phpspec/phpspec": "^7.2",
|
||||
"phpspec/prophecy-phpunit": "^2.0",
|
||||
"phpstan/phpstan": "^1.6",
|
||||
"phpstan/phpstan-doctrine": "1.3.2",
|
||||
"phpstan/phpstan-doctrine": "1.3.43",
|
||||
"phpstan/phpstan-symfony": "^1.2",
|
||||
"phpstan/phpstan-webmozart-assert": "^1.1",
|
||||
"phpunit/phpunit": "^8.5",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
|
||||
"psr/event-dispatcher": "^1.0",
|
||||
"rector/rector": "^0.12.20",
|
||||
"rector/rector": "^0.18.0",
|
||||
"robertfausk/behat-panther-extension": "^1.1",
|
||||
"stripe/stripe-php": "^8.1",
|
||||
"sylius-labs/coding-standard": "^4.2",
|
||||
"sylius-labs/suite-tags-extension": "~0.1",
|
||||
"symfony/browser-kit": "^5.4 || ^6.0",
|
||||
"symfony/debug-bundle": "^5.4 || ^6.0",
|
||||
"symfony/dotenv": "^5.4 || ^6.0",
|
||||
"symfony/browser-kit": "^5.4.21 || ^6.0",
|
||||
"symfony/debug-bundle": "^5.4.21 || ^6.0",
|
||||
"symfony/dotenv": "^5.4.21 || ^6.0",
|
||||
"symfony/flex": "^1.7",
|
||||
"symfony/runtime": "^5.4 || ^6.0",
|
||||
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
|
||||
"symfony/runtime": "^5.4.21 || ^6.0",
|
||||
"symfony/web-profiler-bundle": "^5.4.21 || ^6.0",
|
||||
"symplify/monorepo-builder": "^11.0"
|
||||
},
|
||||
"suggest": {
|
||||
|
|
|
|||
21
config/packages/nyholm_psr7.yaml
Normal file
21
config/packages/nyholm_psr7.yaml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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'
|
||||
|
||||
# Register nyholm/psr7 services for autowiring with HTTPlug factories
|
||||
Http\Message\MessageFactory: '@nyholm.psr7.httplug_factory'
|
||||
Http\Message\RequestFactory: '@nyholm.psr7.httplug_factory'
|
||||
Http\Message\ResponseFactory: '@nyholm.psr7.httplug_factory'
|
||||
Http\Message\StreamFactory: '@nyholm.psr7.httplug_factory'
|
||||
Http\Message\UriFactory: '@nyholm.psr7.httplug_factory'
|
||||
|
||||
nyholm.psr7.psr17_factory:
|
||||
class: Nyholm\Psr7\Factory\Psr17Factory
|
||||
|
||||
nyholm.psr7.httplug_factory:
|
||||
class: Nyholm\Psr7\Factory\HttplugFactory
|
||||
|
|
@ -1,2 +1,5 @@
|
|||
sylius_user:
|
||||
encoder: plaintext
|
||||
|
||||
sylius_api:
|
||||
enabled: true
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
security:
|
||||
password_hashers:
|
||||
Sylius\Component\User\Model\UserInterface:
|
||||
algorithm: argon2i
|
||||
time_cost: 3
|
||||
memory_cost: 10
|
||||
Sylius\Component\User\Model\UserInterface: plaintext
|
||||
|
|
|
|||
2
config/packages/workflow.yaml
Normal file
2
config/packages/workflow.yaml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
framework:
|
||||
workflows: ~
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
imports:
|
||||
- { resource: "../vendor/sylius/calendar/tests/Behat/Resources/services.yaml" }
|
||||
- { resource: "../src/Sylius/Behat/Resources/config/services.xml" }
|
||||
|
||||
# workaround needed for strange "test.client.history" problem
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ How to perform the Selecting shipping Step programmatically?
|
|||
Before approaching this step be sure that your Order is in the ``addressed`` state. In this state your order
|
||||
will already have a default ShippingMethod assigned, but in this step you can change it and have everything recalculated automatically.
|
||||
|
||||
Firstly either create new (see how in the `Shipments concept </book/orders/shipments>`_) or retrieve a **ShippingMethod**
|
||||
Firstly either create new (see how in the :doc:`Shipments concept </book/orders/shipments>`) or retrieve a **ShippingMethod**
|
||||
from the repository to assign it to your order's shipment created defaultly in the addressing step.
|
||||
|
||||
.. code-block:: php
|
||||
|
|
@ -210,7 +210,7 @@ How to perform the Selecting payment step programmatically?
|
|||
Before this step your Order should be in the ``shipping_selected`` state. It will have a default Payment selected after the addressing step,
|
||||
but in this step you can change it.
|
||||
|
||||
Firstly either create new (see how in the `Payments concept </book/orders/payments>`_) or retrieve a **PaymentMethod**
|
||||
Firstly either create new (see how in the :doc:`Payments concept </book/orders/payments>`) or retrieve a **PaymentMethod**
|
||||
from the repository to assign it to your order's payment created defaultly in the addressing step.
|
||||
|
||||
.. code-block:: php
|
||||
|
|
|
|||
|
|
@ -92,16 +92,19 @@ relevant classes, methods, properties:
|
|||
The deprecation message should indicate the version in which the class/method was
|
||||
deprecated and how the feature was replaced (whenever possible).
|
||||
|
||||
A PHP ``\E_USER_DEPRECATED`` error must also be triggered to help people with
|
||||
the migration:
|
||||
A PHP deprecation must also be triggered to help people with
|
||||
the migration, for instance:
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
@trigger_error(
|
||||
'XXX() is deprecated since version 2.X and will be removed in 2.Y. Use XXX instead.',
|
||||
\E_USER_DEPRECATED
|
||||
trigger_deprecation(
|
||||
'sylius/some-package', // package name
|
||||
'1.x', // package version
|
||||
'A is deprecated and will be removed in Sylius 2.0. Use B instead.', // message
|
||||
);
|
||||
|
||||
You should not use the @trigger_error() function.
|
||||
|
||||
.. _Semantic Versioning: https://semver.org/
|
||||
.. _Symfony's Backward Compatibility Promise: https://symfony.com/doc/current/contributing/code/bc.html
|
||||
.. _Symfony's Experimental Features: https://symfony.com/doc/current/contributing/code/experimental.html
|
||||
|
|
|
|||
|
|
@ -38,15 +38,15 @@ That's it! All other files are just a boilerplate to show you what can be done i
|
|||
|
||||
* ``src/Controller/GreetingController.php``
|
||||
|
||||
* ``src/Resources/config/admin_routing.yml``
|
||||
* ``config/admin_routing.yml``
|
||||
|
||||
* ``src/Resources/config/shop_routing.yml``
|
||||
* ``config/shop_routing.yml``
|
||||
|
||||
* ``src/Resources/public/greeting.js``
|
||||
* ``public/greeting.js``
|
||||
|
||||
* ``src/Resources/views/dynamic_greeting.html.twig``
|
||||
* ``templates/dynamic_greeting.html.twig``
|
||||
|
||||
* ``src/Resources/views/static_greeting.html.twig``
|
||||
* ``templates/static_greeting.html.twig``
|
||||
|
||||
* All files from ``tests/Behat/Page/Shop/`` (with corresponding services)
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ Configuration reference
|
|||
customer_group:
|
||||
classes:
|
||||
model: Sylius\Component\Customer\Model\CustomerGroup
|
||||
repository: Sylius\Bundle\CustomerBundle\Doctrine\ORM\CustomerGroupRepository
|
||||
interface: Sylius\Component\Customer\Model\CustomerGroupInterface
|
||||
controller: Sylius\Bundle\ResourceBundle\Controller\ResourceController
|
||||
factory: Sylius\Component\Resource\Factory\Factory
|
||||
|
|
|
|||
|
|
@ -1,13 +1,6 @@
|
|||
.. rst-class:: outdated
|
||||
|
||||
Processors
|
||||
==========
|
||||
|
||||
.. danger::
|
||||
|
||||
We're sorry but **this documentation section is outdated**. Please have that in mind when trying to use it.
|
||||
You can help us making documentation up to date via Sylius Github. Thank you!
|
||||
|
||||
Order processors are responsible of manipulating the orders to apply different predefined adjustments or other modifications based on order state.
|
||||
|
||||
Registering custom processors
|
||||
|
|
@ -35,6 +28,38 @@ Once you have your own :ref:`component_order_processors_order-processor-interfac
|
|||
|
||||
You can add your own processor to the :ref:`component_order_processors_composite_order_processor` using `sylius.order_processor`
|
||||
|
||||
.. note::
|
||||
|
||||
If services autoconfiguration is enabled, you should register your own processor by adding the ``Sylius\Bundle\OrderBundle\Attribute\AsOrderProcessor`` attribute
|
||||
on the top of the processor class.
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
<?php
|
||||
|
||||
namespace App\OrderProcessor;
|
||||
|
||||
use Sylius\Bundle\OrderBundle\Attribute\AsOrderProcessor;
|
||||
use Sylius\Component\Order\Model\OrderInterface;
|
||||
use Sylius\Component\Order\Processor\OrderProcessorInterface;
|
||||
|
||||
#[AsOrderProcessor(priority: 10)] //priority is optional
|
||||
//#[AsOrderProcessor] can be used as well
|
||||
final class CustomOrderProcessor implements OrderProcessorInterface
|
||||
{
|
||||
public function process(OrderInterface $order): void
|
||||
{
|
||||
// ...
|
||||
}
|
||||
}
|
||||
|
||||
Then you should enable autoconfiguring with attributes in your ``config/packages/_sylius.yaml`` file:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
sylius_order:
|
||||
autoconfigure_with_attributes: true
|
||||
|
||||
Using CompositeOrderProcessor
|
||||
-----------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ In the response you should get a collection with only one item:
|
|||
],
|
||||
"translations": {
|
||||
"en_US": {
|
||||
"@id": "/api/v2/shop/product-variant-translation/579960",
|
||||
"@id": "/api/v2/shop/product-variant-translations/579960",
|
||||
"@type": "ProductVariantTranslation",
|
||||
"id": 579960,
|
||||
"name": "S Petite",
|
||||
|
|
|
|||
168
docs/cookbook/cli/handle-multiple-channels-in-cli.rst
Normal file
168
docs/cookbook/cli/handle-multiple-channels-in-cli.rst
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
Handle multiple channels in CLI
|
||||
===============================
|
||||
|
||||
When we use directly or indirectly any service depending on a channel context, we are not able to define which channel we want to use, when there are more than two.
|
||||
Your primary goal should be to avoid such cases, but if you have to, there is a way to do it.
|
||||
|
||||
What is our goal?
|
||||
-----------------
|
||||
|
||||
We have to create a custom channel context available only from the CLI context. This channel context should allow setting a channel code (which we will do inside the console command). This way, we can use the channel context in our services.
|
||||
|
||||
1. Custom Channel Context
|
||||
-------------------------
|
||||
|
||||
First, we need to create a channel context. Let's remind the requirements:
|
||||
|
||||
* available only from the CLI
|
||||
* there must be a way to pass in a channel code
|
||||
|
||||
Our suggested solution is the following:
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
// src/Channel/Context/CliBasedChannelContext.php
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Channel\Context;
|
||||
|
||||
use Sylius\Component\Channel\Context\ChannelNotFoundException;
|
||||
use Sylius\Component\Channel\Model\ChannelInterface;
|
||||
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
|
||||
|
||||
final class CliBasedChannelContext implements CliBasedChannelContextInterface
|
||||
{
|
||||
private ?string $channelCode = null;
|
||||
|
||||
public function __construct(
|
||||
private ChannelRepositoryInterface $channelRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
public function setChannelCode(?string $channelCode): void
|
||||
{
|
||||
$this->channelCode = $channelCode;
|
||||
}
|
||||
|
||||
public function getChannelCode(): ?string
|
||||
{
|
||||
return $this->channelCode;
|
||||
}
|
||||
|
||||
public function getChannel(): ChannelInterface
|
||||
{
|
||||
if ('cli' !== PHP_SAPI || null === $this->channelCode) {
|
||||
throw new ChannelNotFoundException();
|
||||
}
|
||||
|
||||
$channel = $this->channelRepository->findOneByCode($this->channelCode);
|
||||
|
||||
if (null === $channel) {
|
||||
throw new ChannelNotFoundException();
|
||||
}
|
||||
|
||||
return $channel;
|
||||
}
|
||||
}
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
// src/Channel/Context/CliBasedChannelContextInterface.php;
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Channel\Context;
|
||||
|
||||
use Sylius\Component\Channel\Context\ChannelContextInterface;
|
||||
|
||||
interface CliBasedChannelContextInterface extends ChannelContextInterface
|
||||
{
|
||||
public function setChannelCode(?string $channelCode): void;
|
||||
|
||||
public function getChannelCode(): ?string;
|
||||
}
|
||||
|
||||
Now, we have to configure our custom channel context as a service:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# config/services.yaml
|
||||
services:
|
||||
App\Channel\Context\CliBasedChannelContextInterface:
|
||||
class: App\Channel\Context\CliBasedChannelContext
|
||||
arguments:
|
||||
- '@sylius.repository.channel'
|
||||
tags:
|
||||
- { name: 'sylius.context.channel', priority: -256 }
|
||||
|
||||
2. Usage of the new custom channel context in a console command
|
||||
---------------------------------------------------------------
|
||||
|
||||
For our example, we will create a DummyCommand which will take a channel code as an option
|
||||
and dispatch a dummy event. This event is handled by a subscriber using
|
||||
the channel context to print the channel's name.
|
||||
|
||||
You command might look like this:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
// src/Console/Command/DummyCommand.php
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Console\Command;
|
||||
|
||||
use App\Channel\Context\CliBasedChannelContextInterface;
|
||||
use App\Console\Command\Event\DummyEvent; // it is just a dummy event, nothing special there
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
#[AsCommand('app:dummy', description: 'Dummy command')]
|
||||
class DummyCommand extends Command
|
||||
{
|
||||
public function __construct (
|
||||
private CliBasedChannelContextInterface $cliBasedChannelContext,
|
||||
private EventDispatcherInterface $dispatcher,
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
protected function configure(): void
|
||||
{
|
||||
$this
|
||||
->addOption('channel', 'c', InputOption::VALUE_OPTIONAL, 'Channel code')
|
||||
;
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
if (null !== $channelCode = $input->getOption('channel')) {
|
||||
$this->cliBasedChannelContext->setChannelCode($channelCode);
|
||||
}
|
||||
|
||||
// The subscriber just gets a channel from the channel context
|
||||
$this->dispatcher->dispatch(new DummyEvent());
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
The output of the example is following:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ bin/console app:dummy -c MAGIC_WEB
|
||||
Hi! I am Dummy Event Subscriber. I am using Channel Context.
|
||||
Your channel name is: Magic Web Channel
|
||||
|
||||
$ bin/console app:dummy -c FASHION_WEB
|
||||
Hi! I am Dummy Event Subscriber. I am using Channel Context.
|
||||
Your channel name is: Fashion Web Store
|
||||
1
docs/cookbook/cli/map.rst.inc
Normal file
1
docs/cookbook/cli/map.rst.inc
Normal file
|
|
@ -0,0 +1 @@
|
|||
* :doc:`/cookbook/cli/handle-multiple-channels-in-cli`
|
||||
|
|
@ -3,6 +3,16 @@ The Cookbook
|
|||
|
||||
The Sylius Cookbook is a collection of solution articles helping you with some specific, narrow problems.
|
||||
|
||||
CLI
|
||||
---
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
cli/handle-multiple-channels-in-cli
|
||||
|
||||
.. include:: /cookbook/cli/map.rst.inc
|
||||
|
||||
Entities
|
||||
--------
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
Customizing Grids
|
||||
=================
|
||||
|
||||
|
|
@ -139,6 +140,24 @@ If you would like to change the link to which an action button is redirecting, t
|
|||
The above grid modification will change the redirect of the ``show`` action to redirect to the shop, instead of admin show.
|
||||
Also the label was changed here.
|
||||
|
||||
How to remove label of an action from a grid?
|
||||
'''''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
If you would like to remove label for some actions in any grid, you just need to set its ``labeled`` option to ``false`` like below:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# config/packages/_sylius.yaml
|
||||
sylius_grid:
|
||||
grids:
|
||||
sylius_admin_product_review:
|
||||
actions:
|
||||
item:
|
||||
delete:
|
||||
type: delete
|
||||
options:
|
||||
labeled: false
|
||||
|
||||
How to modify positions of fields, filters and actions in a grid?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ and let's take first variant `@id` from list:
|
|||
],
|
||||
"translations": {
|
||||
"en_US": {
|
||||
"@id": "/api/v2/shop/product-variant-translation/123889",
|
||||
"@id": "/api/v2/shop/product-variant-translations/123889",
|
||||
"@type": "ProductVariantTranslation",
|
||||
"id": 123889,
|
||||
"name": "S",
|
||||
|
|
|
|||
5
ecs.php
5
ecs.php
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpCsFixer\Fixer\ClassNotation\OrderedTypesFixer;
|
||||
use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer;
|
||||
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
|
||||
use PhpCsFixer\Fixer\LanguageConstruct\ErrorSuppressionFixer;
|
||||
|
|
@ -22,16 +23,16 @@ return static function (ECSConfig $config): void {
|
|||
$config->import('vendor/sylius-labs/coding-standard/ecs.php');
|
||||
|
||||
$config->parallel();
|
||||
$config->paths(['src/Sylius']);
|
||||
$config->paths(['src/Sylius', 'tests']);
|
||||
$config->skip([
|
||||
InlineDocCommentDeclarationSniff::class . '.MissingVariable',
|
||||
InlineDocCommentDeclarationSniff::class . '.NoAssignment',
|
||||
VisibilityRequiredFixer::class => ['*Spec.php'],
|
||||
ErrorSuppressionFixer::class => 'src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/BackwardsCompatibility/CancelOrderStateMachineCallbackPass.php',
|
||||
'**/var/*',
|
||||
'src/Sylius/Behat/Service/Converter/IriConverter.php',
|
||||
]);
|
||||
$config->ruleWithConfiguration(PhpdocSeparationFixer::class, ['groups' => [['Given', 'When', 'Then']]]);
|
||||
$config->ruleWithConfiguration(OrderedTypesFixer::class, ['null_adjustment' => 'always_last']);
|
||||
$config->ruleWithConfiguration(
|
||||
HeaderCommentFixer::class,
|
||||
[
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Feature: Editing a customer profile
|
|||
|
||||
Background:
|
||||
Given the store operates on a single channel in "United States"
|
||||
And there is a customer "Francis Underwood" identified by an email "francis@underwood.com" and a password "sylius"
|
||||
And there is a user "francis@underwood.com" identified by "sylius"
|
||||
And I am logged in as "francis@underwood.com"
|
||||
|
||||
@ui @api
|
||||
|
|
@ -18,17 +18,24 @@ Feature: Editing a customer profile
|
|||
Then I should be notified that it has been successfully edited
|
||||
And my name should be "Will Conway"
|
||||
|
||||
@ui @email
|
||||
@ui @email @no-api
|
||||
Scenario: Changing my email if channel requires verification
|
||||
When I want to modify my profile
|
||||
And I specify the customer email as "frank@underwood.com"
|
||||
And I save my changes
|
||||
# Then I should be notified that it has been successfully edited
|
||||
# And I should be notified that the verification email has been sent
|
||||
Then I should be notified that it has been successfully edited
|
||||
And I should be notified that the verification email has been sent
|
||||
And it should be sent to "frank@underwood.com"
|
||||
And I should not be logged in
|
||||
|
||||
@ui
|
||||
@api @no-ui
|
||||
Scenario: Changing my email if channel requires verification
|
||||
When I want to modify my profile
|
||||
And I specify the customer email as "frank@underwood.com"
|
||||
And I save my changes
|
||||
And I should not be logged in
|
||||
|
||||
@ui @no-api
|
||||
Scenario: Changing my email if channel does not require verification
|
||||
Given "United States" channel has account verification disabled
|
||||
When I want to modify my profile
|
||||
|
|
@ -38,7 +45,7 @@ Feature: Editing a customer profile
|
|||
And my account should not be verified
|
||||
And my email should be "frank@underwood.com"
|
||||
|
||||
@api
|
||||
@api @no-ui
|
||||
Scenario: Changing my email if channel does not require verification
|
||||
Given "United States" channel has account verification disabled
|
||||
When I want to modify my profile
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ Feature: Viewing orders only from current channel
|
|||
And the store has a zone "United States + United Kingdom" with code "US + UK"
|
||||
And this zone has the "United States" country member
|
||||
And this zone has the "United Kingdom" country member
|
||||
And the store has a product "Angel T-Shirt" priced at "$100" in "Web-US" channel
|
||||
And this product is also priced at "£200" in "Web-UK" channel
|
||||
And the store has a product "Angel T-Shirt" priced at "$100.00" in "Web-US" channel
|
||||
And this product is also priced at "£200.00" in "Web-UK" channel
|
||||
And the store ships everywhere for free for all channels
|
||||
And the store allows paying Offline for all channels
|
||||
And there is a customer "John Hancock" identified by an email "hancock@superheronope.com" and a password "superPower"
|
||||
|
|
|
|||
|
|
@ -9,11 +9,29 @@ Feature: Receiving a welcoming email after registration
|
|||
And that channel allows to shop using "English (United States)" and "Polish (Poland)" locales
|
||||
|
||||
@ui @email @api
|
||||
Scenario: Receiving a welcoming email after registration
|
||||
Scenario: Receiving a welcoming email after registration when channel has disabled registration verification
|
||||
Given on this channel account verification is not required
|
||||
When I register with email "ghastly@bespoke.com" and password "suitsarelife"
|
||||
Then a welcoming email should have been sent to "ghastly@bespoke.com"
|
||||
Then only one email should have been sent to "ghastly@bespoke.com"
|
||||
And a welcoming email should have been sent to "ghastly@bespoke.com"
|
||||
|
||||
@ui @email @api
|
||||
Scenario: Receiving an account verification email after registration when channel has enabled registration verification
|
||||
Given on this channel account verification is required
|
||||
When I register with email "ghastly@bespoke.com" and password "suitsarelife"
|
||||
Then only one email should have been sent to "ghastly@bespoke.com"
|
||||
And a verification email should have been sent to "ghastly@bespoke.com"
|
||||
But a welcoming email should not have been sent to "ghastly@bespoke.com"
|
||||
|
||||
@ui @email @api
|
||||
Scenario: Receiving a welcoming email after registration in different locale than the default one
|
||||
Given on this channel account verification is not required
|
||||
When I register with email "ghastly@bespoke.com" and password "suitsarelife" in the "Polish (Poland)" locale
|
||||
Then a welcoming email should have been sent to "ghastly@bespoke.com" in "Polish (Poland)" locale
|
||||
|
||||
@ui @email @api
|
||||
Scenario: Receiving a welcoming email after account verification when channel has enabled registration verification
|
||||
Given on this channel account verification is required
|
||||
And I register with email "ghastly@bespoke.com" and password "suitsarelife"
|
||||
When I verify my account using link sent to "ghastly@bespoke.com"
|
||||
Then a welcoming email should have been sent to "ghastly@bespoke.com"
|
||||
|
|
|
|||
|
|
@ -7,8 +7,23 @@ Feature: Account registration
|
|||
Background:
|
||||
Given the store operates on a single channel in "United States"
|
||||
|
||||
@ui @api
|
||||
Scenario: Registering a new account with minimum information
|
||||
@ui @no-api
|
||||
Scenario: Registering a new account with minimum information when channel has enabled registration verification
|
||||
Given on this channel account verification is required
|
||||
When I want to register a new account
|
||||
And I specify the first name as "Saul"
|
||||
And I specify the last name as "Goodman"
|
||||
And I specify the email as "goodman@gmail.com"
|
||||
And I specify the password as "heisenberg"
|
||||
And I confirm this password
|
||||
And I register this account
|
||||
Then I should be notified that new account has been successfully created
|
||||
And I should be on registration thank you page
|
||||
But I should not be logged in
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Registering a new account with minimum information when channel has enabled registration verification
|
||||
Given on this channel account verification is required
|
||||
When I want to register a new account
|
||||
And I specify the first name as "Saul"
|
||||
And I specify the last name as "Goodman"
|
||||
|
|
@ -31,6 +46,7 @@ Feature: Account registration
|
|||
And I register this account
|
||||
Then I should be notified that new account has been successfully created
|
||||
And I should be logged in
|
||||
And I should be on my account dashboard
|
||||
|
||||
@ui @api
|
||||
Scenario: Registering a new account with all details
|
||||
|
|
|
|||
|
|
@ -48,3 +48,13 @@ Feature: Resetting a password
|
|||
And I confirm my new password as "newp@ssw0rd"
|
||||
And I reset it
|
||||
Then I should not be able to change my password again with the same token
|
||||
|
||||
@ui @email @api
|
||||
Scenario: Trying to change my account password with an expired token I received
|
||||
Given I have already received a resetting password email
|
||||
But I waited too long, and the token expired
|
||||
When I follow link on my email to reset my password
|
||||
And I specify my new password as "newp@ssw0rd"
|
||||
And I confirm my new password as "newp@ssw0rd"
|
||||
And I reset it
|
||||
Then I should not be able to change my password with this token
|
||||
|
|
|
|||
|
|
@ -17,14 +17,14 @@ Feature: Signing in to the store validation
|
|||
Then I should be notified about bad credentials
|
||||
And I should not be logged in
|
||||
|
||||
@ui
|
||||
@ui @api
|
||||
Scenario: Trying to sign in without confirming account
|
||||
When I register with email "sylius@example.com" and password "sylius"
|
||||
And I want to log in
|
||||
And I specify the username as "sylius@example.com"
|
||||
And I specify the password as "sylius"
|
||||
And I try to log in
|
||||
Then I should be notified about disabled account
|
||||
Then I should be notified about bad credentials
|
||||
And I should not be logged in
|
||||
|
||||
@ui @api
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ Feature: Verifying account's email address
|
|||
Scenario: Receiving account verification email after registration
|
||||
When I register with email "ghastly@bespoke.com" and password "suitsarelife"
|
||||
Then I should be notified that my account has been created and the verification email has been sent
|
||||
And 2 emails should be sent to "ghastly@bespoke.com"
|
||||
And 1 email should be sent to "ghastly@bespoke.com"
|
||||
But I should not be able to log in as "ghastly@bespoke.com" with "suitsarelife" password
|
||||
|
||||
@ui @email @api
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
@managing_countries
|
||||
Feature: Country unique code validation
|
||||
In order to avoid making mistakes when managing countries
|
||||
As an Administrator
|
||||
I want to be prevented from adding a new country with an existing code
|
||||
|
||||
Background:
|
||||
Given the store operates in "Norway"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @api
|
||||
Scenario: Trying to add a new country with used code
|
||||
When I want to add a new country
|
||||
Then I should not be able to choose "Norway"
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
@managing_countries
|
||||
Feature: Country validation
|
||||
In order to avoid making mistakes when managing countries
|
||||
As an Administrator
|
||||
I want to be prevented from adding a new country with invalid code
|
||||
|
||||
Background:
|
||||
Given the store operates in "Norway"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @api
|
||||
Scenario: Trying to add a new country with used code
|
||||
When I want to add a new country
|
||||
Then I should not be able to choose "Norway"
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Trying to add a new country with invalid code
|
||||
When I want to add a new country
|
||||
And I specify the country code as "NJ"
|
||||
And I try to save my changes
|
||||
Then I should be notified that the country code is invalid
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Trying to add a new country with alpha-3 code
|
||||
When I want to add a new country
|
||||
And I specify the country code as "USA"
|
||||
And I try to save my changes
|
||||
Then I should be notified that the country code is invalid
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Trying to add a new country with no code
|
||||
When I want to add a new country
|
||||
And I do not specify the country code
|
||||
And I try to save my changes
|
||||
Then I should be notified that the country code is required
|
||||
|
|
@ -21,7 +21,7 @@ Feature: Province unique fields validation
|
|||
Scenario: Trying to add a new province with a taken name
|
||||
When I want to edit this country
|
||||
And I add the "Northern Ireland" province with "GB-NI" code
|
||||
And I try to save changes
|
||||
And I save my changes
|
||||
Then I should be notified that province name must be unique
|
||||
|
||||
@ui @javascript @api
|
||||
|
|
@ -29,7 +29,7 @@ Feature: Province unique fields validation
|
|||
When I want to edit this country
|
||||
And I add the "Scotland" province with "GB-SCO" code
|
||||
And I add the "Not Scotland" province with "GB-SCO" code
|
||||
And I try to save changes
|
||||
And I save my changes
|
||||
Then I should be notified that all province codes and names within this country need to be unique
|
||||
|
||||
@ui @javascript @api
|
||||
|
|
@ -37,5 +37,5 @@ Feature: Province unique fields validation
|
|||
When I want to edit this country
|
||||
And I add the "Scotland" province with "GB-SC" code
|
||||
And I add the "Scotland" province with "GB-SCO" code
|
||||
And I try to save changes
|
||||
And I save my changes
|
||||
Then I should be notified that all province codes and names within this country need to be unique
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Feature: Province validation
|
|||
When I want to create a new province in country "United Kingdom"
|
||||
And I name the province "Scotland"
|
||||
But I do not specify the province code
|
||||
And I try to save changes
|
||||
And I try to save my changes
|
||||
Then I should be notified that code is required
|
||||
And province with name "Scotland" should not be added in this country
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ Feature: Province validation
|
|||
When I want to create a new province in country "United Kingdom"
|
||||
And I specify the province code as "GB-SCT"
|
||||
But I do not name the province
|
||||
And I try to save changes
|
||||
And I try to save my changes
|
||||
Then I should be notified that name is required
|
||||
And province with code "GB-SCT" should not be added in this country
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Feature: Deleting multiple zones
|
|||
Given the store has zones "North America", "South America" and "Europe"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @api @mink:chromedriver
|
||||
@ui @mink:chromedriver @no-api
|
||||
Scenario: Deleting multiple zones at once
|
||||
When I browse zones
|
||||
And I check the "North America" zone
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ Feature: Being redirected to previous filtered page
|
|||
And I cancel my changes
|
||||
Then I should be redirected to the 2nd page of only enabled products
|
||||
|
||||
@ui @javascript @no-api
|
||||
@ui @no-api
|
||||
Scenario: Being redirected to previous filtered page after cancelling creating a new product
|
||||
When I browse products
|
||||
And I choose enabled filter
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
@admin_dashboard
|
||||
Feature: Statistics dashboard in a single channel
|
||||
In order to have an overview of my sales
|
||||
As an Administrator
|
||||
I want to see overall statistics on my admin dashboard
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "United States"
|
||||
And the store ships everywhere for Free
|
||||
And the store allows paying Offline
|
||||
And the store has a product "Sylius T-Shirt"
|
||||
And this product has "Red XL" variant priced at "$40"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Seeing basic statistics for entire store
|
||||
Given 3 customers have fulfilled 4 orders placed for total of "$8566.00"
|
||||
And then 2 more customers have paid 2 orders placed for total of "$459.00"
|
||||
When I open administration dashboard
|
||||
Then I should see 6 new orders
|
||||
And I should see 5 new customers
|
||||
And there should be total sales of "$9,025.00"
|
||||
And the average order value should be "$1,504.17"
|
||||
|
||||
@ui
|
||||
Scenario: Statistics include only fulfilled orders that were not cancelled
|
||||
Given 4 customers have fulfilled 4 orders placed for total of "$5241.00"
|
||||
And then 2 more customers have placed 2 orders for total of "$459.00"
|
||||
And 2 customers have added products to the cart for total of "$3450.00"
|
||||
And a single customer has placed an order for total of "$1000.00"
|
||||
But the customer cancelled this order
|
||||
When I open administration dashboard
|
||||
Then I should see 4 new orders
|
||||
And I should see 9 new customers
|
||||
And there should be total sales of "$5,241.00"
|
||||
And the average order value should be "$1,310.25"
|
||||
|
||||
@ui
|
||||
Scenario: Seeing recent orders and customers
|
||||
Given 2 customers have placed 3 orders for total of "$340.00"
|
||||
And 2 customers have added products to the cart for total of "$424.00"
|
||||
When I open administration dashboard
|
||||
Then I should see 4 new customers in the list
|
||||
And I should see 3 new orders in the list
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
@admin_dashboard
|
||||
Feature: Statistics dashboard per channel
|
||||
In order to have an overview of my sales
|
||||
As an Administrator
|
||||
I want to see overall statistics on my admin dashboard in a specific channel
|
||||
|
||||
Background:
|
||||
Given the store operates on a channel named "Poland"
|
||||
And there is product "Onion" available in this channel
|
||||
And the store operates on another channel named "United States"
|
||||
And there is product "Banana" available in that channel
|
||||
And the store ships everywhere for Free
|
||||
And the store allows paying Offline
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Seeing basic statistics for the first channel by default
|
||||
Given 3 customers have fulfilled 4 orders placed for total of "$8566.00" mostly "Onion" product
|
||||
And then 2 more customers have fulfilled 2 orders placed for total of "$459.00" mostly "Banana" product
|
||||
When I open administration dashboard
|
||||
Then I should see 4 new orders
|
||||
And I should see 5 new customers
|
||||
And there should be total sales of "$8,566.00"
|
||||
And the average order value should be "$2,141.50"
|
||||
|
||||
@ui
|
||||
Scenario: Changing channel in administration dashboard
|
||||
Given 4 customers have fulfilled 4 orders placed for total of "$5241.00" mostly "Onion" product
|
||||
And then 2 more customers have fulfilled 2 orders placed for total of "$459.00" mostly "Banana" product
|
||||
And then 2 more customers have placed 3 orders for total of "$1259.00" mostly "Banana" product
|
||||
When I open administration dashboard
|
||||
And I choose "United States" channel
|
||||
Then I should see 2 new orders
|
||||
And I should see 8 new customers
|
||||
And there should be total sales of "$459.00"
|
||||
And the average order value should be "$229.50"
|
||||
|
||||
@ui
|
||||
Scenario: Seeing recent orders in a specific channel
|
||||
Given 3 customers have placed 4 orders for total of "$8566.00" mostly "Onion" product
|
||||
And then 2 more customers have placed 2 orders for total of "$459.00" mostly "Banana" product
|
||||
When I open administration dashboard for "Poland" channel
|
||||
Then I should see 4 new orders in the list
|
||||
|
||||
@ui
|
||||
Scenario: Seeing recent orders in a specific channel
|
||||
Given 3 customers have placed 4 orders for total of "$8566.00" mostly "Onion" product
|
||||
And then 2 more customers have placed 2 orders for total of "$459.00" mostly "Banana" product
|
||||
When I open administration dashboard for "United States" channel
|
||||
Then I should see 2 new orders in the list
|
||||
|
|
@ -8,7 +8,7 @@ Feature: Redirecting on login page
|
|||
Given the store operates on a single channel in "United States"
|
||||
And I have been logged out from administration
|
||||
|
||||
@ui
|
||||
@ui @no-api
|
||||
Scenario: Redirecting on login page after being logout
|
||||
When I try to open administration dashboard
|
||||
Then I should be on login page
|
||||
|
|
|
|||
67
features/admin/statistics.feature
Normal file
67
features/admin/statistics.feature
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
@admin_dashboard
|
||||
Feature: Statistics
|
||||
In order to gain insight into my sales performance and customers activity
|
||||
As an Administrator
|
||||
I want to view comprehensive statistics
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "United States"
|
||||
And the store ships everywhere for Free
|
||||
And the store allows paying Offline
|
||||
And the store has a product "Sylius T-Shirt"
|
||||
And this product has "Red XL" variant priced at "$40.00"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @no-api
|
||||
Scenario: Seeing statistics for the current year and default channel when expectations are not specified
|
||||
Given it is "2022-12-31" now
|
||||
And 2 new customers have fulfilled 2 orders placed for total of "$1,000.00"
|
||||
And it is "2023-01-01" now
|
||||
And 3 new customers have fulfilled 4 orders placed for total of "$2,000.21"
|
||||
And it is "2023-02-01" now
|
||||
And 2 more new customers have paid 2 orders placed for total of "$5,000.37"
|
||||
When I view statistics
|
||||
Then I should see 5 new customers
|
||||
And I should see 6 new orders
|
||||
And there should be total sales of "$7,000.58"
|
||||
And the average order value should be "$1,166.76"
|
||||
|
||||
@ui @javascript
|
||||
Scenario: Seeing statistics for the previous year
|
||||
Given it is "2022-01-01" now
|
||||
And 3 new customers have fulfilled 2 orders placed for total of "$2,000.00"
|
||||
And it is "2023-02-01" now
|
||||
And 4 more new customers have paid 5 orders placed for total of "$5,000.37"
|
||||
And 2 more new customers have paid 2 orders placed for total of "$5,000.37"
|
||||
When I view statistics for "United States" channel and previous year split by month
|
||||
Then I should see 3 new customers
|
||||
And I should see 2 new orders
|
||||
And there should be total sales of "$2,000.00"
|
||||
And the average order value should be "$1,000.00"
|
||||
|
||||
@ui @javascript
|
||||
Scenario: Seeing statistics for the next year
|
||||
Given it is "2022-01-01" now
|
||||
And 3 new customers have fulfilled 2 orders placed for total of "$2,000.00"
|
||||
And it is "2023-02-01" now
|
||||
And 4 more new customers have paid 5 orders placed for total of "$5,000.37"
|
||||
And 2 more new customers have paid 2 orders placed for total of "$5,000.37"
|
||||
When I view statistics for "United States" channel and previous year split by month
|
||||
And I view statistics for "United States" channel and next year split by month
|
||||
Then I should see 6 new customers
|
||||
And I should see 7 new orders
|
||||
And there should be total sales of "$10,000.74"
|
||||
And the average order value should be "$1,428.68"
|
||||
|
||||
@ui @javascript
|
||||
Scenario: Seeing statistics that include only fulfilled orders that were not cancelled
|
||||
Given 4 new customers have fulfilled 4 orders placed for total of "$5,241.00"
|
||||
And 2 more new customers have placed 2 orders for total of "$459.00"
|
||||
And 2 new customers have added products to the cart for total of "$3,450.00"
|
||||
And a single customer has placed an order for total of "$1,000.00"
|
||||
But the customer cancelled this order
|
||||
When I view statistics for "United States" channel and current year split by month
|
||||
Then I should see 4 new orders
|
||||
And I should see 9 new customers
|
||||
And there should be total sales of "$5,241.00"
|
||||
And the average order value should be "$1,310.25"
|
||||
62
features/admin/statistics_per_channel.feature
Normal file
62
features/admin/statistics_per_channel.feature
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
@admin_dashboard
|
||||
Feature: Statistics for a specific channel
|
||||
In order to gain insight into my sales performance and customers activity in a specific channel
|
||||
As an Administrator
|
||||
I want to view comprehensive statistics
|
||||
|
||||
Background:
|
||||
Given the store operates on a channel named "WEB-POLAND"
|
||||
And there is product "Onion" available in this channel
|
||||
And the store operates on another channel named "WEB-US"
|
||||
And there is product "Banana" available in that channel
|
||||
And the store ships everywhere for Free
|
||||
And the store allows paying Offline
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @no-api
|
||||
Scenario: Seeing basic statistics for the first channel by default
|
||||
Given 3 new customers have fulfilled 4 orders placed for total of "$8,566.00" mostly "Onion" product
|
||||
And 2 more new customers have fulfilled 2 orders placed for total of "$459.00" mostly "Banana" product
|
||||
When I view statistics
|
||||
Then I should see 4 new orders
|
||||
And I should see 5 new customers
|
||||
And there should be total sales of "$8,566.00"
|
||||
And the average order value should be "$2,141.50"
|
||||
|
||||
@ui @javascript
|
||||
Scenario: Switching to the channel with only fulfilled orders
|
||||
Given 4 new customers have fulfilled 4 orders placed for total of "$5,241.00" mostly "Onion" product
|
||||
And 2 more new customers have fulfilled 2 orders placed for total of "$459.00" mostly "Banana" product
|
||||
And 2 more new customers have placed 3 orders for total of "$1,259.00" mostly "Banana" product
|
||||
When I view statistics for "WEB-POLAND" channel and current year split by month
|
||||
And I choose "WEB-US" channel
|
||||
Then I should see 2 new orders
|
||||
And I should see 8 new customers
|
||||
And there should be total sales of "$459.00"
|
||||
And the average order value should be "$229.50"
|
||||
|
||||
@ui @javascript
|
||||
Scenario: Switching to the channel with both fulfilled and placed orders
|
||||
Given 4 new customers have fulfilled 4 orders placed for total of "$5,241.00" mostly "Onion" product
|
||||
And 2 more new customers have fulfilled 2 orders placed for total of "$459.00" mostly "Banana" product
|
||||
And 2 more new customers have placed 3 orders for total of "$1,259.00" mostly "Banana" product
|
||||
When I view statistics for "WEB-US" channel
|
||||
And I choose "WEB-POLAND" channel
|
||||
Then I should see 4 new orders
|
||||
And I should see 8 new customers
|
||||
And there should be total sales of "$5,241.00"
|
||||
And the average order value should be "$1,310.25"
|
||||
|
||||
@ui
|
||||
Scenario: Seeing recent orders in a specific channel
|
||||
Given 3 new customers have placed 4 orders for total of "$8,566.00" mostly "Onion" product
|
||||
And 2 more new customers have placed 2 orders for total of "$459.00" mostly "Banana" product
|
||||
When I view statistics for "WEB-POLAND" channel
|
||||
Then I should see 4 new orders in the list
|
||||
|
||||
@ui
|
||||
Scenario: Seeing recent orders in a specific channel
|
||||
Given 3 new customers have placed 4 orders for total of "$8,566.00" mostly "Onion" product
|
||||
And 2 more new customers have placed 2 orders for total of "$459.00" mostly "Banana" product
|
||||
When I view statistics for "WEB-US" channel
|
||||
Then I should see 2 new orders in the list
|
||||
|
|
@ -6,8 +6,8 @@ Feature: Adding a simple product with discounted catalog price to the cart
|
|||
|
||||
Background:
|
||||
Given the store operates on a single channel in "United States"
|
||||
And the store has a product "Mug" priced at "$40"
|
||||
And the store has a product "T-Shirt" priced at "$20"
|
||||
And the store has a product "Mug" priced at "$40.00"
|
||||
And the store has a product "T-Shirt" priced at "$20.00"
|
||||
And there is a catalog promotion "Winter sale" that reduces price by "25%" and applies on "T-Shirt" variant
|
||||
|
||||
@ui @api
|
||||
|
|
@ -23,7 +23,7 @@ Feature: Adding a simple product with discounted catalog price to the cart
|
|||
@ui @api
|
||||
Scenario: Adding a simple product with catalog and cart promotion to the cart
|
||||
Given there is a promotion "Cheap Stuff"
|
||||
And this promotion gives "50%" off on every product when the item total is at least "$5"
|
||||
And this promotion gives "50%" off on every product when the item total is at least "$5.00"
|
||||
When I add product "T-Shirt" to the cart
|
||||
And I add product "Mug" to the cart
|
||||
Then I should be on my cart summary page
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ Feature: Adding a product with selected option to the cart
|
|||
|
||||
Background:
|
||||
Given the store operates on a single channel in "United States"
|
||||
And the store has a product "T-Shirt banana"
|
||||
And this product has option "Size" with values "S" and "M"
|
||||
And this product has all possible variants
|
||||
|
||||
@ui @api
|
||||
Scenario: Adding a product with single option to the cart
|
||||
Given the store has a product "T-Shirt banana"
|
||||
And this product has option "Size" with values "S" and "M"
|
||||
And this product has all possible variants
|
||||
When I add "T-Shirt banana" with Size "M" to the cart
|
||||
Then I should be on my cart summary page
|
||||
And I should be notified that the product has been successfully added
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ Feature: Adding a product with selected variant with discounted catalog price to
|
|||
Background:
|
||||
Given the store operates on a single channel in "United States"
|
||||
And the store has a "T-Shirt" configurable product
|
||||
And the product "T-Shirt" has a "PHP T-Shirt" variant priced at "$20"
|
||||
And the product "T-Shirt" has a "Kotlin T-Shirt" variant priced at "$400"
|
||||
And the product "T-Shirt" has a "PHP T-Shirt" variant priced at "$20.00"
|
||||
And the product "T-Shirt" has a "Kotlin T-Shirt" variant priced at "$400.00"
|
||||
And the store has a "Keyboard" configurable product
|
||||
And the product "Keyboard" has a "RGB Keyboard" variant priced at "$40"
|
||||
And the product "Keyboard" has a "Pink Keyboard" variant priced at "$40"
|
||||
And the product "Keyboard" has a "RGB Keyboard" variant priced at "$40.00"
|
||||
And the product "Keyboard" has a "Pink Keyboard" variant priced at "$40.00"
|
||||
And there is a catalog promotion "Winter sale" that reduces price by "25%" and applies on "PHP T-Shirt" variant
|
||||
|
||||
@ui @api
|
||||
|
|
|
|||
|
|
@ -172,20 +172,3 @@ Feature: Allowing access only for correctly logged in users
|
|||
And the customer has product "Stark T-Shirt" in the cart
|
||||
And the customer logged out
|
||||
Then the visitor has no access to change product "Stark T-Shirt" quantity to 2 in the customer cart
|
||||
|
||||
@api
|
||||
Scenario: Accessing to the customers cart by the admin
|
||||
Given the customer logged in
|
||||
And the customer has product "Stark T-Shirt" in the cart
|
||||
And the customer logged out
|
||||
And there is logged in the administrator
|
||||
When the administrator try to see the summary of customer's cart
|
||||
Then the administrator should see "Stark T-Shirt" product with quantity 1 in the customer cart
|
||||
|
||||
@api
|
||||
Scenario: Accessing to the visitors cart by the admin
|
||||
Given there is the visitor
|
||||
And the visitor has product "Stark T-Shirt" in the cart
|
||||
And there is logged in the administrator
|
||||
When the administrator try to see the summary of customer's cart
|
||||
Then the administrator should see "Stark T-Shirt" product with quantity 1 in the visitor cart
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Feature: Clearing cart after logging out
|
|||
Given the store operates on a single channel in "United States"
|
||||
And the store has a product "Stark T-Shirt" priced at "$12.00"
|
||||
|
||||
@ui
|
||||
@ui @no-api
|
||||
Scenario: Clearing cart after logging out
|
||||
Given I am a logged in customer
|
||||
And I have product "Stark T-Shirt" in the cart
|
||||
|
|
@ -16,14 +16,14 @@ Feature: Clearing cart after logging out
|
|||
And I see the summary of my cart
|
||||
Then my cart should be empty
|
||||
|
||||
@api
|
||||
@api @no-ui
|
||||
Scenario: Clearing cart after logging out
|
||||
Given I am a logged in customer
|
||||
And I have product "Stark T-Shirt" in the cart
|
||||
When I log out
|
||||
Then I should not have access to the summary of my previous cart
|
||||
|
||||
@api
|
||||
@api @no-ui
|
||||
Scenario: Blocking access to cart if logged user did any action over it (what can be treated as signing it)
|
||||
Given there is a user "john@snow.com"
|
||||
When I add this product to the cart
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Feature: Viewing a cart summary with the correct default shipping method
|
|||
Given the store operates on a single channel in "United States"
|
||||
And the store allows shipping with "Method 1" at position 2 with "$5.00" fee
|
||||
And the store also allows shipping with "Method 2" at position 0 with "$6.00" fee
|
||||
And the store has a product "T-Shirt banana" priced at "$10"
|
||||
And the store has a product "T-Shirt banana" priced at "$10.00"
|
||||
|
||||
@ui @api
|
||||
Scenario:
|
||||
|
|
|
|||
|
|
@ -10,19 +10,20 @@ Feature: Adding a new channel
|
|||
And the store operates in "United States" and "Poland"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @api
|
||||
@api @ui
|
||||
Scenario: Adding a new channel
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile channel"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And the channel "Mobile channel" should appear in the registry
|
||||
|
||||
@ui @api
|
||||
@api @ui
|
||||
Scenario: Adding a new channel with additional fields
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
|
|
@ -33,6 +34,7 @@ Feature: Adding a new channel
|
|||
And I set its contact phone number as "11331122"
|
||||
And I define its color as "blue"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I choose "United States" and "Poland" as operating countries
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
@managing_channels
|
||||
Feature: Specifying the lowest price for discounted products checking period while creating a channel
|
||||
In order to show lowest prices only from a specific period
|
||||
As an Administrator
|
||||
I want to add a new channel with the lowest price for discounted products checking period
|
||||
|
||||
Background:
|
||||
Given the store has currency "Euro"
|
||||
And the store has locale "English (United States)"
|
||||
And the store operates in "United States" and "Poland"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@api @ui
|
||||
Scenario: Adding a new channel without specifying the lowest price for discounted products checking period
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And the "Mobile" channel should have the lowest price for discounted products checking period set to 30 days
|
||||
|
||||
@api @ui
|
||||
Scenario: Adding a new channel with a specified lowest price for discounted products checking period
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I specify 15 days as the lowest price for discounted products checking period
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And the "Mobile" channel should have the lowest price for discounted products checking period set to 15 days
|
||||
|
||||
@api @ui
|
||||
Scenario: Being prevented from creating a new channel with the lowest price for discounted products checking period equal to zero
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I specify 0 days as the lowest price for discounted products checking period
|
||||
And I try to add it
|
||||
Then I should be notified that the lowest price for discounted products checking period must be greater than 0
|
||||
|
||||
@api @ui
|
||||
Scenario: Being prevented from creating a new channel with a negative lowest price for discounted products checking period
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I disable showing the lowest price of discounted products
|
||||
And I specify -10 days as the lowest price for discounted products checking period
|
||||
And I try to add it
|
||||
Then I should be notified that the lowest price for discounted products checking period must be greater than 0
|
||||
|
||||
@api @ui
|
||||
Scenario: Being prevented from creating a new channel with a too big lowest price for discounted products checking period
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I disable showing the lowest price of discounted products
|
||||
And I specify 99999999999 days as the lowest price for discounted products checking period
|
||||
And I try to add it
|
||||
Then I should be notified that the lowest price for discounted products checking period must be lower
|
||||
|
|
@ -10,12 +10,13 @@ Feature: Adding a new channel with shop billing data
|
|||
And the store operates in "United States"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @api
|
||||
@api @ui
|
||||
Scenario: Adding a new channel with shop billing data
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile channel"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I specify company as "Ragnarok"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
@managing_channels
|
||||
Feature: Choosing whether to show the lowest product price or not while creating a channel
|
||||
In order to show the lowest price before the product has been discounted only for certain channels
|
||||
As an Administrator
|
||||
I want to add a new channel that has this feature enabled or not
|
||||
|
||||
Background:
|
||||
Given the store has currency "Euro"
|
||||
And the store has locale "English (United States)"
|
||||
And the store operates in "United States" and "Poland"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@api @ui
|
||||
Scenario: Adding a new channel with lowest price before the product has been discounted enabled by default
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And the "Mobile" channel should have the lowest price of discounted products prior to the current discount enabled
|
||||
|
||||
@api @ui
|
||||
Scenario: Adding a new channel with lowest price before the product has been discounted enabled
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I enable showing the lowest price of discounted products
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And the "Mobile" channel should have the lowest price of discounted products prior to the current discount enabled
|
||||
|
||||
@api @ui
|
||||
Scenario: Adding a new channel with lowest price before the product has been discounted disabled
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I disable showing the lowest price of discounted products
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And the "Mobile" channel should have the lowest price of discounted products prior to the current discount disabled
|
||||
|
|
@ -17,6 +17,7 @@ Feature: Adding a new channel with menu taxon
|
|||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile channel"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I specify menu taxon as "Clothes"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Feature: Browsing channels
|
|||
And the store operates on another channel named "Mobile Channel"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @api
|
||||
@api @ui
|
||||
Scenario: Browsing defined channels
|
||||
When I want to browse channels
|
||||
Then I should see 2 channels in the list
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Feature: Channel unique code validation
|
|||
Given the store operates on a channel identified by "WEB" code
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Trying to add channel with taken code
|
||||
When I want to create a new channel
|
||||
And I specify its code as "WEB"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ Feature: Channel validation
|
|||
Background:
|
||||
Given I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Trying to add a new channel without specifying its code
|
||||
When I want to create a new channel
|
||||
And I name it "Mobile channel"
|
||||
|
|
@ -16,7 +16,7 @@ Feature: Channel validation
|
|||
Then I should be notified that code is required
|
||||
And channel with name "Mobile channel" should not be added
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Trying to add a new channel without specifying its name
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
|
|
@ -25,7 +25,7 @@ Feature: Channel validation
|
|||
Then I should be notified that name is required
|
||||
And channel with code "MOBILE" should not be added
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Trying to add a new channel without base currency
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
|
|
@ -34,7 +34,7 @@ Feature: Channel validation
|
|||
Then I should be notified that base currency is required
|
||||
And channel with code "MOBILE" should not be added
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Trying to add a new channel without default locale
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
|
|
@ -43,7 +43,7 @@ Feature: Channel validation
|
|||
Then I should be notified that default locale is required
|
||||
And channel with code "MOBILE" should not be added
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Trying to remove name from existing channel
|
||||
Given the store operates on a channel named "Web Channel"
|
||||
When I want to modify this channel
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ Feature: Choosing a required address in the checkout for a channel
|
|||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile Store"
|
||||
And I choose "USD" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I choose shipping address as a required address in the checkout
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Feature: Deleting a channel
|
|||
And the store operates on another channel named "Mobile Store"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Deleted channel should disappear from the registry
|
||||
When I delete channel "Web Store"
|
||||
Then I should be notified that it has been successfully deleted
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Feature: Deleting multiple channels
|
|||
And the store operates on another channel named "DE Store"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @mink:chromedriver
|
||||
@ui @mink:chromedriver @no-api
|
||||
Scenario: Deleting multiple channels at once
|
||||
When I browse channels
|
||||
And I check the "PL Store" channel
|
||||
|
|
|
|||
|
|
@ -8,20 +8,12 @@ Feature: Editing channel
|
|||
Given the store operates on a channel named "Web Channel"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@todo
|
||||
Scenario: Trying to change channel code
|
||||
@api @ui
|
||||
Scenario: Being unable to change the code of an existing channel
|
||||
When I want to modify a channel "Web Channel"
|
||||
And I change its code to "MOBILE"
|
||||
And I save my changes
|
||||
Then I should be notified that code cannot be changed
|
||||
And channel "Web Channel" should still have code "MOBILE"
|
||||
Then I should not be able to edit its code
|
||||
|
||||
@ui
|
||||
Scenario: Seeing disabled code field when editing channel
|
||||
When I want to modify a channel "Web Channel"
|
||||
Then the code field should be disabled
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Renaming the channel
|
||||
When I want to modify a channel "Web Channel"
|
||||
And I rename it to "Website store"
|
||||
|
|
@ -29,7 +21,7 @@ Feature: Editing channel
|
|||
Then I should be notified that it has been successfully edited
|
||||
And this channel name should be "Website store"
|
||||
|
||||
@ui
|
||||
Scenario: Seeing disabled base currency field during channel edition
|
||||
@api @ui
|
||||
Scenario: Being unable to change base currency of an existing channel
|
||||
When I want to modify a channel "Web Channel"
|
||||
Then the base currency field should be disabled
|
||||
Then I should not be able to edit its base currency
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
@managing_channels
|
||||
Feature: Specifying the lowest price for discounted products checking period while editing a channel
|
||||
In order to show lowest prices only from a specific period
|
||||
As an Administrator
|
||||
I want to edit a channel's lowest price for discounted products checking period
|
||||
|
||||
Background:
|
||||
Given the store operates on a channel named "EU"
|
||||
And this channel has 15 days set as the lowest price for discounted products checking period
|
||||
And I am logged in as an administrator
|
||||
|
||||
@no-api @ui
|
||||
Scenario: Changing the lowest price for discounted products checking period
|
||||
When I want to modify a channel "EU"
|
||||
And I specify 30 days as the lowest price for discounted products checking period
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And its lowest price for discounted products checking period should be set to 30 days
|
||||
|
||||
@no-api @ui
|
||||
Scenario: Being prevented from changing the lowest price for discounted products checking period to zero
|
||||
When I want to modify a channel "EU"
|
||||
And I specify 0 days as the lowest price for discounted products checking period
|
||||
And I try to save my changes
|
||||
Then I should be notified that the lowest price for discounted products checking period must be greater than 0
|
||||
|
||||
@no-api @ui
|
||||
Scenario: Being prevented from changing the lowest price for discounted products checking period to a negative value
|
||||
When I want to modify a channel "EU"
|
||||
And I specify -10 days as the lowest price for discounted products checking period
|
||||
And I try to save my changes
|
||||
Then I should be notified that the lowest price for discounted products checking period must be greater than 0
|
||||
|
||||
@no-api @ui
|
||||
Scenario: Being prevented from changing the lowest price for discounted products checking period to a too big value
|
||||
When I want to modify a channel "EU"
|
||||
And I specify 99999999999 days as the lowest price for discounted products checking period
|
||||
And I try to save my changes
|
||||
Then I should be notified that the lowest price for discounted products checking period must be lower
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Changing the lowest price for discounted products checking period
|
||||
When I want to modify the price history config of channel "EU"
|
||||
And I change the lowest price for discounted products checking period to 30 days
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And its lowest price for discounted products checking period should be set to 30 days
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Being prevented from changing the lowest price for discounted products checking period to zero
|
||||
When I want to modify the price history config of channel "EU"
|
||||
And I change the lowest price for discounted products checking period to 0 days
|
||||
And I try to save my changes
|
||||
Then I should be notified that the lowest price for discounted products checking period must be greater than 0
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Being prevented from changing the lowest price for discounted products checking period to a negative value
|
||||
When I want to modify the price history config of channel "EU"
|
||||
And I change the lowest price for discounted products checking period to -10 days
|
||||
And I try to save my changes
|
||||
Then I should be notified that the lowest price for discounted products checking period must be greater than 0
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Being prevented from changing the lowest price for discounted products checking period to a too big value
|
||||
When I want to modify the price history config of channel "EU"
|
||||
And I change the lowest price for discounted products checking period to 99999999999 days
|
||||
And I try to save my changes
|
||||
Then I should be notified that the lowest price for discounted products checking period must be lower
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
@managing_channels
|
||||
Feature: Choosing whether to show the lowest product price or not while editing a channel
|
||||
In order to show the lowest price before the product has been discounted only for certain channels
|
||||
As an Administrator
|
||||
I want to be able to edit channels and enable or disable the lowest price of discounted products on them
|
||||
|
||||
Background:
|
||||
Given the store operates on a channel named "EU Channel"
|
||||
And the store operates on another channel named "US Channel"
|
||||
And the channel "EU Channel" has showing the lowest price of discounted products enabled
|
||||
And the channel "US Channel" has showing the lowest price of discounted products disabled
|
||||
And I am logged in as an administrator
|
||||
|
||||
@no-api @ui
|
||||
Scenario: Enabling showing the lowest price of discounted products on a channel
|
||||
When I want to modify a channel "US Channel"
|
||||
And I enable showing the lowest price of discounted products
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And the "US Channel" channel should have the lowest price of discounted products prior to the current discount enabled
|
||||
|
||||
@no-api @ui
|
||||
Scenario: Disabling showing the lowest price of discounted products on a channel
|
||||
When I want to modify a channel "EU Channel"
|
||||
And I disable showing the lowest price of discounted products
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And the "EU Channel" channel should have the lowest price of discounted products prior to the current discount disabled
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Enabling showing the lowest price of discounted products on a channel
|
||||
When I want to modify the price history config of channel "US Channel"
|
||||
And I change showing of the lowest price of discounted products to be enabled
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And the "US Channel" channel should have the lowest price of discounted products prior to the current discount enabled
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Disabling showing the lowest price of discounted products on a channel
|
||||
When I want to modify the price history config of channel "EU Channel"
|
||||
And I change showing of the lowest price of discounted products to be disabled
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And the "EU Channel" channel should have the lowest price of discounted products prior to the current discount disabled
|
||||
|
|
@ -11,7 +11,7 @@ Feature: Editing menu taxon on channel
|
|||
And channel "Web Store" has menu taxon "Clothes"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @javascript
|
||||
@api @ui @javascript
|
||||
Scenario: Editing menu taxon on the channel
|
||||
When I want to modify a channel "Web Store"
|
||||
And I change its menu taxon to "Guns"
|
||||
|
|
|
|||
|
|
@ -10,14 +10,20 @@ Feature: Editing shop billing data on channel
|
|||
And channel "Web Store" billing data is "Ragnarok", "Pacific Coast Hwy", "90806" "Los Angeles", "United States" with "1100110011" tax ID
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Editing shop billing data on channel
|
||||
When I want to modify a channel "Web Store"
|
||||
And I specify company as "Götterdämmerung"
|
||||
And I specify tax ID as "666777"
|
||||
And I specify shop billing address as "Valhalla", "123" "Asgard", "United States"
|
||||
And I specify shop billing data for this channel as "Götterdämmerung", "Valhalla", "123", "Asgard", "666777" tax ID and "United States" country
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And this channel company should be "Götterdämmerung"
|
||||
And this channel tax ID should be "666777"
|
||||
And this channel shop billing address should be "Valhalla", "123" "Asgard", "United States"
|
||||
And this channel shop billing address should be "Valhalla", "123" "Asgard" and "United States" country
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Editing shop billing data with wrong country code
|
||||
When I want to modify a channel "Web Store"
|
||||
And I specify new country code for this channel as "ZZ"
|
||||
And I save my changes
|
||||
Then I should be notified that it is not a valid country
|
||||
And this channel shop billing address should still be "Pacific Coast Hwy", "90806" "Los Angeles" and "United States" country
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
@managing_channels
|
||||
Feature: Excluding chosen taxons from displaying the lowest price of discounted products
|
||||
In order not to show the lowest price of discounted products on some taxons
|
||||
As an Administrator
|
||||
I want to be able to configure taxons for which the lowest price of discounted products is not displayed
|
||||
|
||||
Background:
|
||||
Given the store operates on a channel named "Poland"
|
||||
And the store classifies its products as "T-Shirts", "Caps" and "Sweaters"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@no-api @ui @javascript
|
||||
Scenario: Excluding a singular taxon from displaying the lowest price of discounted products
|
||||
When I want to modify a channel "Poland"
|
||||
And I exclude the "T-Shirts" taxon from showing the lowest price of discounted products
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And this channel should have "T-Shirts" taxon excluded from displaying the lowest price of discounted products
|
||||
|
||||
@no-api @ui @javascript
|
||||
Scenario: Excluding multiple taxons from displaying the lowest price of discounted products
|
||||
When I want to modify a channel "Poland"
|
||||
And I exclude the "T-Shirts" and "Caps" taxons from showing the lowest price of discounted products
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And this channel should have "T-Shirts" and "Caps" taxons excluded from displaying the lowest price of discounted products
|
||||
|
||||
@no-api @ui @javascript
|
||||
Scenario: Removing excluded taxon from displaying the lowest price of discounted products
|
||||
Given the channel "Poland" has "T-Shirts" and "Caps" taxons excluded from showing the lowest price of discounted products
|
||||
When I want to modify this channel
|
||||
And I remove the "T-Shirts" taxon from excluded taxons from showing the lowest price of discounted products
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And this channel should have "Caps" taxon excluded from displaying the lowest price of discounted products
|
||||
And this channel should not have "T-Shirts" taxon excluded from displaying the lowest price of discounted products
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Excluding a singular taxon from displaying the lowest price of discounted products
|
||||
When I want to modify the price history config of channel "Poland"
|
||||
And I exclude the "T-Shirts" taxon from showing the lowest price of discounted products
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And this channel should have "T-Shirts" taxon excluded from displaying the lowest price of discounted products
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Excluding multiple taxons from displaying the lowest price of discounted products
|
||||
When I want to modify the price history config of channel "Poland"
|
||||
And I exclude the "T-Shirts" and "Caps" taxons from showing the lowest price of discounted products
|
||||
And I save my changes
|
||||
Then I should be notified that it has been successfully edited
|
||||
And this channel should have "T-Shirts" and "Caps" taxons excluded from displaying the lowest price of discounted products
|
||||
|
|
@ -9,8 +9,8 @@ Feature: Not being able to add a disabled channel when no other exist
|
|||
And the store has locale "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Adding a new disabled channel should result
|
||||
@api @ui
|
||||
Scenario: Trying to add a new disabled channel when no other exist
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile channel"
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ Feature: Not being able to delete a last available channel
|
|||
Given the store operates on a channel named "Web Store"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Prevented from deleting only channel
|
||||
@api @ui
|
||||
Scenario: Preventing from deleting only channel
|
||||
When I delete channel "Web Store"
|
||||
Then I should be notified that it cannot be deleted
|
||||
And this channel should still be in the registry
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Feature: Toggling a channel
|
|||
Given the store operates on a channel named "Web Channel"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Disabling the last available channel
|
||||
Given the channel "Web Channel" is enabled
|
||||
When I want to modify this channel
|
||||
|
|
|
|||
|
|
@ -7,20 +7,24 @@ Feature: Selecting available currencies for a channel
|
|||
Background:
|
||||
Given the store has currency "Euro"
|
||||
And the store has locale "English (United States)"
|
||||
And the store operates in "United States"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Adding a new channel with currencies
|
||||
When I want to create a new channel
|
||||
And I specify its code as MOBILE
|
||||
And I choose "Euro" as the base currency
|
||||
And I name it "Mobile store"
|
||||
And I allow for paying in "Euro"
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And paying in Euro should be possible for the "Mobile store" channel
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Adding currencies to an existing channel
|
||||
Given the store operates on a channel named "Web store"
|
||||
When I want to modify this channel
|
||||
|
|
|
|||
|
|
@ -8,19 +8,21 @@ Feature: Selecting default tax zone for a channel
|
|||
Given the store operates on a single channel in "United States"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Adding a new channel with default tax zone
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I name it "Mobile store"
|
||||
And I select the "United States" as default tax zone
|
||||
And I choose "USD" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And the default tax zone for the "Mobile store" channel should be "United States"
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Selecting default tax zone for existing channel
|
||||
Given the store operates on a channel named "Web store"
|
||||
When I want to modify this channel
|
||||
|
|
@ -29,7 +31,7 @@ Feature: Selecting default tax zone for a channel
|
|||
Then I should be notified that it has been successfully edited
|
||||
And the default tax zone for the "Web store" channel should be "United States"
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Removing existing channel default tax zone
|
||||
Given the store operates on a channel named "Web store"
|
||||
And its default tax zone is zone "US"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Feature: Selecting available locales for a channel
|
|||
And the store has locale "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Adding a new channel with locales
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
|
|
@ -17,11 +17,12 @@ Feature: Selecting available locales for a channel
|
|||
And I make it available in "English (United States)"
|
||||
And I choose "Euro" as the base currency
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I select the "Order items based" as tax calculation strategy
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And the channel "Mobile Channel" should be available in "English (United States)"
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Adding locales to an existing channel
|
||||
Given the store operates on a channel named "Web Channel"
|
||||
When I want to modify this channel
|
||||
|
|
@ -30,23 +31,23 @@ Feature: Selecting available locales for a channel
|
|||
Then I should be notified that it has been successfully edited
|
||||
And the channel "Web Channel" should be available in "English (United States)"
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Being unable to disable locale used as the default one for a channel
|
||||
Given the store operates on a channel named "Web"
|
||||
And this channel allows to shop using "English (United States)" and "Polish (Poland)" locales
|
||||
And this channel uses the "English (United States)" locale as default
|
||||
And I am modifying a channel "Web"
|
||||
When I make it available only in "Polish (Poland)"
|
||||
When I want to modify this channel
|
||||
And I make it available only in "Polish (Poland)"
|
||||
And I try to save my changes
|
||||
Then I should be notified that the default locale has to be enabled
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Being unable to set disabled locale as a default one for a channel
|
||||
Given the store has locale "Polish (Poland)"
|
||||
And the store operates on a channel named "Web"
|
||||
And this channel allows to shop using the "English (United States)" locale
|
||||
And this channel uses the "English (United States)" locale as default
|
||||
And I am modifying a channel "Web"
|
||||
When I choose "Polish (Poland)" as a default locale
|
||||
When I want to modify this channel
|
||||
And I choose "Polish (Poland)" as a default locale
|
||||
And I try to save my changes
|
||||
Then I should be notified that the default locale has to be enabled
|
||||
|
|
|
|||
|
|
@ -20,19 +20,20 @@ Feature: Selecting tax calculation strategy for a channel
|
|||
Then I should be notified that it has been successfully created
|
||||
And the tax calculation strategy for the "Mobile store" channel should be "Order items based"
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Adding a new channel with tax calculation strategy
|
||||
When I want to create a new channel
|
||||
And I specify its code as "MOBILE"
|
||||
And I select the "Order item units based" as tax calculation strategy
|
||||
And I name it "Mobile store"
|
||||
And I choose "Euro" as the base currency
|
||||
And I make it available in "English (United States)"
|
||||
And I choose "English (United States)" as a default locale
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And the tax calculation strategy for the "Mobile store" channel should be "Order item units based"
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Changing tax calculation strategy of existing channel
|
||||
Given the store operates on a channel named "Web store"
|
||||
When I want to modify this channel
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Feature: Toggling a channel
|
|||
And the store operates on another channel named "Mobile Channel"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Disabling the channel
|
||||
Given the channel "Web Channel" is enabled
|
||||
When I want to modify this channel
|
||||
|
|
@ -18,7 +18,7 @@ Feature: Toggling a channel
|
|||
Then I should be notified that it has been successfully edited
|
||||
And this channel should be disabled
|
||||
|
||||
@ui
|
||||
@api @ui
|
||||
Scenario: Enabling the channel
|
||||
Given the channel "Web Channel" is disabled
|
||||
When I want to modify this channel
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Feature: Changing email during checkout with registered email
|
|||
|
||||
Background:
|
||||
Given the store operates on a single channel in "United States"
|
||||
And the store has a product "Mantis blade" priced at "$1200"
|
||||
And the store has a product "Mantis blade" priced at "$1,200.00"
|
||||
And the store ships everywhere for Free
|
||||
And the store allows paying Offline
|
||||
And there is a customer "John Doe" identified by an email "john@example.com" and a password "secret"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Feature: Checking out as guest with a registered email
|
|||
And I confirm my order
|
||||
Then I should see the thank you page
|
||||
|
||||
@ui
|
||||
@ui @api
|
||||
Scenario: Placing an order using email with mixed case
|
||||
Given I have product "PHP T-Shirt" in the cart
|
||||
When I complete addressing step with email "JOhn@example.COM" and "United States" based billing address
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Feature: Addressing an order and signing in
|
|||
And the store has a product "PHP T-Shirt" priced at "$19.99"
|
||||
And there is a customer "Francis Underwood" identified by an email "francis@underwood.com" and a password "whitehouse"
|
||||
|
||||
@ui @javascript
|
||||
@ui @javascript @no-api
|
||||
Scenario: Addressing an order and signing in
|
||||
Given I have product "PHP T-Shirt" in the cart
|
||||
And I am at the checkout addressing step
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Feature: Having good number of items in changing payment method page
|
|||
And the store has a product "PHP T-Shirt" priced at "$19.99"
|
||||
And the store ships everywhere for Free
|
||||
|
||||
@ui
|
||||
@ui @no-api
|
||||
Scenario: Seeing correct quantity on payment retry page
|
||||
Given I have added 2 products "PHP T-Shirt" to the cart
|
||||
And I complete addressing step with email "john@example.com" and "United States" based billing address
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Feature: Changing the offline payment method after order confirmation
|
|||
And the store has a product "PHP T-Shirt" priced at "$19.99"
|
||||
And the store ships everywhere for Free
|
||||
|
||||
@ui
|
||||
@ui @api
|
||||
Scenario: Retrying the payment with different Offline payment
|
||||
Given I added product "PHP T-Shirt" to the cart
|
||||
When I complete addressing step with email "john@example.com" and "United States" based billing address
|
||||
|
|
|
|||
|
|
@ -12,37 +12,34 @@ Feature: Inform customer about any order total changes during checkout process
|
|||
And the store ships everywhere for Free
|
||||
And the store allows paying Offline
|
||||
|
||||
@ui
|
||||
@ui @api
|
||||
Scenario: Inform customer about order total change due to product price change
|
||||
Given I am a logged in customer
|
||||
And I added product "PHP T-Shirt" to the cart
|
||||
And I have proceeded selecting "Offline" payment method
|
||||
And I proceeded through checkout process
|
||||
And this product price has been changed to "$25.00"
|
||||
When I confirm my order
|
||||
Then I should be informed that order total has been changed
|
||||
And I should not see the thank you page
|
||||
Then my order should not be placed due to changed order total
|
||||
|
||||
@ui
|
||||
@ui @api
|
||||
Scenario: Be able to confirm order after information appears
|
||||
Given I am a logged in customer
|
||||
And I added product "PHP T-Shirt" to the cart
|
||||
And I have proceeded selecting "Offline" payment method
|
||||
And I proceeded through checkout process
|
||||
And this product price has been changed to "$25.00"
|
||||
And I have confirmed order
|
||||
When I confirm my order
|
||||
Then I should see the thank you page
|
||||
Then my order should not be placed due to changed order total
|
||||
|
||||
@ui
|
||||
@ui @api
|
||||
Scenario: Inform customer about order total change due to tax change
|
||||
Given I am a logged in customer
|
||||
And I added product "PHP T-Shirt" to the cart
|
||||
And I have proceeded selecting "Offline" payment method
|
||||
And I proceeded through checkout process
|
||||
And the "NA VAT" tax rate has changed to 10%
|
||||
When I confirm my order
|
||||
Then I should be informed that order total has been changed
|
||||
And I should not see the thank you page
|
||||
Then my order should not be placed due to changed order total
|
||||
|
||||
@ui
|
||||
@ui @api
|
||||
Scenario: Inform customer about order total change due to shipping method fee change
|
||||
Given the store has "UPS" shipping method with "$20.00" fee
|
||||
And I added product "PHP T-Shirt" to the cart
|
||||
|
|
@ -50,5 +47,4 @@ Feature: Inform customer about any order total changes during checkout process
|
|||
And I have proceeded order with "UPS" shipping method and "Offline" payment
|
||||
And the shipping fee for "UPS" shipping method has been changed to "$30.00"
|
||||
When I confirm my order
|
||||
Then I should be informed that order total has been changed
|
||||
And I should not see the thank you page
|
||||
Then my order should not be placed due to changed order total
|
||||
|
|
|
|||
|
|
@ -10,10 +10,11 @@ Feature: Paying offline during checkout
|
|||
And the store ships everywhere for Free
|
||||
And the store allows paying Offline
|
||||
|
||||
@ui
|
||||
@ui @api
|
||||
Scenario: Successfully placing an order
|
||||
Given I am a logged in customer
|
||||
And I have product "PHP T-Shirt" in the cart
|
||||
When I proceed selecting "Offline" payment method
|
||||
And I have specified the billing address as "Ankh Morpork", "Frost Alley", "90210", "United States" for "Jon Snow"
|
||||
When I proceeded with "Free" shipping method and "Offline" payment method
|
||||
And I confirm my order
|
||||
Then I should see the thank you page
|
||||
|
|
|
|||
|
|
@ -20,9 +20,17 @@ Feature: Paying Offline during checkout as guest
|
|||
And I confirm my order
|
||||
Then I should see the thank you page
|
||||
|
||||
@ui
|
||||
@ui @no-api
|
||||
Scenario: Successfully placing an order using custom locale
|
||||
Given I have product "PHP T-Shirt" in the cart
|
||||
When I proceed through checkout process in the "French (France)" locale with email "john@example.com"
|
||||
And I confirm my order
|
||||
Then I should see the thank you page in "French (France)"
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Successfully placing an order using custom locale
|
||||
Given I pick up cart in the "French (France)" locale
|
||||
And I add product "PHP T-Shirt" to the cart
|
||||
When I proceed through checkout process
|
||||
And I confirm my order
|
||||
Then my order's locale should be "French (France)"
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue