Merge branch '1.14' into 2.0

* 1.14:
  [PromotionBundle] Unification of service names - fix
  [CI] Remove currently unneeded custom build
  [API] Add default sorting order for customers admin GET endpoint
  Change fixtures - add createdAt different time for customers
  [Review] Change ReviewChangeListener doctrine event from postRemove to preRemove
  [Composer] Remove conflict to doctrine/orm
This commit is contained in:
Grzegorz Sadowski 2024-10-09 06:58:26 +02:00
commit 74732319f5
No known key found for this signature in database
GPG key ID: EF87FF4E6E3BD364
7 changed files with 5 additions and 154 deletions

View file

@ -53,15 +53,6 @@ jobs:
with:
branch: ${{ matrix.branch }}
type: full
e2e-custom:
strategy:
matrix:
branch: ["1.13"]
name: "[${{ matrix.branch }}] End-to-end tests (Custom)"
needs: static-checks
uses: ./.github/workflows/ci_e2e-custom.yaml
with:
branch: ${{ matrix.branch }}
frontend:
name: Frontend
needs: static-checks
@ -82,7 +73,7 @@ jobs:
notify-about-build-status:
if: ${{ always() }}
name: "Notify about build status"
needs: [static-checks, e2e-mariadb, e2e-mysql, e2e-pgsql, e2e-custom, packages]
needs: [static-checks, e2e-mariadb, e2e-mysql, e2e-pgsql, packages]
runs-on: ubuntu-latest
timeout-minutes: 5
@ -109,7 +100,6 @@ jobs:
${{ needs.e2e-mariadb.result == 'success' && ':+1:' || ':x:' }} End-to-End (MariaDB)
${{ needs.e2e-mysql.result == 'success' && ':+1:' || ':x:' }} End-to-End (MySQL)
${{ needs.e2e-pgsql.result == 'success' && ':+1:' || ':x:' }} End-to-End (PostgreSQL)
${{ needs.e2e-custom.result == 'success' && ':+1:' || ':x:' }} End-to-End (Custom)
${{ needs.packages.result == 'success' && ':+1:' || ':x:' }} Packages
_ _ _ _ _ _ _

View file

@ -53,15 +53,6 @@ jobs:
with:
branch: ${{ matrix.branch }}
type: full
e2e-custom:
strategy:
matrix:
branch: ["1.14"]
name: "[${{ matrix.branch }}] End-to-end tests (Custom)"
needs: static-checks
uses: ./.github/workflows/ci_e2e-custom.yaml
with:
branch: ${{ matrix.branch }}
frontend:
name: Frontend
needs: static-checks
@ -82,7 +73,7 @@ jobs:
notify-about-build-status:
if: ${{ always() }}
name: "Notify about build status"
needs: [static-checks, e2e-mariadb, e2e-mysql, e2e-pgsql, e2e-custom, packages]
needs: [static-checks, e2e-mariadb, e2e-mysql, e2e-pgsql, packages]
runs-on: ubuntu-latest
timeout-minutes: 5
@ -109,7 +100,6 @@ jobs:
${{ needs.e2e-mariadb.result == 'success' && ':+1:' || ':x:' }} End-to-End (MariaDB)
${{ needs.e2e-mysql.result == 'success' && ':+1:' || ':x:' }} End-to-End (MySQL)
${{ needs.e2e-pgsql.result == 'success' && ':+1:' || ':x:' }} End-to-End (PostgreSQL)
${{ needs.e2e-custom.result == 'success' && ':+1:' || ':x:' }} End-to-End (Custom)
${{ needs.packages.result == 'success' && ':+1:' || ':x:' }} Packages
_ _ _ _ _ _ _

View file

@ -53,15 +53,6 @@ jobs:
with:
branch: ${{ matrix.branch }}
type: full
e2e-custom:
strategy:
matrix:
branch: ["2.0"]
name: "[${{ matrix.branch }}] End-to-end tests (Custom)"
needs: static-checks
uses: ./.github/workflows/ci_e2e-custom.yaml
with:
branch: ${{ matrix.branch }}
frontend:
name: Frontend
needs: static-checks
@ -82,7 +73,7 @@ jobs:
notify-about-build-status:
if: ${{ always() }}
name: "Notify about build status"
needs: [static-checks, e2e-mariadb, e2e-mysql, e2e-pgsql, e2e-custom, packages]
needs: [static-checks, e2e-mariadb, e2e-mysql, e2e-pgsql, packages]
runs-on: ubuntu-latest
timeout-minutes: 5
@ -109,7 +100,6 @@ jobs:
${{ needs.e2e-mariadb.result == 'success' && ':+1:' || ':x:' }} End-to-End (MariaDB)
${{ needs.e2e-mysql.result == 'success' && ':+1:' || ':x:' }} End-to-End (MySQL)
${{ needs.e2e-pgsql.result == 'success' && ':+1:' || ':x:' }} End-to-End (PostgreSQL)
${{ needs.e2e-custom.result == 'success' && ':+1:' || ':x:' }} End-to-End (Custom)
${{ needs.packages.result == 'success' && ':+1:' || ':x:' }} Packages
_ _ _ _ _ _ _

View file

@ -43,10 +43,6 @@ jobs:
uses: ./.github/workflows/ci_e2e-pgsql.yaml
with:
type: minimal
e2e-custom:
name: End-to-end tests (Custom)
needs: static-checks
uses: ./.github/workflows/ci_e2e-custom.yaml
frontend:
name: Frontend
needs: static-checks

View file

@ -1,115 +0,0 @@
name: End-to-End (Custom)
on:
workflow_dispatch: ~
workflow_call:
inputs:
branch:
description: "Branch"
required: false
type: string
default: ""
permissions:
contents: read
jobs:
behat-no-js-unstable-dependencies:
runs-on: ubuntu-latest
name: "Non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, Resource ${{ matrix.resource }}, Grid ${{ matrix.grid }} (Unstable Dependencies)"
timeout-minutes: 45
continue-on-error: true
strategy:
fail-fast: false
matrix:
php: ["8.2"]
symfony: ["^6.4"]
mysql: ["8.0"]
resource: ["^1.12@alpha"]
grid: ["^1.13@alpha"]
env:
APP_ENV: test_cached
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@v4
with:
ref: ${{ inputs.branch }}
- name: "Checkout"
if: "${{ inputs.branch == '' }}"
uses: actions/checkout@v4
- name: Change minimum-stability to dev
run: |
composer config minimum-stability dev
composer config prefer-stable true
- name: Prepare manifest.json files
run: |
mkdir -p public/build/admin
mkdir -p public/build/shop
mkdir -p public/build/app/admin
mkdir -p public/build/app/shop
echo "{}" > public/build/admin/manifest.json
echo "{}" > public/build/shop/manifest.json
echo "{}" > public/build/app/admin/manifest.json
echo "{}" > public/build/app/shop/manifest.json
- name: Require SyliusResourceBundle version
run: |
composer require sylius/resource-bundle:${{ matrix.resource }} --no-update
- name: Require SyliusGridBundle version
run: |
composer require sylius/grid-bundle:${{ matrix.grid }} --no-update
- name: Build application
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 }}
node_version: "20.x"
- name: Run PHPUnit
continue-on-error: true
run: vendor/bin/phpunit --colors=always
- name: Run CLI Behat
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" --suite-tags="@cli" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" --suite-tags="@cli" --rerun
- name: Run non-UI Behat
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@todo&&~@cli" --suite-tags="@api,@domain" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@todo&&~@cli" --suite-tags="@api,@domain" --rerun
- name: Run non-JS Behat
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@mink:chromedriver&&~@todo&&~@cli" --suite-tags="@hybrid,@ui" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@mink:chromedriver&&~@todo&&~@cli" --suite-tags="@hybrid,@ui" --rerun
- name: Upload logs
uses: actions/upload-artifact@v3
if: failure()
with:
name: "Logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, Resource ${{ matrix.resource }}, Grid ${{ matrix.grid }})"
path: |
etc/build/
var/log
if-no-files-found: ignore

View file

@ -20,7 +20,7 @@ use Sylius\Component\Review\Model\ReviewInterface;
final readonly class ReviewChangeListener
{
public function __construct(private ReviewableRatingUpdaterInterface $averageRatingUpdater)
public function __construct(private readonly ReviewableRatingUpdaterInterface $averageRatingUpdater)
{
}

View file

@ -43,7 +43,7 @@ final class ReviewChangeListenerSpec extends ObjectBehavior
$this->recalculateSubjectRating($event);
}
function it_removes_a_review_from_a_review_subject_on_the_post_remove_event(
function it_removes_a_review_from_a_review_subject_on_the_pre_remove_event(
ReviewableRatingUpdaterInterface $averageRatingUpdater,
ReviewInterface $review,
ReviewableInterface $reviewSubject,