Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1d313a5
WIP - update to sylius 2.0
LucaGallinari Jan 7, 2026
5b617c2
Decorates new classes
LucaGallinari Jan 9, 2026
ed221a8
Add migration directly in the plugin and adapts models/entities by us…
LucaGallinari Jan 13, 2026
5ac6722
Moves all templates under new dir structure and/or use twig hooks
LucaGallinari Jan 13, 2026
930b6c9
Use new modifier to add new fields on checkout address form
LucaGallinari Jan 13, 2026
6ca5b12
Updates README
LucaGallinari Jan 13, 2026
8f04cbd
Temporarily use mmenozzi/ViesBundle branch that is compatible with sy…
LucaGallinari Jan 13, 2026
7ca735a
Use sylius 2.2 in build
LucaGallinari Jan 13, 2026
6b73e23
Temporarily patch Sylius behat AddressPage class as it has a bug
LucaGallinari Jan 14, 2026
758226d
Style and static fixes
LucaGallinari Jan 15, 2026
86da0bd
Symlink node modules
LucaGallinari Jan 15, 2026
219136d
Remove behat likely unnecessary configs
LucaGallinari Jan 15, 2026
d767bca
Use test FCQN for entities to validate
LucaGallinari Jan 15, 2026
6a98af8
Add Default as default validation group for Address entity
LucaGallinari Jan 15, 2026
eb3daaa
Add missing behat test server script
LucaGallinari Jan 15, 2026
aad0879
Remove not needed symfony.lock file
LucaGallinari Jan 15, 2026
8e9ee01
Add missing Vies Bundle
LucaGallinari Jan 15, 2026
648a4ae
Fix behat tests
LucaGallinari Jan 15, 2026
fa2a51b
Remove typo
LucaGallinari Jan 15, 2026
a930d52
Fix static analysis
LucaGallinari Jan 15, 2026
791c776
Retrieve address type from the form 'cause in Sylius 2 we don't have …
LucaGallinari Jan 15, 2026
c11beaa
In behat using @javascript it seems like the selectOption method is n…
LucaGallinari Jan 15, 2026
6ed4ff2
Use correct FCQN for validation callback too
LucaGallinari Jan 15, 2026
ffb939c
Enforce Sylius ^2.2 as Address Form Values Modifiers were introduced …
LucaGallinari Jan 15, 2026
01a5f83
Adds patch to remove payum core deprecations
LucaGallinari Jan 16, 2026
20cfaed
Updates README
LucaGallinari Jan 16, 2026
1e94883
Remove panther as we dont' use it
LucaGallinari Jan 16, 2026
fddd391
Add bin/console alias
LucaGallinari Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions .docker/nginx/nginx.conf

This file was deleted.

5 changes: 0 additions & 5 deletions .docker/php/php.ini

This file was deleted.

1 change: 0 additions & 1 deletion .github/CODEOWNERS

This file was deleted.

12 changes: 0 additions & 12 deletions .github/actions/roave-bc-check/Dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions .github/actions/roave-bc-check/action.yml

This file was deleted.

102 changes: 61 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,20 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3"]
symfony: ["5.4.*", "^6.0"]
sylius: ["^1.12.0", "^1.13.1"]
node: ["18.x"]
mysql: ["8.0"]
php: ["8.4"]
symfony: ["^7.3"]
sylius: ["~2.2.0"]
node: ["22.x"]
mysql: ["8.4"]

env:
APP_ENV: test
BEHAT_BASE_URL: "https://127.0.0.1:8080/"
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"

steps:
-
uses: actions/checkout@v2
uses: actions/checkout@v4

-
name: Setup PHP
Expand Down Expand Up @@ -67,20 +68,12 @@ jobs:

-
name: Install certificates
run: symfony server:ca:install

-
name: Run Chrome Headless
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &

-
name: Run webserver
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
run: symfony server:ca:install || true

-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

-
name: Cache Composer
Expand All @@ -91,16 +84,12 @@ jobs:
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-composer-

-
name: Configure global composer
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.2.2"

-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.4"
composer global config --no-plugins allow-plugins.symfony/flex true
composer config extra.symfony.require "${{ matrix.symfony }}"

-
Expand All @@ -111,13 +100,15 @@ jobs:
-
name: Install PHP dependencies
run: composer install --no-interaction
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}

-
name: Run unit tests
run: vendor/bin/phpunit --colors=always --testsuite=unit

-
name: Get Yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

-
name: Cache Yarn
Expand All @@ -130,35 +121,39 @@ jobs:

-
name: Install JS dependencies
run: (cd tests/Application && yarn install)
run: (cd vendor/sylius/test-application && yarn install)

-
name: Prepare test application database
run: |
(cd tests/Application && bin/console doctrine:database:create -vvv)
(cd tests/Application && bin/console doctrine:schema:create -vvv)
(vendor/bin/console doctrine:database:create -vvv)
(vendor/bin/console doctrine:schema:create -vvv)

-
name: Prepare test application assets
run: |
(cd tests/Application && bin/console assets:install public -vvv)
(cd tests/Application && yarn build:prod)
vendor/bin/console assets:install -vvv
(cd vendor/sylius/test-application && yarn build)

-
name: Prepare test application cache
run: (cd tests/Application && bin/console cache:warmup -vvv)
run: vendor/bin/console cache:warmup -vvv

-
name: Load fixtures in test application
run: (cd tests/Application && bin/console sylius:fixtures:load -n)
run: vendor/bin/console sylius:fixtures:load -n

-
name: Validate composer.json
run: composer validate --ansi --strict

-
name: Validate container
run: vendor/bin/console lint:container

-
name: Validate database schema
run: (cd tests/Application && bin/console doctrine:schema:validate)
run: vendor/bin/console doctrine:schema:validate

-
name: Run PHPStan
Expand All @@ -173,8 +168,16 @@ jobs:
run: vendor/bin/phpspec run --ansi -f progress --no-interaction

-
name: Run PHPUnit
run: vendor/bin/phpunit --colors=always
name: Run Non-unit PHPUnit tests
run: vendor/bin/phpunit --colors=always --testsuite=non-unit

-
name: Run Chrome Headless
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &

-
name: Run webserver
run: symfony server:start --port=8080 --daemon

-
name: Run Behat
Expand All @@ -185,16 +188,33 @@ jobs:
uses: actions/upload-artifact@v4
if: failure()
with:
name: Behat logs
name: "Behat logs - ${{ matrix.sylius }}-${{ github.run_id }}-${{ github.run_number }}"
path: etc/build/
if-no-files-found: ignore
compression-level: 6
overwrite: true

roave_bc_check:
name: Roave BC Check
runs-on: ubuntu-latest
env:
PHP_VERSION: 8.4
steps:
- uses: actions/checkout@v3
- name: fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Roave BC Check
uses: ./.github/actions/roave-bc-check
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ env.PHP_VERSION }}"
extensions: intl
tools: flex,symfony
coverage: none

- name: Install roave/backward-compatibility-check.
run: composer require --dev roave/backward-compatibility-check --no-plugins

- name: Run roave/backward-compatibility-check.
run: vendor/bin/roave-backward-compatibility-check --format=github-actions
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
/vendor/
/var/
/node_modules/
/drivers/
/composer.lock

/etc/build/*
!/etc/build/.gitignore

/tests/Application/yarn.lock

/.phpunit.result.cache
/behat.yml
/phpspec.yml
/phpunit.xml
/compose.override.yml
/docker-compose.override.yml
.phpunit.result.cache

# Symfony CLI https://symfony.com/doc/current/setup/symfony_server.html#different-php-settings-per-project
/.php-version
/php.ini

/tests/TestApplication/.env.local
/tests/TestApplication/.env.*.local
79 changes: 55 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,67 @@
phpunit:
vendor/bin/phpunit
.PHONY: run

phpspec:
vendor/bin/phpspec run --ansi --no-interaction -f dot
DOCKER_COMPOSE ?= docker compose
DOCKER_USER ?= "$(shell id -u):$(shell id -g)"
ENV ?= "dev"

phpstan:
vendor/bin/phpstan analyse
init:
@make -s docker-compose-check
@if [ ! -e compose.override.yml ]; then \
cp compose.override.dist.yml compose.override.yml; \
fi
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm php composer install --no-interaction --no-scripts --no-plugins
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm nodejs
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) up -d

psalm:
vendor/bin/psalm
run:
@make -s up

behat-js:
APP_ENV=test vendor/bin/behat --colors --strict --no-interaction -vvv -f progress
debug:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) -f compose.yml -f compose.override.yml -f compose.debug.yml up -d

install:
composer install --no-interaction --no-scripts
up:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) up -d

backend:
tests/Application/bin/console sylius:install --no-interaction
tests/Application/bin/console sylius:fixtures:load default --no-interaction
down:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) down

frontend:
(cd tests/Application && yarn install --pure-lockfile)
(cd tests/Application && GULP_ENV=prod yarn build)
clean:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) down -v

behat:
APP_ENV=test vendor/bin/behat --colors --strict --no-interaction -vvv -f progress
php-shell:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) exec php sh

node-shell:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm -i nodejs sh

node-watch:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm -i nodejs "npm run watch"

docker-compose-check:
@$(DOCKER_COMPOSE) version >/dev/null 2>&1 || (echo "Please install docker compose binary or set DOCKER_COMPOSE=\"docker-compose\" for legacy binary" && exit 1)
@echo "You are using \"$(DOCKER_COMPOSE)\" binary"
@echo "Current version is \"$$($(DOCKER_COMPOSE) version)\""

init: install backend frontend
database-init:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm php vendor/bin/console doctrine:database:create -n --if-not-exists
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm php vendor/bin/console doctrine:migrations:migrate -n

ci: init phpstan psalm phpunit phpspec behat
database-reset:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm php vendor/bin/console doctrine:database:drop -n --force --if-exists
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm php vendor/bin/console doctrine:database:create -n
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm php vendor/bin/console doctrine:migrations:migrate -n

integration: init phpunit behat
load-fixtures:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm php vendor/bin/console sylius:fixtures:load -n

static: install phpspec phpstan psalm
phpstan:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm php vendor/bin/phpstan analyse -c phpstan.neon

ecs:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm php vendor/bin/ecs check src

phpunit:
@ENV=$(ENV) DOCKER_USER=$(DOCKER_USER) $(DOCKER_COMPOSE) run --rm php vendor/bin/phpunit

behat:
@ENV=$(ENV) DOCKER_USER=root $(DOCKER_COMPOSE) run --rm php vendor/bin/behat
Loading