Skip to content

Upgrade test application to Sylius 1.14 - #86

Merged
loevgaard merged 5 commits into
3.xfrom
upgrade-sylius-1.14
Aug 31, 2026
Merged

Upgrade test application to Sylius 1.14#86
loevgaard merged 5 commits into
3.xfrom
upgrade-sylius-1.14

Conversation

@loevgaard

Copy link
Copy Markdown
Member

Upgrades the test application from Sylius 1.12 to Sylius 1.14, using Setono/SyliusPluginSkeleton 1.14.x as the guide.

Changes

Dependencies / tooling

  • setono/sylius-plugin-pack ~1.14.1 → Sylius 1.14.19, Symfony 6.4, API Platform 2.7; all Symfony constraints narrowed to ^6.4 (Sylius 1.14 supports ^5.4.21 || ^6.4 only)
  • Psalm replaced by PHPStan level max (phpstan.neon + tests/PHPStan loaders, as in the skeleton). src/ passes without a baseline; the only config additions are allowNullablePropertyForRequiredField and a commented ignore for interface-mapped Doctrine associations (Sylius resolve_target_entities).
  • phpunit.xml.dist: stale AppKernel.php reference removed, coverage config added.

src/ (type-level only, plus one Rector ??=)

  • EventSubscriber is generic over the originating event (@template TEvent), callback() returns callable(TEvent): ?Event, and track() now takes the event explicitly (track(object $event)) instead of func_get_args(). ⚠️ This adds a required parameter to a public method; the event dispatcher always passes it, so runtime behaviour is unchanged.
  • Generics on Sylius repository/factory params, typed fixture options with asserts, corrected @var hints.

tests/Application

  • bundles.php in skeleton 1.14 order (SyliusStateMachineAbstractionBundle, SyliusTestPlugin, test_cached), keeping the Setono bundles
  • package.json@sylius-ui/frontend ^1.0.3, skeleton webpack.config.js, .nvmrc (Node 20), dead assets/ removed
  • SYLIUS_TELEMETRY_ENABLED=0

CI: PHP 8.1–8.3, Symfony ~6.4.0 only, checkout@v5, Rector enforced, composer analyse.

Verified locally (PHP 8.3)

  • composer update, composer normalize/validate --strict
  • PHPStan, ECS, Rector, PHPUnit (empty suite) all green
  • lint:container (dev + test), lint:yaml, lint:twig
  • doctrine:schema:create + schema:validate, sylius:fixtures:load (incl. the plugin's pixels)
  • yarn install && yarn build on Node 20
  • Running app: shop homepage / product / taxon pages render with the pixel initialised, admin pixel grid + create form work, and dev.log shows ViewProductSubscriber::trackConversionsApiEventRaised → bundle subscribers with no errors

Notes

  • composer audit flags 4 advisories on api-platform/core 2.7 — unfixable while on Sylius 1.x (hence audit.block-insecure: false, same as the skeleton).
  • PHP 8.4 is not in the CI matrix; locally it breaks the dev web app because API Platform 2.7's implicit-nullable deprecations are emitted into the output.

https://claude.ai/code/session_013jh2QjzkxAJABPDYB1UiPS

Follows the Setono plugin skeleton 1.14.x branch:

- setono/sylius-plugin-pack ~1.14.1 (Sylius 1.14, PHPStan, Rector 2, Infection 0.29)
- Symfony constraints narrowed to ^6.4 (the only line Sylius 1.14 supports)
- psalm.xml replaced by phpstan.neon (level max) with kernel/object manager loaders
- src/ made PHPStan-clean without a baseline: generic EventSubscriber<TEvent>
  with an explicit track(object $event), generics on Sylius repositories and
  factories, typed fixture options, corrected @var hints
- phpunit.xml.dist: remove stale AppKernel reference, add coverage config

Claude-Session: https://claude.ai/code/session_013jh2QjzkxAJABPDYB1UiPS
- bundles.php in skeleton 1.14 order (state machine abstraction, calendar,
  SyliusTestPlugin, test_cached env), keeping the Setono bundles
- Frontend built with @sylius-ui/frontend and Node 20 (.nvmrc); entries point
  at the vendored Sylius bundles, dead assets/ removed
- Disable Sylius telemetry in the test application

Claude-Session: https://claude.ai/code/session_013jh2QjzkxAJABPDYB1UiPS
PHP 8.1-8.3, Symfony ~6.4.0 only, actions/checkout@v5, Rector enforced,
static analysis via composer analyse (PHPStan).

Claude-Session: https://claude.ai/code/session_013jh2QjzkxAJABPDYB1UiPS
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

…eck installable

- track() keeps its parameterless signature; the originating event is read from
  the first dispatcher argument and typed as TEvent, so Roave no longer reports
  an increased number of required arguments
- The BC check job now disables Composer's security-advisory blocking globally:
  Roave installs the baseline's dependencies, and Sylius 1.x pins
  api-platform/core ^2.7 which has known advisories the base branch cannot opt
  out of itself

Claude-Session: https://claude.ai/code/session_013jh2QjzkxAJABPDYB1UiPS
@loevgaard
loevgaard merged commit eef0385 into 3.x Aug 31, 2026
29 of 30 checks passed
@loevgaard
loevgaard deleted the upgrade-sylius-1.14 branch August 31, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant