Skip to content
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
6b67881
1.x rewrite phases 1-2: skeleton alignment + domain model
loevgaard Jul 2, 2026
e9524e6
1.x rewrite phase 3: gift card design resource end-to-end
loevgaard Jul 2, 2026
7718451
1.x rewrite phase 4: gift card purchase flow
loevgaard Jul 2, 2026
4ae8dd7
1.x rewrite phase 5: purchase lifecycle operator + state machine
loevgaard Jul 2, 2026
f7ff583
1.x rewrite phases 6-7: redemption core + adjustment mode
loevgaard Jul 2, 2026
2e9f7cc
1.x rewrite phase 8: shop redemption UI (browser-verified)
loevgaard Jul 2, 2026
5005586
1.x rewrite phase 10: PDF generation + email
loevgaard Jul 2, 2026
90c2c40
test app: fix asset build (disable resolve-url-loader) so shop/admin …
loevgaard Jul 2, 2026
4fbd74d
docs: update rewrite log (phase 10 + asset build)
loevgaard Jul 2, 2026
4ec1f6a
1.x rewrite phase 9: payment redemption mode
loevgaard Jul 2, 2026
bb4b7b4
1.x rewrite phase 11a: admin gift card list, balance dashboard, forms
loevgaard Jul 2, 2026
d7750e2
1.x rewrite phase 11: admin polish
loevgaard Jul 2, 2026
a8ff748
1.x rewrite phase 12: tests + docs
loevgaard Jul 2, 2026
5d30bcc
test app: fix broken admin JS/CSS build (adopt skeleton 1.14.x frontend)
loevgaard Jul 2, 2026
269f229
Fix gift card coverage display + remove stale test-app cart override
loevgaard Jul 2, 2026
9efebfe
Fix gift card add-to-cart 500 (OrderItem::equals must match itself)
loevgaard Jul 2, 2026
bc57008
Fix gift card design admin (validation + grid + translations)
loevgaard Jul 2, 2026
f998fb7
Fix payment mode: set gatewayName on the lazily-created gift card method
loevgaard Jul 2, 2026
78eaa6a
docs: record full Playwright verification pass + 6 bug fixes in REWRI…
loevgaard Jul 2, 2026
cc32585
Add email + payment-method functional tests; fix single-card email lo…
loevgaard Jul 2, 2026
2832afc
Admin polish: expiry, show page, PDF pages, grid limit, styling, desi…
loevgaard Jul 2, 2026
ea77c03
Prevent duplicate design image types + two-column design form
loevgaard Jul 2, 2026
e1e0dd9
Redesign gift card PDF to a polished framed/redemption layout
loevgaard Jul 2, 2026
5387cdf
Live product-page preview now matches the PDF card design (shared par…
loevgaard Jul 2, 2026
003081e
Preview: switch to framed default for designs without an image
loevgaard Jul 2, 2026
0155884
test app: remove stale shop menu override that broke the nav styling
loevgaard Jul 3, 2026
3d291e3
docs: always run the test app web server with 'symfony serve'
loevgaard Jul 3, 2026
319440f
Rename Twig templates and folders to snake_case; drop stale 0.12.x co…
loevgaard Jul 3, 2026
99b1c70
Use FQCN service ids and alias each interface to its concrete impleme…
loevgaard Jul 3, 2026
af3a5cc
Decorate Sylius add-to-cart services instead of overriding them
loevgaard Jul 3, 2026
75d17b6
Resolve entity managers via ManagerRegistry + ORMTrait instead of inj…
loevgaard Jul 3, 2026
104b5a1
Make the add-to-cart command decoration composable and self-validating
loevgaard Jul 3, 2026
e7576a6
Document the add-to-cart command extension point in the README
loevgaard Jul 3, 2026
58d14b8
Restructure and round out the README
loevgaard Jul 3, 2026
57f42fc
Loosen Sylius component constraints to ^1.0
loevgaard Jul 3, 2026
e37fae7
Remove accidentally committed admin screenshot; fix UPGRADE Sylius ve…
loevgaard Jul 3, 2026
527838e
Prepend bundle configuration as PHP arrays instead of loading YAML files
loevgaard Jul 3, 2026
6b78b5e
Address remaining PR review comments
loevgaard Jul 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
187 changes: 62 additions & 125 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: "build"
on:
push:
branches:
- "1.x"
- "0.*.x"
paths-ignore:
- "**/*.md"
Expand All @@ -17,7 +18,7 @@ env:

jobs:
coding-standards:
name: "Coding Standards (PHP ${{ matrix.php-version }} | Dependency versions: ${{ matrix.dependencies }})"
name: "Coding Standards (PHP ${{ matrix.php-version }})"

runs-on: "ubuntu-latest"

Expand All @@ -26,9 +27,6 @@ jobs:
php-version:
- "8.1" # Always use the lowest version of PHP since a higher version would create actual syntax errors in lower versions

dependencies:
- "highest"

steps:
- name: "Checkout"
uses: "actions/checkout@v4"
Expand All @@ -43,7 +41,7 @@ jobs:
- name: "Install composer dependencies"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
dependency-versions: "highest"

- name: "Validate composer"
run: "composer validate --strict"
Expand All @@ -54,31 +52,30 @@ jobs:
- name: "Check style"
run: "composer check-style"

- name: "Run Rector"
run: "vendor/bin/rector --dry-run"

- name: "Lint yaml files"
run: "(cd tests/Application && bin/console lint:yaml ../../src/Resources)"

- name: "Lint twig files"
run: "(cd tests/Application && bin/console lint:twig ../../src/Resources)"

dependency-analysis:
name: "Dependency Analysis (PHP ${{ matrix.php-version }} | Dependency versions: ${{ matrix.dependencies }} | Symfony: ${{ matrix.symfony }})"
name: "Dependency Analysis (PHP ${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }})"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"

dependencies:
- "lowest"
- "highest"

symfony:
- "~5.4.0"
- "~6.4.0"

steps:
- name: "Checkout"
uses: "actions/checkout@v4"
Expand All @@ -89,26 +86,24 @@ jobs:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
tools: "composer-require-checker, composer-unused, flex"
tools: "flex"

- name: "Remove require-dev section in composer.json"
run: "composer config --unset require-dev"


- name: "Add composer-dependency-analyser"
run: "composer require --no-update --no-plugins --no-scripts --dev shipmonk/composer-dependency-analyser"

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v3"
env:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run maglnet/composer-require-checker"
run: "composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"

- name: "Run composer-unused/composer-unused"
run: "composer-unused"
- name: "Run composer-dependency-analyser"
run: "vendor/bin/composer-dependency-analyser"

static-code-analysis:
name: "Static Code Analysis (PHP ${{ matrix.php-version }} | Dependency versions: ${{ matrix.dependencies }} | Symfony: ${{ matrix.symfony }})"
name: "Static Code Analysis (PHP ${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }} | Sylius: ${{ matrix.sylius }})"

runs-on: "ubuntu-latest"

Expand All @@ -117,14 +112,14 @@ jobs:
php-version:
- "8.1"
- "8.2"
- "8.3"

dependencies:
- "lowest"
- "highest"

symfony:
- "~5.4.0"
- "~6.4.0"
sylius:
- "~1.13.0"
- "~1.14.0"

steps:
- name: "Checkout"
Expand All @@ -138,21 +133,19 @@ jobs:
php-version: "${{ matrix.php-version }}"
tools: "flex"

- name: "Remove sylius/sylius from composer.json"
run: "composer remove --dev --no-update --no-plugins --no-scripts sylius/sylius"
- name: "Require matching Sylius version"
run: "composer require --dev --no-update sylius/sylius:\"${{ matrix.sylius }}\""

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v3"
env:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Static analysis"
run: "vendor/bin/psalm --php-version=${{ matrix.php-version }}"
run: "composer analyse"

unit-tests:
name: "Unit tests (PHP ${{ matrix.php-version }} | Dependency versions: ${{ matrix.dependencies }} | Symfony: ${{ matrix.symfony }})"
name: "Unit tests (PHP ${{ matrix.php-version }} | Deps: ${{ matrix.dependencies }} | Sylius: ${{ matrix.sylius }})"

runs-on: "ubuntu-latest"

Expand All @@ -161,13 +154,14 @@ jobs:
php-version:
- "8.1"
- "8.2"
- "8.3"

dependencies:
- "highest"

symfony:
- "~5.4.0"
- "~6.4.0"
sylius:
- "~1.13.0"
- "~1.14.0"

steps:
- name: "Checkout"
Expand All @@ -181,35 +175,31 @@ jobs:
php-version: "${{ matrix.php-version }}"
tools: "flex"

- name: "Remove sylius/sylius from composer.json"
run: "composer remove --dev --no-update --no-plugins --no-scripts sylius/sylius"
- name: "Require matching Sylius version"
run: "composer require --dev --no-update sylius/sylius:\"${{ matrix.sylius }}\""

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v3"
env:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run phpunit"
run: "composer phpunit"
- name: "Run unit tests"
run: "vendor/bin/phpunit --testsuite unit"

integration-tests:
name: "Integration tests (PHP ${{ matrix.php-version }} | Dependency versions: ${{ matrix.dependencies }} | Symfony: ${{ matrix.symfony }})"
functional-tests:
name: "Functional tests (PHP ${{ matrix.php-version }} | Sylius: ${{ matrix.sylius }})"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"

dependencies:
- "highest"

symfony:
- "~6.4"
sylius:
- "~1.13.0"
- "~1.14.0"

steps:
- name: "Start MySQL"
Expand All @@ -224,25 +214,18 @@ jobs:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php-version }}"
tools: "flex,symfony"
tools: "flex"

- name: "Setup node"
uses: "actions/setup-node@v4"
with:
node-version: "18"
- name: "Require matching Sylius version"
run: "composer require --dev --no-update sylius/sylius:\"${{ matrix.sylius }}\""

- name: "Install composer dependencies"
uses: "ramsey/composer-install@v3"
env:
SYMFONY_REQUIRE: "${{ matrix.symfony }}"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Install wkhtmltopdf"
run: "sudo apt-get install wkhtmltopdf"
dependency-versions: "highest"

- name: "Lint container"
run: '(cd tests/Application && bin/console lint:container)'
run: "(cd tests/Application && bin/console lint:container)"

- name: "Create database"
run: "(cd tests/Application && bin/console doctrine:database:create)"
Expand All @@ -253,77 +236,23 @@ jobs:
- name: "Validate Doctrine mapping"
run: "(cd tests/Application && bin/console doctrine:schema:validate)"

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

- name: "Cache Yarn"
uses: "actions/cache@v2"
with:
path: "${{ steps.yarn-cache.outputs.dir }}"
key: "yarn-${{ hashFiles('**/package.json **/yarn.lock') }}"
restore-keys: "yarn-"

- name: "Install JS dependencies"
run: "(cd tests/Application && yarn install)"

- name: "Install assets"
run: "(cd tests/Application && bin/console assets:install public -vvv)"

- name: "Build assets"
run: "(cd tests/Application && yarn build)"

- name: "Output PHP version for Symfony CLI"
run: "php -v | head -n 1 | awk '{ print $2 }' > .php-version"

- 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: "Wait for Chrome to start"
run: |
until curl -s http://127.0.0.1:9222/json/version | grep "Browser" > /dev/null 2>&1
do
sleep 1
done

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

- name: "Wait for webserver to start"
run: |
until symfony server:list | grep /public > /dev/null 2>&1
do
sleep 1
done

- name: "Run behat"
run: "vendor/bin/behat --colors --strict -vvv --no-interaction || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun"

- name: "Upload Behat logs"
uses: "actions/upload-artifact@v4"
if: "failure()"
with:
name: "Behat logs"
path: "etc/build/"
if-no-files-found: "ignore"
- name: "Run functional tests"
run: "vendor/bin/phpunit --testsuite functional"

code-coverage:
name: "Code Coverage (PHP ${{ matrix.php-version }} | Dependency versions: ${{ matrix.dependencies }})"
name: "Code Coverage (PHP ${{ matrix.php-version }})"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "8.2"

dependencies:
- "highest"
- "8.3"

steps:
- name: "Start MySQL"
run: "sudo /etc/init.d/mysql start"

- name: "Checkout"
uses: "actions/checkout@v4"

Expand All @@ -337,12 +266,20 @@ jobs:
- name: "Install composer dependencies"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.dependencies }}"
dependency-versions: "highest"

- name: "Create database"
run: "(cd tests/Application && bin/console doctrine:database:create)"

- name: "Create database schema"
run: "(cd tests/Application && bin/console doctrine:schema:create)"

- name: "Collect code coverage with pcov and phpunit/phpunit"
run: "vendor/bin/phpunit --coverage-clover=.build/logs/clover.xml"

- name: "Send code coverage report to Codecov.io"
uses: "codecov/codecov-action@v4"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the newest action and I don't think you need to explicitly give it the files

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 6b78b5e — bumped to codecov-action@v5 and removed the explicit files input.

with:
files: ".build/logs/clover.xml"
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
run: "bash <(curl -s https://codecov.io/bash)"
13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
/node_modules/
/composer.lock

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

/tests/Application/yarn.lock

/behat.yml
/phpspec.yml
/.build/
/.phpunit.result.cache
.php-version

/tests/Application/yarn.lock
/.playwright-mcp/
/tests/Application/public/build/
/tests/Application/public/router.php

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use symfony serve instead of built-in php web server. Add this to CLAUDE.md

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 6b78b5e — removed tests/Application/public/router.php and its .gitignore entry. Running the server with symfony serve is already documented in CLAUDE.md.

12 changes: 12 additions & 0 deletions .mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"mcpServers": {
"playwright": {
"type": "stdio",
"command": "npx",
"args": [
"@playwright/mcp@latest"
],
"env": {}
}
}
}
Loading
Loading